open-telemetry / open-telemetry/opentelemetry-python

logs: `Overriding of current EventLoggerProvider is not allowed`

Open
#4,335 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
2.6k
Forks
1k
Avg merge
4d 15h
Merged PRs (30d)
19

Description

Describe your environment

OS: Debian 12
Python version: 3.13
SDK version: 1.28.2
API version: 0.49b2

What happened?

Warnings and significant delay at the startup:

Overriding of current EventLoggerProvider is not allowed
https://github.com/open-telemetry/opentelemetry-python/blob/db4ef06f471cb9e94d810ae66964c3e5e0f5e61e/opentelemetry-api/src/opentelemetry/_events/__init__.py#L196-L198

Timeout was exceeded in force_flush().
https://github.com/open-telemetry/opentelemetry-python/blob/db4ef06f471cb9e94d810ae66964c3e5e0f5e61e/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py#L376-L377

Steps to Reproduce
pip install opentelemetry-distro[otlp] opentelemetry-instrumentation
opentelemetry-bootstrap -a install

OTEL_LOGS_EXPORTER=console,otlp
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true

Expected Result

No warnings

Actual Result

Warnings and delay

Additional context

Probalby regression in 0.49b2 version
https://github.com/open-telemetry/opentelemetry-python/pull/4270

Would you like to implement a fix?

None

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 reproducing the warnings and startup delay with the documented installation steps and environment variables. Then inspect the linked EventLoggerProvider code in opentelemetry-api and force_flush code in opentelemetry-sdk, along with the regression referenced in pull request 4270. Done means the reproduction no longer emits either warning or incurs the reported delay.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.