Added logging instrumentation to enable log - trace correlation (#345)

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.
This commit is contained in:
Owais Lone
2021-03-10 11:22:58 +05:30
committed by GitHub
parent 5f88452b0c
commit 9ef4410fa8
14 changed files with 762 additions and 0 deletions

View File

@ -0,0 +1,7 @@
OpenTelemetry Logging Instrumentation
=====================================
.. automodule:: opentelemetry.instrumentation.logging
:members:
:undoc-members:
:show-inheritance: