-
Notifications
You must be signed in to change notification settings - Fork 562
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 #213
Comments
Optionally, the instrumentation could be configured to accept a These could be useful to an operator if they wanted to separate out functionality. Though, outside of the propagators, I'm not immediately sure why. |
From the SIG meeting today, instrumentation in this repo ...
|
global
package
I'd like to take this up. |
@XSAM yesterday I started a fix for the gocql instrumentation. Did you mind skipping that one? |
@reggiemcdonald Not at all, I will skip that part. |
Maybe we can use |
Yes, wow, that is indeed the correct approach. That was definitely a mistake on my part. 😥 Looks like this mistake was propagated to implementation already. @XSAM if you want to update the existing options that would be awesome, but I feel responsible for this mistake and happy to clean it up myself. Let me know what you think. |
No problem, I would like to update the existing options. It looks like a global replacement command could address that typo. :) |
* add RegisterSimpleSpanProcessor() modeled on stackdriver code * update examples
Currently there are many instrumentation packages that are directly configurable with a
Tracer
orMeter
to use in the telemetry they gather.opentelemetry-go-contrib/instrumentation/go.mongodb.org/mongo-driver/config.go
Line 50 in 32a76fe
opentelemetry-go-contrib/instrumentation/github.com/gin-gonic/gin/option.go
Line 36 in 370078e
opentelemetry-go-contrib/instrumentation/github.com/gorilla/mux/config.go
Line 35 in 370078e
opentelemetry-go-contrib/instrumentation/github.com/labstack/echo/config.go
Line 35 in 370078e
opentelemetry-go-contrib/instrumentation/github.com/emicklei/go-restful/config.go
Line 35 in 19be05c
opentelemetry-go-contrib/instrumentation/github.com/Shopify/sarama/option.go
Line 55 in 70957fc
opentelemetry-go-contrib/instrumentation/github.com/gocql/gocql/config.go
Line 84 in 7066c08
opentelemetry-go-contrib/instrumentation/net/http/config.go
Line 62 in 3fc65dc
opentelemetry-go-contrib/instrumentation/net/http/config.go
Line 70 in 3fc65dc
They should not be configurable to do this. It is the instrumentations job to define the
Tracer
orMeter
they use from a*Provider
.The
global
package was made to provide this functionality. It provides a shim until an SDK is registered that will make sure all instrumentation use the correct*Provider
s. However, since these instrumentation packages are expected to be wrapped in other instrumentation that might want the functionality to use a unique*Provider
and the possible aversion some uses will have with the idea of globals, the instrumentation needs to be configurable to accept*Provider
s instead ofTracer
s andMeter
s directly.TODO
Tracer
andMeter
in the existing instrumentation.TraceProvider
if it uses aTracer
, aMeterProvider
if it uses aMeter
, andPropagators
if it handles any context propagation. The default for each of these needs to be the one provided by theglobal
package.Originally posted by @XSAM in #209 (comment)
The text was updated successfully, but these errors were encountered: