open-telemetry / open-telemetry/opentelemetry-python
Minor follow-up work after adding extended attributes as the default everywhere
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 19
Description
We don't convert / clean logging body's the way we do attribute values, but I think it makes sense to do something very similar because a logging body is an AnyValue, same as attribute value.
We can cleanup docs/conf.py a bit by removing the AnyValue import / built in override, and instead import AnyValue at runtime in the modules that annotate with it.
One thing that's missing from the spec is if leaf nodes should count towards the max attribute total count, I think that is the intent but it was not clearly documented (see https://github.com/open-telemetry/opentelemetry-python/pull/4587 and https://github.com/open-telemetry/opentelemetry-python/pull/4587) -- I can clarify and clean that up in a follow up PR though, as this one is already pretty big..
Delete stale and unnecessary .pyi file: opentelemetry-sdk/src/opentelemetry/sdk/util/init.pyi -- may need to add type annotations to the corresponding file if they are missing
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 referenced logging implementation in opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/init.py and compare its attribute-value handling with logging bodies. Review docs/conf.py and opentelemetry-sdk/src/opentelemetry/sdk/util/init.pyi for the requested cleanup. Done means body handling follows the intended AnyValue cleanup, the stale type stub is removed or its annotations are preserved, and the documentation configuration no longer needs the listed override.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability-sre
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100