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

Verify compliant metric SDK specification implementation: MeterProvider #3640

Closed
2 tasks done
Tracked by #3674
MrAlias opened this issue Feb 3, 2023 · 5 comments
Closed
2 tasks done
Tracked by #3674
Assignees
Labels
area:metrics Part of OpenTelemetry Metrics pkg:SDK Related to an SDK package

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Feb 3, 2023

  • Identify the normative requirements from the top level MeterProvider section of the specification:

    A MeterProvider MUST provide a way to allow a Resource to be specified. If a Resource is specified, it SHOULD be associated with all the metrics produced by any Meter from the MeterProvider. The tracing SDK specification has provided some suggestions regarding how to implement this efficiently.

  • Ensure the current metric SDK implementation is compliant with these normative requirements, recommendations, and options in those comments.

@MrAlias MrAlias converted this from a draft issue Feb 3, 2023
@MrAlias MrAlias added pkg:SDK Related to an SDK package area:metrics Part of OpenTelemetry Metrics labels Feb 3, 2023
@pellared pellared self-assigned this May 29, 2023
@pellared pellared moved this from Todo to In Progress in Go: Metric SDK (GA) May 29, 2023
@pellared
Copy link
Member

pellared commented May 29, 2023

A MeterProvider MUST provide a way to allow a Resource to be specified.

It is possible by using metric.NewMeterProvider with metric.WithResource passed as a parameter.

@pellared
Copy link
Member

pellared commented May 29, 2023

If a Resource is specified, it SHOULD be associated with all the metrics produced by any Meter from the MeterProvider.

I could not a failed to find a unit test that ensures that this is implemented. I created #4144

This is tested by a TestPipelineUsesResource.

@pellared
Copy link
Member

The tracing SDK specification has provided some suggestions regarding how to implement this efficiently.

This is not normative.

@pellared
Copy link
Member

pellared commented May 29, 2023

It looks like we comply with this fragment of the specification.

@MrAlias Can you please double-check and close if you agree with my verification?

@MrAlias
Copy link
Contributor Author

MrAlias commented May 30, 2023

LGTM 👍

@MrAlias MrAlias closed this as completed May 30, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Go: Metric SDK (GA) May 30, 2023
@MrAlias MrAlias added this to the v1.17.0/v0.40.0 milestone Aug 3, 2023
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 pkg:SDK Related to an SDK package
Projects
No open projects
Development

No branches or pull requests

2 participants