Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Django request span attributes available #1730

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#1645](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1645))
- Add `excluded_urls` functionality to `urllib` and `urllib3` instrumentations
([#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))

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def process_request(self, request):
carrier_getter = wsgi_getter
collect_request_attributes = wsgi_collect_request_attributes

attributes = collect_request_attributes(carrier)
span, token = _start_internal_or_server_span(
tracer=self._tracer,
span_name=self._get_span_name(request),
Expand All @@ -220,9 +221,9 @@ def process_request(self, request):
),
context_carrier=carrier,
context_getter=carrier_getter,
attributes=attributes,
)

attributes = collect_request_attributes(carrier)
active_requests_count_attrs = _parse_active_request_count_attrs(
attributes
)
Expand Down