Skip to content

Commit d17ca4c

Browse files
Request ASGI attributes passed to Sampler
1 parent d01c96f commit d17ca4c

File tree

1 file changed

+3
-2
lines changed
  • instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi

1 file changed

+3
-2
lines changed

instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -531,15 +531,16 @@ async def __call__(self, scope, receive, send):
531531

532532
span_name, additional_attributes = self.default_span_details(scope)
533533

534+
attributes = collect_request_attributes(scope)
535+
attributes.update(additional_attributes)
534536
span, token = _start_internal_or_server_span(
535537
tracer=self.tracer,
536538
span_name=span_name,
537539
start_time=None,
538540
context_carrier=scope,
539541
context_getter=asgi_getter,
542+
attributes=attributes,
540543
)
541-
attributes = collect_request_attributes(scope)
542-
attributes.update(additional_attributes)
543544
active_requests_count_attrs = _parse_active_request_count_attrs(
544545
attributes
545546
)

0 commit comments

Comments
 (0)