mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-30 05:32:30 +08:00
Request ASGI attributes passed to Sampler (#1762)
* Request ASGI attributes passed to Sampler * Update changelog * aiohttp-client test http.url --------- Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com> Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
This commit is contained in:
@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
([#1733](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1733))
|
||||
- Make Django request span attributes available for `start_span`.
|
||||
([#1730](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1730))
|
||||
- Make ASGI request span attributes available for `start_span`.
|
||||
([#1762](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1762))
|
||||
|
||||
### Fixed
|
||||
|
||||
|
@ -531,15 +531,16 @@ class OpenTelemetryMiddleware:
|
||||
|
||||
span_name, additional_attributes = self.default_span_details(scope)
|
||||
|
||||
attributes = collect_request_attributes(scope)
|
||||
attributes.update(additional_attributes)
|
||||
span, token = _start_internal_or_server_span(
|
||||
tracer=self.tracer,
|
||||
span_name=span_name,
|
||||
start_time=None,
|
||||
context_carrier=scope,
|
||||
context_getter=asgi_getter,
|
||||
attributes=attributes,
|
||||
)
|
||||
attributes = collect_request_attributes(scope)
|
||||
attributes.update(additional_attributes)
|
||||
active_requests_count_attrs = _parse_active_request_count_attrs(
|
||||
attributes
|
||||
)
|
||||
|
Reference in New Issue
Block a user