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

Add SDK integration testing framework #3031

Closed
1 task
MrAlias opened this issue Jul 19, 2022 · 8 comments
Closed
1 task

Add SDK integration testing framework #3031

MrAlias opened this issue Jul 19, 2022 · 8 comments
Labels
area:metrics Part of OpenTelemetry Metrics pkg:SDK Related to an SDK package

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Jul 19, 2022

Complete the sdk/metric/metrictest package.

  • Create a testing framework to end-to-end test the SDK
    • Needs to be extensible. When new aggregators or interfaces are added the SDK it should not be challenging to test their addition.
    • Test all functionality the metric API will send to the SDK
    • Test the configuration of the SDK
@MrAlias
Copy link
Contributor Author

MrAlias commented Oct 28, 2022

This issues is referenced by open-telemetry/opentelemetry-go-contrib#2755, open-telemetry/opentelemetry-go-contrib#2757, open-telemetry/opentelemetry-go-contrib#2759, and open-telemetry/opentelemetry-go-contrib#2761 as adding integration testing utilities. It is not defined to accomplish this.

I'm going to create a separate issue to address that.

@MrAlias
Copy link
Contributor Author

MrAlias commented Oct 28, 2022

I wonder if this issue can't be moved to the post-GA project?

We can add an sdk/metric/internal/metrictest package post 1.0 that builds out the integration testing of the SDK. If another SDK requests access to that package we could then "stabilize" it by moving it to sdk/metric/metrictest.

The downside to delaying this is that it will likely never get done. Putting off adding tests for later is a good way to ensure they are never created.

MrAlias added a commit to MrAlias/opentelemetry-go that referenced this issue Oct 28, 2022
@MrAlias
Copy link
Contributor Author

MrAlias commented Oct 28, 2022

Moving to the "Metric SDK (GA)" project. We should complete this prior to releasing a GA, but should also wait for the SDK to stabilize in the beta release so we don't churn updating the developed tests.

@joshcarp
Copy link

joshcarp commented Nov 1, 2022

Hello. I came across the go.opentelemetry.io/otel/sdk/metric/[email protected] and I was wondering why it got removed because there doesn't seem to be any alternative and there seems to be some repos already using it

@MrAlias
Copy link
Contributor Author

MrAlias commented Nov 1, 2022

Hello. I came across the go.opentelemetry.io/otel/sdk/metric/[email protected] and I was wondering why it got removed because there doesn't seem to be any alternative and there seems to be some repos already using it

It was built against the v0.31.0 SDK which was replaced in v0.32.0. Use a manual reader and the metricdatatest package to test expected metric values: #3407

@MrAlias
Copy link
Contributor Author

MrAlias commented Feb 2, 2023

Unit testing metric instrumentation can be accomplished using a manual reader and the metricdatatest package.

Having a full "test suite" would duplicate much of the dedicated testing we already have built for our SDK. Closing as it will not be useful way to spend development effort to further this project in building testing we already have but making it generic for other SDKs.

@MrAlias MrAlias closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in Go: Metric SDK (GA) Feb 2, 2023
@krak3n
Copy link

krak3n commented Apr 19, 2023

@MrAlias is there an example of how to do this?

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

4 participants