-
Notifications
You must be signed in to change notification settings - Fork 626
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
exporting logs is not working #3604
Comments
If you rely on manual instrumentation, you should add OTEL Handler to your logging. See example here https://github.com/open-telemetry/opentelemetry-python/blob/main/docs/examples/logs/example.py. If you rely on auto-instrumentation you should set opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/environment_variables.py Lines 587 to 598 in da48e0b
|
Thank you, I tried OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED, but that did not change anything. And when I add the manual instrumentation I get only the below warning in the logs: "Overriding of current LoggerProvider is not allowed" so no logs either :/ |
I couldn't reproduce this. If you can share simple repo with reproduction steps that would be helpful |
Hi, Here is what I did:
I got the above manual instrumentation to work. But I was not able to get the auto-instrumentation to work. Here is the repo, which includes the Dockerfile and source code if you want to replicate it (don't deploy the CF template as it deploys a bunch of other things as well). |
It respects the log level of your application settings. It is just another handler registered with global that receives the logs and exports. |
Hello, |
I think the logger instrumentation is not present in the lambda distribution https://github.com/open-telemetry/opentelemetry-lambda/blob/main/python/src/otel/otel_sdk/requirements-nodeps.txt |
You shouldn't need the logger instrumentation. Logging is part of the OpenTelemetry SDK. |
Is this still an issue? |
Closing due to inactivity. |
I am trying to get to work traces, metrics and logs via AWS Distro for OpenTelemetry Collector (ADOT Collector), using the following Lambda Layer: arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-python-amd64-ver-1-20-0:3 and Python 3.8.
My understanding is that this version includes OpenTelemetry Python v1.20.0 and ADOT Collector v0.35.0 and should support, trace, metrics and logs as experimental.
The issue seems to be that no matter how I configure otlphttp, the collector does not seem to export logs at all.
Steps to reproduce
Set two environment variables:
AWS_LAMBDA_EXEC_WRAPPER = /opt/otel-instrument
OPENTELEMETRY_COLLECTOR_CONFIG_FILE = /var/task/collector.yml
Update lambda_function.py with below code:
What is the expected behavior?
I would expect to see a similar output in logging for "logs" to what I get for traces and metrics.
What is the actual behavior?
I don't see any log output, only traces and metrics, see below example.
The text was updated successfully, but these errors were encountered: