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

Draft to change oteltest to use the sdk #2075

Closed
wants to merge 1 commit into from

Conversation

bogdandrutu
Copy link
Member

@bogdandrutu bogdandrutu commented Jul 8, 2021

Fixes #2072

Signed-off-by: Bogdan Drutu bogdandrutu@gmail.com

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
@bogdandrutu
Copy link
Member Author

This PR is to prove how easily an oteltest package can be implemented on top of the SDK, and avoid 1000+ duplicate code lines.

@bogdandrutu bogdandrutu marked this pull request as draft July 8, 2021 18:35
@@ -6,6 +6,7 @@ require (
github.com/google/go-cmp v0.5.6
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/otel/oteltest v1.0.0-RC1
go.opentelemetry.io/otel/sdk v1.0.0-RC1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the API module and MUST NOT depend on any SDK.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API module probably MUST NOT depend on the oteltest :D

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Aneurysm9 if you resolve #2077 then this will go away :D

@MrAlias
Copy link
Contributor

MrAlias commented Jul 9, 2021

One of the intended purposes of the oteltest package is for it to be used by instrumentation authors to test their code. This means that it should not itself depend on the SDK as it will mean any use of it by the instrumentation authors would bring along that dependency. The approach taken here would violate this dependency requirement. Not only would this put a burden on our users to replace the oteltest package, but us as well:

That said, I think it is possible to unify and use the same implementation of a Tracer. It will need to be an implementation that the SDK would also take a dependency on. Meaning we could have an implementation in an internal package that both the sdk and oteltest would use.

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

Successfully merging this pull request may close these issues.

oteltest should use the SDK Tracer implementation to avoid duplicate code, and unexpected bugs
3 participants