otel-utils 0.2.1__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of otel-utils might be problematic. Click here for more details.
- {otel_utils-0.2.1 → otel_utils-0.3.0}/PKG-INFO +1 -1
- {otel_utils-0.2.1 → otel_utils-0.3.0}/pyproject.toml +1 -1
- {otel_utils-0.2.1 → otel_utils-0.3.0}/src/otel_utils/logging.py +4 -2
- {otel_utils-0.2.1 → otel_utils-0.3.0}/README.md +0 -0
- {otel_utils-0.2.1 → otel_utils-0.3.0}/src/otel_utils/__init__.py +0 -0
- {otel_utils-0.2.1 → otel_utils-0.3.0}/src/otel_utils/configurator.py +0 -0
- {otel_utils-0.2.1 → otel_utils-0.3.0}/src/otel_utils/metrics.py +0 -0
- {otel_utils-0.2.1 → otel_utils-0.3.0}/src/otel_utils/tracing.py +0 -0
|
@@ -23,8 +23,10 @@ class JsonFormatter(logging.Formatter):
|
|
|
23
23
|
|
|
24
24
|
if hasattr(record, "otelTraceID"):
|
|
25
25
|
log_record["trace_id"] = getattr(record, "otelTraceID")
|
|
26
|
+
log_record["dd.trace_id"] = getattr(record, "otelTraceID")
|
|
26
27
|
if hasattr(record, "otelSpanID"):
|
|
27
28
|
log_record["span_id"] = getattr(record, "otelSpanID")
|
|
29
|
+
log_record["dd.span_id"] = getattr(record, "otelSpanID")
|
|
28
30
|
|
|
29
31
|
for key, value in record.__dict__.items():
|
|
30
32
|
if key not in ignored_attrs and not key.startswith('_'):
|
|
@@ -111,7 +113,7 @@ class StructuredLogger:
|
|
|
111
113
|
self._log(logging.INFO, message, *args, **kwargs)
|
|
112
114
|
|
|
113
115
|
def warning(self, message: str, *args, **kwargs):
|
|
114
|
-
self._log(logging.
|
|
116
|
+
self._log(logging.WARNING, message, *args, **kwargs)
|
|
115
117
|
|
|
116
118
|
def error(self, message: str, *args, **kwargs):
|
|
117
119
|
self._log(logging.ERROR, message, *args, **kwargs)
|
|
@@ -147,4 +149,4 @@ class StructuredLogger:
|
|
|
147
149
|
error=str(e),
|
|
148
150
|
**context
|
|
149
151
|
)
|
|
150
|
-
raise
|
|
152
|
+
raise e
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|