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

Re-add http.target to Django old sem conv server duration metric #2746

Merged
merged 41 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
27e4c2c
Update .pylintrc
lzchen Apr 3, 2024
c6b4c05
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Apr 5, 2024
f690fc8
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Apr 9, 2024
008c36a
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Apr 16, 2024
b36c916
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Apr 22, 2024
2a30d60
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Apr 24, 2024
4cd5349
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen May 13, 2024
5a7b9ad
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen May 22, 2024
b721434
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen May 23, 2024
6ce38bd
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen May 28, 2024
df3275c
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen May 31, 2024
cffc12f
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jun 4, 2024
df80e8a
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jun 5, 2024
71df253
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jun 7, 2024
4c6d52a
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jun 12, 2024
0730c81
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jun 14, 2024
91b16eb
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jun 17, 2024
2b6f107
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jul 3, 2024
d3aee65
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jul 8, 2024
b4f600d
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jul 11, 2024
1796b7c
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jul 15, 2024
c9731e9
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jul 15, 2024
9be1808
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jul 16, 2024
9fd0dac
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jul 18, 2024
3ac2f24
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jul 22, 2024
5993cfd
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jul 24, 2024
477152e
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Jul 26, 2024
4bc7782
fix
lzchen Jul 26, 2024
6034150
cl
lzchen Jul 26, 2024
3ba8d82
Merge branch 'main' into django
emdneto Jul 26, 2024
2df3c90
Update otel_middleware.py
lzchen Jul 29, 2024
cf94d10
Merge branch 'django' of https://github.com/lzchen/opentelemetry-pyth…
lzchen Jul 29, 2024
b9f5a56
Update otel_middleware.py
lzchen Jul 29, 2024
23d09e6
Update otel_middleware.py
lzchen Jul 29, 2024
585b26b
tests
lzchen Jul 29, 2024
1656dc9
lint
lzchen Jul 29, 2024
a9bb406
Update test_middleware.py
lzchen Jul 29, 2024
205fa46
lint
lzchen Jul 29, 2024
1fcbf7c
Merge branch 'main' into django
lzchen Jul 29, 2024
834e967
Merge branch 'main' into django
emdneto Jul 30, 2024
addaf09
Merge branch 'main' into django
lzchen Jul 30, 2024
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Fixed

- `opentelemetry-instrumentation-django` Fix regression - `http.target` re-added back to old semconv duration metrics
([#2746](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2746))

## Version 1.26.0/0.47b0 (2024-07-23)

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ def process_exception(self, request, exception):

# pylint: disable=too-many-branches
# pylint: disable=too-many-locals
# pylint: disable=too-many-statements
def process_response(self, request, response):
if self._excluded_urls.url_disabled(request.build_absolute_uri("?")):
return response
Expand Down Expand Up @@ -426,6 +427,10 @@ def process_response(self, request, response):
duration_attrs_old = _parse_duration_attrs(
duration_attrs, _HTTPStabilityMode.DEFAULT
)
# http.target to be included in old semantic conventions
target = duration_attrs.get(SpanAttributes.HTTP_TARGET)
if target:
duration_attrs_old[SpanAttributes.HTTP_TARGET] = target
self._duration_histogram_old.record(
max(round(duration_s * 1000), 0), duration_attrs_old
)
Expand Down
Loading