LogRecord deprecation warning with no replacement
Hello, our users are seeing hundreds of these warnings in their logs:
2025-10-21 09:10:49.495 UTC - [INFO] - /foo/bar/baz.py:52: LogDeprecatedInitWarning: LogRecord will be removed in 1.39.0 and replaced by ReadWriteLogRecord and ReadableLogRecord
2025-10-21 09:10:49.495 UTC - [INFO] - return LogRecord(
We're already on 1.38, and neither ReadWriteLogRecord or ReadableLogRecord appear to exist in this repository. (Furthermore, it looks like the warning is only meant to fire once? But maybe that's something going wrong on our side.)
Apologies if I've missed something, but how are users meant to resolve this? I don't feel very professional even silencing the warnings for now, because 1.39 is the next minor version so there's no logical point for me to surface an internal warning based on a check the otel version - I'd have only allowed the supresssion until 1.38. As well as this, are we striking the right balance with warning noise? It seems fairly non-standard to deprecate something before the replacement is available.
Thanks in advance, Tom
I realise that opentelemetry.sdk._logs is not part of the public API, and as such is not covered by the framework's impressive versioning and stability policies?
I'll see if we can remove all usage of LogRecord from our consuming code.
The PRs that will make the changes are linked in this issue: https://github.com/open-telemetry/opentelemetry-python/issues/4750
The idea of the warning is that if you are using some of the stuff that is getting warnings stick with a fixed version of opentelemetry for the moment or be ready to update some code.
@tmct We merged the breaking changes on main, would be great if you can take a look
@tmct 1.39.0 is out, would be great if you can test it and provide feedback. Thanks!
We're experiencing the same warnings on opentelemetry-api==1.39.0 and opentelemetry-sdk==1.39.0
Are these warnings expected to persist in 1.39.0, or should they have been resolved? The release notes mention breaking changes for LogRecord, but the internal initialization code still seems to be triggering these deprecation warnings.