Comments (2)
There is an outstanding RFC on this topic.
https://github.com/open-telemetry/oteps/blob/master/text/0005-global-init.md
This issue is sufficiently complicated that I would invite you to discuss them in the OpenTelemetry-Go SIG at our Thursday meeting (info: https://github.com/open-telemetry/community).
I am familiar with the arguments against package-global state, but we have a conflicting requirement in OTel to support "automatic" instrumentation, which supposes that a library can begin to use instrumentation without explicit dependency injection.
I've argued that support for a globally-registered SDK that is explicitly set once by the application is not the same as package-global state. For one thing, it's not mutable--it's set once at the right time during startup. If you'll ignore the testing use-case, which can be addressed separately.
We agree, too, that you are free to use explicit dependencies and not use the global state. It's permissible to run more than one SDK concurrently, but one of them may be installed as the global default.
We've heard proposals that we use a context lookup instead of a global, which would allow callers to override the default SDK based on context, but if someone uses context.Background()
we think there should be a default installed globally.
from opentelemetry-go.
stale issue.
from opentelemetry-go.
Related Issues (20)
- Upgrade all use of go.opentelemetry.io/otel/semconv to use v1.25.0
- Document instrument name requirements in metric API
- Declare the priority of options and environments on exporters
- Creating repeated Float64ObservableGauge with the same name, but different callbacks the results in only one callback being used HOT 1
- Flaky test `TestBatchProcessor/DroppedLogs` HOT 2
- The global instance holder should only be set once HOT 9
- resource detect function is not parallel and that can cause issues in custom detectors
- global tracers and meters should be identified also by SchemeURL
- Add otlplogfile exporter
- Tracing overhead and memory usage
- Consider using go module paths for scope name in demos HOT 3
- metric: Add example and documentation for synchronous gauge HOT 2
- metric.WithExplicitBucketBoundaries is not working as expected HOT 4
- Interesting bug potential with `pcommon.Map` HOT 3
- Make it easier to add a resource resource.Detector to the SDKs HOT 3
- Add `Logger.Enabled` SDK processing implementation to the specification
- Add an sdk/internal/x package
- Internal logger.Emit delegate never gets loaded HOT 6
- Data Race: exemplars share rand source without synchronization
- Update .golangci.yml HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentelemetry-go.