Skip to content

opentelemetry-instrumentation-aiohttp-server: fix span name and http.route attribute according to semconv#4768

Open
xrmx wants to merge 2 commits into
open-telemetry:mainfrom
xrmx:fix-aiohttp-server-span-name
Open

opentelemetry-instrumentation-aiohttp-server: fix span name and http.route attribute according to semconv#4768
xrmx wants to merge 2 commits into
open-telemetry:mainfrom
xrmx:fix-aiohttp-server-span-name

Conversation

@xrmx

@xrmx xrmx commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

Do the method sanitization in the span name and use the canonical path also for http.route instead of the handler name.

Fixes #3222

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • tox -e py310-test-instrumentation-aiohttp-server

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

… according to semconv

Do the method sanitization in the span name and use the canonical path
also for http.route instead of the handler name.
@xrmx xrmx changed the title opentelemetry-instrumentation-aiohttp-server: fix span and http.route according to semconv opentelemetry-instrumentation-aiohttp-server: fix span name and http.route attribute according to semconv Jul 1, 2026
@xrmx xrmx requested a review from a team as a code owner July 1, 2026 10:02
base_url=f"http://{server.host}:{server.port}"
)
# the client is strict about the HTTP methods, for some reason
# QUERY is fine for the client but unrecognized by the server

@xrmx xrmx Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this isn't true on Pypy 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Aiohttp-server instrumentation does not follow semantic conventions about http span name

1 participant