Add DDTrace namespace for internal functions#930
Merged
Conversation
This only changes two functions: * dd_trace_function -> DDTrace\trace_function * dd_trace_method -> DDTrace\trace_method dd_trace_function & dd_trace_method remain as aliases
morrisonlevi
approved these changes
Jun 20, 2020
labbati
approved these changes
Jun 22, 2020
|
|
||
| // Hook into the router to extract the proper route name | ||
| \dd_trace_method('Slim\Router', 'lookupRoute', function (SpanData $span, $args, $return) use ($rootSpan) { | ||
| \DDTrace\trace_method('Slim\Router', 'lookupRoute', function (SpanData $s, $a, $return) use ($rootSpan) { |
Member
There was a problem hiding this comment.
Just asking to adopt the same approach in similar scenarios. Do we want to use $s and $a meaning 'not used'? Something like the _ of other languages?
Contributor
Author
There was a problem hiding this comment.
I like this idea! I changed these just to get the linter to pass, but having a consistent "not used" convention would be good to implement across the board. Are we good with the first initial of each param: $s, $a, $r? Or something else?
Member
|
Thanks for the |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the
DDTracenamespace to internal functions so that going forward, all new API's can be added under this namespace. This change only applies to two existing functions:dd_trace_function->DDTrace\trace_functiondd_trace_method->DDTrace\trace_methodThe old functions
dd_trace_function&dd_trace_methodremain as aliases to their namespaced counterparts.Readiness checklist
Reviewer checklist