GithubHelp home page GithubHelp logo

Comments (2)

jmacd avatar jmacd commented on July 18, 2024

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.

rghetia avatar rghetia commented on July 18, 2024

stale issue.

from opentelemetry-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.