-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Adds a cache to the metric insrument pipeline. #3181
Adds a cache to the metric insrument pipeline. #3181
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3181 +/- ##
=====================================
Coverage 77.4% 77.5%
=====================================
Files 158 158
Lines 11084 11139 +55
=====================================
+ Hits 8583 8636 +53
- Misses 2306 2308 +2
Partials 195 195
|
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 think this approach is viable in that it is should provide correct behavior, but I think it suffers from two issues:
- this expands on the confusion of multiple "create" methods as talked about in Refactor Pipeline #3233
- it overloads the
pipelineRegistry
so now it is now a pipeline registry and instrument cache
The first issue I feel is sympomatic of the current pipeline design and it would be addressed in #3233. The second though, I feel needs to be addressed by moving the cache to the Meter
object. That is where instrument uniqueness is defined from and could be constructed to emanate from that.
I built out a PoC based on #3233 with how we could resolve both of these issues: https://github.com/MrAlias/opentelemetry-go/pull/660/files
@@ -8,6 +8,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm | |||
|
|||
## [Unreleased] | |||
|
|||
### Changed | |||
|
|||
- Add caching to instrument creation (#3181) |
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.
- Add caching to instrument creation (#3181) | |
- Add caching to instrument creation. | |
Repeated requests for the same instrument will return the same instance. (#3181) |
Closing as this has been superseded by #3251 Please reopen if this is in error. |
This adds a caching layer to instrument creation, so repeated requests for the same instrument (scope, name, kind) return the same underlying aggregations.
Fix #3229