Skip to content

sdk: use context instead of trace_id,span_id for initializing LogRecord #4653

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

Merged
merged 6 commits into from
Jun 26, 2025

Conversation

emdneto
Copy link
Member

@emdneto emdneto commented Jun 23, 2025

Description

After #4597, every log exported using the upstream SDK will print the following warning:

LogDeprecatedInitWarning: LogRecord init with `trace_id`, `span_id`, and/or `trace_flags` is deprecated. Use `context` instead.
  return LogRecord(
{

Repro: just run python docs/examples/logs/example.py using main branch

@emdneto emdneto requested a review from a team as a code owner June 23, 2025 14:12
@emdneto emdneto force-pushed the fix-logs-warning branch from 586a3d8 to f6bc290 Compare June 24, 2025 22:24
@xrmx xrmx enabled auto-merge (squash) June 26, 2025 14:09
@xrmx xrmx merged commit f73d8fb into open-telemetry:main Jun 26, 2025
353 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants