Skip to content
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

Revert #5308? #5437

Closed
trask opened this issue May 9, 2023 · 6 comments
Closed

Revert #5308? #5437

trask opened this issue May 9, 2023 · 6 comments

Comments

@trask
Copy link
Member

trask commented May 9, 2023

Heads up, based on specification meeting discussion today, I'm proposing in open-telemetry/opentelemetry-specification#3493:

Do not use total

Counters have _total appended to their names when they are mapped to Prometheus, which would lead to _total_total. The reason that the Prometheus mapping cannot suppress adding the duplicate _total is because then the mapping wouldn't be bidirectional.

@jack-berg
Copy link
Member

I still think #5308 is a justifiable change, since as mentioned here, the prometheus client does the same check. I think we should wait for the prometheus compatibility doc to explicitly disallow this before we revert.

@trask
Copy link
Member Author

trask commented May 9, 2023

@jsuereth described the problem with this kind of non-bidirectional mapping on the spec call:

with #5308: xyz_total -> SDK (prom endpoint) -> Collector scraping --> OTLP --> xyz 🚫

without #5308: xyz_total -> SDK (prom endpoint) -> Collector scraping --> OTLP --> xyz_total 🟢

@jack-berg
Copy link
Member

Ah, interesting. It's an unusual use case, since if you're going to the collector you'd almost certainly prefer OTLP to maximize data integrity. Using prometheus as an intermediate representation in a pipeline that terminates in OTLP has a simple solution - don't use the prometheus format! 😁

Interested in what @ShadowySpirits and @dashpole think about this. Tried to get @dashpole to chime in before #5308, but I think he's on leave.

@jack-berg
Copy link
Member

@dashpole check out this additional argument for double appending _total.

@dashpole
Copy link
Contributor

IMO the duplicate _total is worse than not round-tripping. But this is also made moot if we don't strip total in the prometheus receiver anymore: open-telemetry/wg-prometheus#72

@jack-berg
Copy link
Member

Closing this now that the spec has clarified that implementations should not add duplicate suffixes: open-telemetry/opentelemetry-specification#3581

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants