open-telemetry / open-telemetry/opentelemetry-python

LogDeprecatedInitWarning

Open
#4,687 3 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

opentelemetry.sdk._logs._internal.LogDeprecatedInitWarning: LogRecord init with trace_id, span_id, and/or trace_flags is deprecated since 1.35.0. Use context instead.

I think the emit function should be edited to match the new deprecation warning.

When I use it for test in another package, it fails.

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 at opentelemetry-sdk/src/opentelemetry/sdk/_events/init.py#L48 and compare the emit function with the new deprecation warning described in pull request 4597. Update the behavior so tests using the event logging path no longer trigger the deprecated LogRecord initialization warning, then verify the reported failure is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.