Skip to content

fix(pyramid): add missing http.response.status_code in duration metrics#4448

Open
dominod-dev wants to merge 2 commits intoopen-telemetry:mainfrom
dominod-dev:add_http_response_status_code_pyramid
Open

fix(pyramid): add missing http.response.status_code in duration metrics#4448
dominod-dev wants to merge 2 commits intoopen-telemetry:mainfrom
dominod-dev:add_http_response_status_code_pyramid

Conversation

@dominod-dev
Copy link
Copy Markdown

@dominod-dev dominod-dev commented Apr 16, 2026

Description

The new convention for metrics use http.response.status_code in metrics for http.server.request.duration metric:

https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#metric-httpserverrequestduration

Only the old convention had the attribute for pyramid, but the new one was missing.

Did not touch the changelog as I was not sure if i needed to create an issue first to reference it or if a PR is enough.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

http.responses.status_code was missing from my metrics, this PR fixed it.

A test was added in to check that the attribute is correctly present.

  • tox

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Apr 16, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: dominod-dev / name: Dominod (405d586)
  • ✅ login: herin049 / name: Lukas Hering (5f143e5)

The new convention for metrics use http.response.status_code in metrics for
http.server.request.duration metric:

https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#metric-httpserverrequestduration

Only the old convention had the attribute for pyramid, but the new one was missing.
@dominod-dev dominod-dev force-pushed the add_http_response_status_code_pyramid branch from 38acff5 to 405d586 Compare April 16, 2026 18:43
@github-project-automation github-project-automation Bot moved this to Approved PRs in Python PR digest Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved PRs

Development

Successfully merging this pull request may close these issues.

2 participants