This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
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.
Specify the mapping for Prometheus and Statsd exporters #118
Specify the mapping for Prometheus and Statsd exporters #118
Changes from 3 commits
c0f3d58
8600429
709299a
0839413
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.
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 see potentially two different people reading this table: an OpenTelemetry developer writing an exporter for prometheus, and an existing Prometheus instrumentation author looking to migrate to OpenTelemetry instrumentation.
This table seems to serve the the former well, but I'm not sure it is clear for the latter as to what they need to do. Guessing there would like a more explicit mapping between Prometheus type and OTel Instrument. I'm guessing the one-to-many mapping might be a bit overwhelming.
Is this something we can assume Prometheus instrumentation writers can work out (i.e. become familiar with synchronicity, precomputed sums, and additive/grouping)?
Is this something for a different PR?
Could this be added in a subsequent table?
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 notes say that LastValue will be exposed as a Gauge. Is the idea that we will throw away the other non-LastValue (Min/Max/Sum/Count) aggregations by default?
I would have thought a more natural default would be for each of these aggregations to be represented as a separate Gauge, otherwise we are aggregating that data just to throw it away - i.e.
That would obviously have some implications for the mapping from Prometheus -> OT -> Prometheus that I'm not too sure how to address.
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.
What you propose is a viable export strategy, I just don't believe it's the one most Prometheus users want or expect. This is what the Prometheus "Summary" metric exports, approximately. If we replaced "metricname_last" with just "metricname" that would create less confusion for Prometheus users, but they might not appreciate the cost of indexing new metric names that they never wanted.
It would be more optimal, but much more complex, to try to match the default aggregation to the configured exporter. If an OTLP exporter is configured, then the question becomes recursive. What aggregation should I use to satisfy a downstream exporter? That would create a headache at startup.
The idea of adding an optimization (#117) to store a single value when there is in fact a single value, was meant to address some of the concern about throwing away information. I believe some platforms want to see min/max/sum/count and would not like to force users of those systems to reconfigure the aggregation.
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.
Makes sense. Thanks for the detailed explanation
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.
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 not following the meaning here. Maybe?
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.