open-telemetry / open-telemetry/opentelemetry-python
Import error - ImportError: cannot import name 'std_to_otel' from 'opentelemetry._logs'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 19
Description
Describe your environment
OS: Linux
Python version: python3.12
SDK version: 1.25.0
API version: 1.25.0
What happened?
I have OTEL layer auto instrumented lambda in AWS region us-west-2 which uses OTEL layer -
arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-29-0:2
The traces were correctly being sent to OTEL collector -> dynatrace until 21st July, but we noticed no tracing after that.
I checked the logs for CloudWatch and started seeing this error as attached in - log-events-viewer-result.8.csv
log-events-viewer-result (8).csv
We tried updating the lambda layer to the latest version [arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-32-0:2] but still see same issue
Steps to Reproduce
Auto instrumented Lambda python function.
Expected Result
Should be able to see traces in Dynatrace.
Actual Result
No tracing.
Additional context
No response
Would you like to implement a fix?
None
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached CloudWatch log and compare the failing import with the AWS Lambda Python layer versions 1.29.0 and 1.32.0, using the reported Python, API, and SDK versions as context. Done means the auto-instrumented Lambda runs without the ImportError and traces are sent to Dynatrace again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cloud, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100