Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 more details to SDK MeterProvider and View #1730
Add more details to SDK MeterProvider and View #1730
Changes from 11 commits
4b866a8
b3259fc
be9beb5
c5c73aa
f82475e
7359e9a
2df446b
09501aa
87e3bfe
0c32806
142a345
8b9a7f0
d14d005
bbe5b40
49bf1b1
7d8336d
083c51c
4f00ac7
3340239
2d5a888
f1621e7
e606fe5
4d0913a
6261507
954102f
5fc0500
971e770
4ab3465
f9f47ed
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Not sure if this belongs, but adjusting the sampling of
Exemplar
s is likely an aggregator problem. I can write up my thoughts here but I investigated what Prometheus has been up to in this space and I think likely exemplar sampling should be tied to aggregator. If not, we should call it out as a thing users may want to change.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.
@jsuereth Agree. One simple aggregator for exemplars would use an equal-probability reservoir sampler such as Algorithm R. Then, we can apply an
adjusted_count
attribute to each exemplar, and a downstream system can combine exemplars into a data set, which can be used to estimate histograms of the full-cardinality event stream.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.
FYI - regarding attribute key usage in the JVM prototype, I did the following: https://github.com/jsuereth/opentelemetry-java/blob/wip-metrics-api/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/AttributesProcessors.java
There's an
AttributesProcessor
interface that's locked down and provides basic primitives and "join" operations to construct your behavior around altering attributes. Would this meet the specification?Also what does "considered an error" mean in terms of how to handle this scenario? May want to link to error-handling-in-the-sdk section.
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.
In general, the metrics SDK spec would want to give some room to the language clients so they can shoot for higher performance. @reyang to follow up with @jsuereth to change the wording in the spec to give that room.
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.
Filter attributes from the Measurements.
Take extra attributes from Baggage/Context.
Add extra attributes (most likely to be static per view, e.g. "aggregation=MAX").
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.
The error handling part is covered in the next section, I've removed the "... will be considered as error" part here to avoid duplication.
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.
When/where?