-
Notifications
You must be signed in to change notification settings - Fork 214
add minimal auto-instrumentation hook functions #1358
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
add minimal auto-instrumentation hook functions #1358
Conversation
add OpenTelemetry\API\Instrumentation\Handler, which will be the default pre/post hook callbacks for attribute-based auto-instrumentation.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1358 +/- ##
============================================
- Coverage 74.16% 73.91% -0.26%
- Complexity 2584 2648 +64
============================================
Files 373 380 +7
Lines 7429 7576 +147
============================================
+ Hits 5510 5600 +90
- Misses 1919 1976 +57
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 29 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
src/API/Instrumentation/Handler.php
Outdated
| use OpenTelemetry\Context\Context; | ||
| use Throwable; | ||
|
|
||
| class Handler |
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.
Maybe the name of this class could reflect that this is the handler specifically for creating spans? It is the most common purpose why functions are instrumented, but would still be nice for it to be explicit.
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.
Maybe /WithSpan/Handler or WithSpanHandler ?
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.
Latter seems to make more sense to me.
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.
renamed to WithSpanHandler
add OpenTelemetry\API\Instrumentation\Handler, which will be the default pre/post hook callbacks for attribute-based auto-instrumentation.
Related: open-telemetry/opentelemetry-php-instrumentation#146