mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-08-03 04:10:48 +08:00

This commit adds a new logging instrumentation. The instrumentation patches standard library logging module to inject tracing context variables (otelSpanID, otelTraceID, otelServiceName) into log record objects. It also optionally calls `logging.basicConfig()` and sets a logging format that makes use of these vars if instructed by the user.
22 lines
544 B
ReStructuredText
22 lines
544 B
ReStructuredText
OpenTelemetry logging integration
|
|
=================================
|
|
|
|
|pypi|
|
|
|
|
.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-logging.svg
|
|
:target: https://pypi.org/project/opentelemetry-instrumentation-logging/
|
|
|
|
Installation
|
|
------------
|
|
|
|
::
|
|
|
|
pip install opentelemetry-instrumentation-logging
|
|
|
|
|
|
References
|
|
----------
|
|
|
|
* `OpenTelemetry logging integration <https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/logging/logging.html>`_
|
|
* `OpenTelemetry Project <https://opentelemetry.io/>`_
|