Add log formatting support by jeremydvoss · Pull Request #4166 · open-telemetry/opentelemetry-python
xrmx approved these changes Sep 4, 2024
This was referenced
Sep 25, 2024chrisburr added a commit to chrisburr/diracx that referenced this pull request
Mar 25, 2026…28.0 Since opentelemetry-sdk v1.28.0 (open-telemetry/opentelemetry-python#4166), LoggingHandler._translate() calls self.format(record) when a formatter is set. The existing formatter uses %(otelTraceID)s placeholders but set_logging_format=False meant the LoggingInstrumentor never injected those attributes, causing a KeyError at runtime.
chrisburr added a commit to chrisburr/diracx that referenced this pull request
Mar 25, 2026…28.0 Since opentelemetry-sdk v1.28.0 (open-telemetry/opentelemetry-python#4166), LoggingHandler._translate() calls self.format(record) when a formatter is set. The existing formatter uses %(otelTraceID)s placeholders but set_logging_format=False meant the LoggingInstrumentor never injected those attributes, causing a KeyError at runtime.
chrisburr added a commit to chrisburr/diracx that referenced this pull request
Mar 25, 2026…28.0 Since opentelemetry-sdk v1.28.0 (open-telemetry/opentelemetry-python#4166), LoggingHandler._translate() calls self.format(record) when a formatter is set. The existing formatter uses %(otelTraceID)s placeholders but set_logging_format=False meant the LoggingInstrumentor never injected those attributes, causing a KeyError at runtime.
fstagni pushed a commit to DIRACGrid/diracx that referenced this pull request
Mar 26, 2026) * chore: importlib-metadata should be constrained on diracx-routers * fix: Force importlib-metadata = "<8.8.0" due to https://pixi.sh/latest/concepts/conda_pypi/#pinned-package-conflicts * fix: enable OTel log record injection to avoid KeyError with sdk >=1.28.0 Since opentelemetry-sdk v1.28.0 (open-telemetry/opentelemetry-python#4166), LoggingHandler._translate() calls self.format(record) when a formatter is set. The existing formatter uses %(otelTraceID)s placeholders but set_logging_format=False meant the LoggingInstrumentor never injected those attributes, causing a KeyError at runtime. * chore: replace container base images with pixi-managed environments * ci: Simplify running legacy DIRAC integration tests * test: correct verify_entry_points to handle extensions and duplicate names * ci: improve debugging output of legacy integration tests --------- Co-authored-by: Christophe Haen <christophe.haen@cern.ch>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters