opentelemetry-python icon indicating copy to clipboard operation
opentelemetry-python copied to clipboard

LogDeprecatedInitWarning

Open medaminezghal opened this issue 6 months ago • 3 comments

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.

medaminezghal avatar Jul 17 '25 11:07 medaminezghal

We did also deprecate the Event API but this seems like a small thing we can easily do a fix. Sorry for the warnings.

aabmass avatar Jul 17 '25 16:07 aabmass

@emdneto will take a look

aabmass avatar Jul 17 '25 16:07 aabmass

yeah I just ran into this, too, and will make a comment to PYTHONWARNINGS=ignore until next release. However, since this is a couple months old, is there expectation of a fix on this?

codefromthecrypt avatar Sep 02 '25 22:09 codefromthecrypt