-
Notifications
You must be signed in to change notification settings - Fork 187
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 enabled functions #1350
add enabled functions #1350
Conversation
spec 1.34 requires logger, tracer, and instrument to have an enabled function
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1350 +/- ##
============================================
- Coverage 74.61% 74.56% -0.05%
- Complexity 2504 2517 +13
============================================
Files 355 355
Lines 7180 7206 +26
============================================
+ Hits 5357 5373 +16
- Misses 1823 1833 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
|
||
public function enabled(): bool | ||
{ | ||
return true; |
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.
https://opentelemetry.io/docs/specs/otel/metrics/sdk/#instrument-enabled
The instrument Enabled operation MUST return false if [...] All resolved views for the instrument are configured with the Drop Aggregation.
Can be implemented by adding a MetricWriterInterface::enabled(Instrument)
method:
- in
MetricRegistry
return isset($this->instrumentToStreams[spl_object_id($instrument)]);
- in
SynchronousInstrumentTrait
andObservableInstrumentTrait
return $this->writer->enabled($this->instrument);
Co-authored-by: Tobias Bachert <git@b-privat.de>
…hp into add-enabled-func
spec 1.34 requires logger, tracer, and instrument to have an enabled function. It doesn't do anything helpful yet, but #1349 should resolve this.
Closes: #1324
Closes: #1325
Closes: #1326