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

Create metric SDK testing utilities for instrumentation #3407

Closed
1 task
MrAlias opened this issue Oct 28, 2022 · 3 comments
Closed
1 task

Create metric SDK testing utilities for instrumentation #3407

MrAlias opened this issue Oct 28, 2022 · 3 comments
Labels
area:metrics Part of OpenTelemetry Metrics pkg:SDK Related to an SDK package pkg:testing Related to testing or a testing package
Milestone

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Oct 28, 2022

Similar to the go.opentelemetry.io/otel/sdk/trace/tracetest package, testing utilities need to be created for the metric SDK.

Blocks:

Proposal

  • Provide a Reader implementation that allows instrumentation to easily assert the expected metric data was collected. The metricdatatest package already provides exported data comparison, the Reader would only need to facilitate collection and transfer of that data.
@MrAlias
Copy link
Contributor Author

MrAlias commented Oct 28, 2022

This might be as simple as having instrumentation use a manual reader.

@MrAlias
Copy link
Contributor Author

MrAlias commented Oct 31, 2022

Verified, the manual reader can be used as a functional testing utility alongside the metricdatatest package: open-telemetry/opentelemetry-go-contrib@092a97c

No need for an additional package.

@MrAlias MrAlias closed this as completed Oct 31, 2022
Repository owner moved this from Todo to Done in Go: Metric SDK (Beta) Oct 31, 2022
@bmon
Copy link
Contributor

bmon commented Nov 1, 2022

Verified, the manual reader can be used as a functional testing utility alongside the metricdatatest package: open-telemetry/opentelemetry-go-contrib@092a97c

Thank you very much for this link, I hadn't quite joined the dots here, the example test is really helpful!

@XSAM XSAM added this to the untracked milestone Nov 7, 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 pkg:SDK Related to an SDK package pkg:testing Related to testing or a testing package
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants