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

Unify instrumentation *Provider options #303

Merged
merged 19 commits into from
Sep 1, 2020

Conversation

XSAM
Copy link
Member

@XSAM XSAM commented Aug 26, 2020

Resolves #213

@XSAM
Copy link
Member Author

XSAM commented Aug 26, 2020

I encounter a problem that beego cannot use its instrumentation name since it uses net/http instrumentation as its internal implements.

httpOptions := []otelhttp.Option{
otelhttp.WithTracerProvider(cfg.traceProvider),
otelhttp.WithMeterProvider(cfg.meterProvider),
otelhttp.WithPropagators(cfg.propagators),
}


Should we add a option WithInstrumentationName for net/http to temporary change its instrumentation name when initial?

@MrAlias
Copy link
Contributor

MrAlias commented Aug 26, 2020

I encounter a problem that beego cannot use its instrumentation name since it uses net/http instrumentation as its internal implements.

httpOptions := []otelhttp.Option{
otelhttp.WithTracerProvider(cfg.traceProvider),
otelhttp.WithMeterProvider(cfg.meterProvider),
otelhttp.WithPropagators(cfg.propagators),
}

Should we add a option WithInstrumentationName for net/http to temporary change its instrumentation name when initial?

No, I don't think that is needed. This sounds like the correct behavior. It should be the library that is providing the instrumentation that is the name of the tracer. I think the way it is setup is correct based on my understanding of the OpenTelemetry specification.

Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

Looks good overall. Mostly question about naming and keeping around old Tracer fields.

instrumentation/README.md Outdated Show resolved Hide resolved
instrumentation/github.com/astaxie/beego/config.go Outdated Show resolved Hide resolved
instrumentation/github.com/astaxie/beego/go.mod Outdated Show resolved Hide resolved
instrumentation/github.com/emicklei/go-restful/config.go Outdated Show resolved Hide resolved
instrumentation/github.com/emicklei/go-restful/config.go Outdated Show resolved Hide resolved
instrumentation/github.com/gorilla/mux/config.go Outdated Show resolved Hide resolved
instrumentation/github.com/labstack/echo/config.go Outdated Show resolved Hide resolved
instrumentation/go.mongodb.org/mongo-driver/config.go Outdated Show resolved Hide resolved
instrumentation/net/http/config.go Outdated Show resolved Hide resolved
instrumentation/net/http/config_test.go Outdated Show resolved Hide resolved
@MrAlias
Copy link
Contributor

MrAlias commented Aug 26, 2020

Related: open-telemetry/opentelemetry-go#1101

@XSAM XSAM force-pushed the chore/unify-instrumentation branch from 864a47c to 92c9f76 Compare August 27, 2020 05:35
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the detailed work 😄

Only requests are to unexport Tracers and Meters, but this could be a follow on PR.

instrumentation/net/http/config.go Show resolved Hide resolved
MrAlias added a commit to MrAlias/opentelemetry-go that referenced this pull request Aug 28, 2020
@XSAM XSAM force-pushed the chore/unify-instrumentation branch from dd16abc to d82cf32 Compare August 31, 2020 02:55
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

🚀

@MrAlias MrAlias mentioned this pull request Sep 1, 2020
7 tasks
@MrAlias MrAlias merged commit faaf7c0 into open-telemetry:master Sep 1, 2020
@XSAM XSAM deleted the chore/unify-instrumentation branch September 2, 2020 02:37
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.

Unify instrumentation *Provider options
4 participants