-
Notifications
You must be signed in to change notification settings - Fork 656
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
logs: Overriding of current EventLoggerProvider is not allowed
#4335
Comments
What does "significant delay at startup" mean? The warning is harmless and has already been fixed in #4299 |
About 30 seconds till application starts |
|
Seems like the error message Could you paste a code snippet of what you are instrumenting? |
Yes, delay caused by something else, maybe fastapi/uvicorn implementation.
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
return {"message": "Hello World"} opentelemetry-instrument uvicorn main:app {
"body": "Overriding of current EventLoggerProvider is not allowed",
"severity_number": "<SeverityNumber.WARN: 13>",
"severity_text": "WARN",
"attributes": {
"code.filepath": "/usr/local/lib/python3.13/site-packages/opentelemetry/_events/__init__.py",
"code.function": "_set_event_logger_provider",
"code.lineno": 196
},
"dropped_attributes": 0,
"timestamp": "2024-12-04T08:03:33.858802Z",
"observed_timestamp": "2024-12-04T08:03:33.858842Z",
"trace_id": "0x00000000000000000000000000000000",
"span_id": "0x0000000000000000",
"trace_flags": 0,
"resource": {
"attributes": {
"telemetry.sdk.language": "python",
"telemetry.sdk.name": "opentelemetry",
"telemetry.sdk.version": "1.28.2",
"service.name": "api",
"telemetry.auto.version": "0.49b2"
},
"schema_url": ""
}
}
{
"body": "Timeout was exceeded in force_flush().",
"severity_number": "<SeverityNumber.WARN: 13>",
"severity_text": "WARN",
"attributes": {
"otelSpanID": "0",
"otelTraceID": "0",
"otelTraceSampled": false,
"otelServiceName": "api",
"code.filepath": "/usr/local/lib/python3.13/site-packages/opentelemetry/sdk/_logs/_internal/export/__init__.py",
"code.function": "force_flush",
"code.lineno": 377
},
"dropped_attributes": 0,
"timestamp": "2024-12-04T08:04:04.929736Z",
"observed_timestamp": "2024-12-04T08:04:04.929906Z",
"trace_id": "0x00000000000000000000000000000000",
"span_id": "0x0000000000000000",
"trace_flags": 0,
"resource": {
"attributes": {
"telemetry.sdk.language": "python",
"telemetry.sdk.name": "opentelemetry",
"telemetry.sdk.version": "1.28.2",
"service.name": "api",
"telemetry.auto.version": "0.49b2"
},
"schema_url": ""
}
} |
@aborigeth How you are exporting logs? It looks like you setup to send otlp and console but the otlp receiver is not there? |
As I mentioned above, instrumentation and export works fine (apart from EventLoggerProvider warning) in regular Python application. |
Following because I have the exact same issue. |
@mats-ruell Which one? |
These are my environment variables:
Traces and metrics both work perfectly. I am not getting logs in either console or otlp endpoint. It is also a FastAPI application. |
I have the same problem My config
logs:
|
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
opentelemetry-python/opentelemetry-api/src/opentelemetry/_events/__init__.py
Lines 196 to 198 in db4ef06
Timeout was exceeded in force_flush().
opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py
Lines 376 to 377 in db4ef06
Steps to Reproduce
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
#4270
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: