#support

Issue with Documentation on Logging in Opentelemetry

TLDR tim pointed out an issue with the documentation for logging using opentelemetry. nitya-signoz provided an updated example.

Powered by Struct AI
3
4d
Solved
Join the chat
May 24, 2023 (5 days ago)
tim
Photo of md5-284d9ca30e4a8a4c2a165f5f9a812e09
tim
09:27 PM
Looks like there is an issue with the documentation, https://signoz.io/docs/userguide/collecting_application_logs_otel_sdk_python/ for logging references opentelemetry.sdk._logs.set_log_emitter_provider, which is no longer provider by pentelemetry.sdk._logs
May 25, 2023 (4 days ago)
tim
Photo of md5-284d9ca30e4a8a4c2a165f5f9a812e09
tim
12:03 AM
The reason why logs is in a private module is because logs are still experimental, so apparently the api is changing without warning a lot at this point. Dang.
nitya-signoz
Photo of md5-a52b9d6c34f193d9a1ff940024f36f77
nitya-signoz
04:49 AM
Thanks for mentioning it.

Yes, it seems to be updated. Please look at the latest example here https://github.com/open-telemetry/opentelemetry-python/blob/main/docs/examples/logs/example.py