-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for auto-instrumentation #237
Conversation
…from-consts-to-class
…o labbati/autoinstrumentation
…o labbati/fix-54-tests
c48b9a8
to
942c2d2
Compare
…toinstrumentation
942c2d2
to
c3a739b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff!!
@@ -51,6 +51,8 @@ aliases: | |||
image: php:7.2 | |||
name: request_replayer | |||
command: sh -c "curl --output index.php https://raw.githubusercontent.com/DataDog/dd-trace-php/dev/tests/request_replayer/index.php -q && php -S 0.0.0.0:80 index.php" | |||
environment: | |||
DD_REQUEST_DUMPER_FILE: dump.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost Request dumpster fire
:D <- this is the most useful Review comment of this decade
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄
$args = func_get_args(); | ||
$options = $args[0]; | ||
|
||
$classExist = class_exists('DDTrace_Ddtrace'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:eye_twitch: at the random casing - I assume its as per Zend recommendation ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct! it actually took as a while to understand! 😄
@@ -203,6 +203,51 @@ static PHP_FUNCTION(dd_trace) { | |||
RETURN_BOOL(rv); | |||
} | |||
|
|||
// This function allows untracing a function. | |||
static PHP_FUNCTION(dd_untrace) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff !!!!
@@ -16,8 +16,7 @@ | |||
"app/database/seeds" | |||
], | |||
"psr-4": { | |||
"App\\": "app/", | |||
"DDTrace\\": "../../../../src/DDTrace/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
@@ -0,0 +1,32 @@ | |||
--TEST-- | |||
Check a function can be untraced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpick - this test could also verify other functions/methods still remain traced after one is untraced.
Amazing work @labbati! :) |
* Update extraction ip algorithin * Add more tests for new ip headers
Description
This PR adds support for autoinstrumenting PHP code.
Readiness checklist