open-telemetry / open-telemetry/opentelemetry-python

Allow resetting global providers

Open
#4,557 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api enhancement feature-request
Dominant language
Python
Stars
2.6k
Forks
1k
Avg merge
4d 15h
Merged PRs (30d)
19

Description

Some frameworks do some questionable things, like setting global OTel provider to export telemetry to their own destination e.g.
https://github.com/Chainlit/chainlit/blob/6ec007032945dfd6a1a608cc3c8074bd2f643d0c/backend/chainlit/telemetry.py#L65

It must be possible to override their configuration. Currently once global tracer/metrics/logs provider is set, there is no way to override it.

Related: https://github.com/Chainlit/chainlit/issues/2127

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the global tracer, metrics, and logs providers are set and determine where the current one-time configuration is enforced. Review the Chainlit telemetry example and related issue for the overriding use case; done means applications can replace an existing global provider configuration without breaking provider access.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, observability-sre
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.