-
Notifications
You must be signed in to change notification settings - Fork 91
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
Laravel: decoupled from SDK ClockFactory (& some linting) #211
Laravel: decoupled from SDK ClockFactory (& some linting) #211
Conversation
Use 1.0 stable release for `open-telemetry/api`.
@@ -12,17 +12,15 @@ | |||
"ext-json": "*", | |||
"ext-opentelemetry": "*", | |||
"laravel/framework": ">=6.0", | |||
"open-telemetry/api": "^1.0.0beta10", | |||
"open-telemetry/api": "^1.0", | |||
"open-telemetry/sdk": "^1.0", |
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.
Required for:
opentelemetry-php-contrib/src/Instrumentation/Laravel/src/Watchers/QueryWatcher.php
Line 12 in 0152175
use OpenTelemetry\SDK\Common\Time\ClockFactory; |
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.
Is there a way for it to not directly use the SDK? The OTEL spec is fairly firm about it: https://opentelemetry.io/docs/specs/otel/library-guidelines/#requirements
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.
Thanks for pointing it out, I was not aware. Given that rule, it looks like the current implementation might be best in not using the ClockFactory, if possible?
I shall take a look at removing that coupling.
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.
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.
I'm happy with your changes. We could maybe move ClockInterface
into the API (since it has some constants that might make that code a little more readable), but it's a pretty minor use-case and nothing else in contrib needs if, AFAICT.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #211 +/- ##
=========================================
Coverage 33.08% 33.08%
Complexity 853 853
=========================================
Files 76 76
Lines 3252 3252
=========================================
Hits 1076 1076
Misses 2176 2176
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
…rom the runtime dependency on the ClockFactory.
OpenTelemetry\SDK is used in the QueryWatcher instrumentation, so has been promoted from a dev dependency.