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

Consider exporting the tracer map in go.opentelemetry.io/contrib/internal/trace #218

Closed
reggiemcdonald opened this issue Aug 13, 2020 · 1 comment
Labels
area: testing Related to package testing enhancement New feature or request

Comments

@reggiemcdonald
Copy link
Contributor

reggiemcdonald commented Aug 13, 2020

The current mock trace provider stores a map of the tracers created, but it isnt exported:

type Provider struct {
tracersLock sync.Mutex
tracers map[string]*Tracer
}

As we shift to using WithTraceProvider options (#213), it would be helpful to export the tracer map in the provider struct of the mocktrace package (go.opentelemetry.io/contrib/internal/trace).

As it stands, you cannot type cast the trace.Tracer returned from the mock provider to the concrete mocktrace.Tracer type.
Thus, we cannot access any of the convenience functions such as mocktrace.Tracer.EndedSpans()

@MrAlias MrAlias added area: testing Related to package testing enhancement New feature or request release:after-ga labels Aug 14, 2020
plantfansam referenced this issue in plantfansam/opentelemetry-go-contrib Mar 18, 2022
@MrAlias
Copy link
Contributor

MrAlias commented Nov 2, 2022

Closing, stale.

@MrAlias MrAlias closed this as completed Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: testing Related to package testing enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants