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

Per-instrument metric resources: OK or non-standard? #638

Closed
jmacd opened this issue Apr 14, 2020 · 5 comments
Closed

Per-instrument metric resources: OK or non-standard? #638

jmacd opened this issue Apr 14, 2020 · 5 comments
Labels
area:metrics Part of OpenTelemetry Metrics
Milestone

Comments

@jmacd
Copy link
Contributor

jmacd commented Apr 14, 2020

I was reflecting on how we handle Resources in the metrics pipelines and we haven't added support in the exporters yet. I noticed that we support resources on a per-instrument basis or fall-back to the SDK's resources. I wonder if this is "off spec"? I would note that Prometheus supports "constant labels" which is roughly the same, so maybe it's fine.

The question came about because I'm trying to figure out how to cache the encoding of a resource value in an exporter.

@jmacd jmacd added the area:metrics Part of OpenTelemetry Metrics label Apr 14, 2020
@jmacd
Copy link
Contributor Author

jmacd commented Apr 14, 2020

One of the glaring points is that the api/metric package is importing the sdk/resource package. The API shouldn't have this dependency, so either we move Resource into the API or remove per-instrument resources. I think the spec would say we shouldn't have resources in the API.

@jmacd
Copy link
Contributor Author

jmacd commented Apr 14, 2020

@bogdandrutu Please review.

@bogdandrutu
Copy link
Member

Currently based on the specs there is one resource per SDK instance (metric provider), see here https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/resource/sdk.md#resource-sdk.

@jmacd
Copy link
Contributor Author

jmacd commented Apr 23, 2020

This will happen after #640 is re-done following #651.

@jmacd
Copy link
Contributor Author

jmacd commented Apr 28, 2020

The same has been done in the OTLP protocol.

@jmacd jmacd closed this as completed Apr 28, 2020
@pellared pellared added this to the untracked milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants