nucliadb-telemetry 6.9.6.post5453__py3-none-any.whl → 6.9.7.post5550__py3-none-any.whl
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.
- nucliadb_telemetry/fastapi/tracing.py +3 -3
- {nucliadb_telemetry-6.9.6.post5453.dist-info → nucliadb_telemetry-6.9.7.post5550.dist-info}/METADATA +1 -1
- {nucliadb_telemetry-6.9.6.post5453.dist-info → nucliadb_telemetry-6.9.7.post5550.dist-info}/RECORD +5 -5
- {nucliadb_telemetry-6.9.6.post5453.dist-info → nucliadb_telemetry-6.9.7.post5550.dist-info}/WHEEL +0 -0
- {nucliadb_telemetry-6.9.6.post5453.dist-info → nucliadb_telemetry-6.9.7.post5550.dist-info}/top_level.txt +0 -0
|
@@ -28,7 +28,7 @@ from opentelemetry.instrumentation.utils import (
|
|
|
28
28
|
)
|
|
29
29
|
from opentelemetry.propagators.textmap import Getter, Setter
|
|
30
30
|
from opentelemetry.semconv.trace import SpanAttributes
|
|
31
|
-
from opentelemetry.trace import Span, format_trace_id, set_span_in_context
|
|
31
|
+
from opentelemetry.trace import INVALID_SPAN, Span, format_trace_id, set_span_in_context
|
|
32
32
|
from opentelemetry.trace.status import Status, StatusCode
|
|
33
33
|
from opentelemetry.util.http import (
|
|
34
34
|
OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SANITIZE_FIELDS,
|
|
@@ -360,7 +360,7 @@ class OpenTelemetryMiddleware:
|
|
|
360
360
|
class CaptureTraceIdMiddleware(BaseHTTPMiddleware):
|
|
361
361
|
def capture_trace_id(self, response):
|
|
362
362
|
span = trace.get_current_span()
|
|
363
|
-
if span is
|
|
363
|
+
if span is INVALID_SPAN:
|
|
364
364
|
return
|
|
365
365
|
trace_id = format_trace_id(span.get_span_context().trace_id)
|
|
366
366
|
response.headers[NUCLIA_TRACE_ID_HEADER] = trace_id
|
|
@@ -377,8 +377,8 @@ class CaptureTraceIdMiddleware(BaseHTTPMiddleware):
|
|
|
377
377
|
response = None
|
|
378
378
|
try:
|
|
379
379
|
response = await call_next(request)
|
|
380
|
+
return response
|
|
380
381
|
finally:
|
|
381
382
|
if response is not None:
|
|
382
383
|
self.capture_trace_id(response)
|
|
383
384
|
self.expose_trace_id_header(response)
|
|
384
|
-
return response
|
{nucliadb_telemetry-6.9.6.post5453.dist-info → nucliadb_telemetry-6.9.7.post5550.dist-info}/RECORD
RENAMED
|
@@ -17,7 +17,7 @@ nucliadb_telemetry/utils.py,sha256=-cYZxcVIHdR5KAzClr6S4HvBl1yez15BGVkKO__TQh0,4
|
|
|
17
17
|
nucliadb_telemetry/fastapi/__init__.py,sha256=ryR3rUKseYfr6GRfs6-v7u-NTpXw-_v5kYkP71z_Izs,3121
|
|
18
18
|
nucliadb_telemetry/fastapi/context.py,sha256=O2PhwGDtej0AAIVpU5G3_iRkkbpDetsXHaD8buUtLk8,1280
|
|
19
19
|
nucliadb_telemetry/fastapi/metrics.py,sha256=XgP0EEKWlm-lAnvgFSg0nG8kJzXjCgny-Bt4prmFcvI,3672
|
|
20
|
-
nucliadb_telemetry/fastapi/tracing.py,sha256=
|
|
20
|
+
nucliadb_telemetry/fastapi/tracing.py,sha256=f0-JLSUEjC_47rZQsZ90Esfe58SUYnss1LD7EZIAqXU,14820
|
|
21
21
|
nucliadb_telemetry/fastapi/utils.py,sha256=FWyr8odUI2U9e3TUP1onX9xzJgdjEhJUexm8NGL7GoI,2729
|
|
22
22
|
nucliadb_telemetry/tests/__init__.py,sha256=A81KxGC8myNIvXEK0ZSsws8bZtNiwtvgh722sOMhgBM,585
|
|
23
23
|
nucliadb_telemetry/tests/telemetry.py,sha256=34VZcsDP79hHX7qfQL5pcDiuFqfDp4c-XvZv0PMOlXA,12308
|
|
@@ -30,7 +30,7 @@ nucliadb_telemetry/tests/grpc/helloworld_pb2.py,sha256=ht4dmi0pAy6qDrwcjkbtSf_hO
|
|
|
30
30
|
nucliadb_telemetry/tests/grpc/helloworld_pb2.pyi,sha256=mBZCQE6z7riQw6fOegJgZ5lHmXqO23_zxL8iQMqSqms,1191
|
|
31
31
|
nucliadb_telemetry/tests/grpc/helloworld_pb2_grpc.py,sha256=_jxUNxl4Fx-JztK9RO5R6osjNP2sVNVPAxLnmczEYOc,2677
|
|
32
32
|
nucliadb_telemetry/tests/grpc/helloworld_pb2_grpc.pyi,sha256=Y6teCx-PhPU-rI6w5ItLBKaTb34FLpngPnuDVWtNve4,958
|
|
33
|
-
nucliadb_telemetry-6.9.
|
|
34
|
-
nucliadb_telemetry-6.9.
|
|
35
|
-
nucliadb_telemetry-6.9.
|
|
36
|
-
nucliadb_telemetry-6.9.
|
|
33
|
+
nucliadb_telemetry-6.9.7.post5550.dist-info/METADATA,sha256=bNnXjDXBpgn7wGNnx_pIOaA2KbZkqSpjjRaI6ypZphA,10937
|
|
34
|
+
nucliadb_telemetry-6.9.7.post5550.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
35
|
+
nucliadb_telemetry-6.9.7.post5550.dist-info/top_level.txt,sha256=3qEHI_5ttqQIL2gkNYwSlKsFyBBiEzDiIy9UKISzOaQ,19
|
|
36
|
+
nucliadb_telemetry-6.9.7.post5550.dist-info/RECORD,,
|
{nucliadb_telemetry-6.9.6.post5453.dist-info → nucliadb_telemetry-6.9.7.post5550.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|