Skip to content

Conversation

@retrry
Copy link

@retrry retrry commented Sep 30, 2024

Description

When using FastAPI sub applications with mount http.route is being set only to the mount point (let's say /v1 or /v2). This is not helpful in settings like Datadog, where http.route is used for metric calculations and it is not great to have to look at attributes to understand full url (you see only GET /v2 in trace name). These changes were tested in my deployments.

Wanted to know opinion if this makes sense, or maybe I am using this instrumentation somewhat incorrectly? If this makes sense - I can write tests and update changelogs before merging.

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

  • Test A

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

linux-foundation-easycla bot commented Sep 30, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@xrmx
Copy link
Contributor

xrmx commented Oct 17, 2024

Please add a test for the changes

@retrry
Copy link
Author

retrry commented Oct 20, 2024

@xrmx the test case was there, needed just to modify assert condition.

@retrry retrry force-pushed the bugfix/http_route_fastapi_sub_app branch from 73a560e to 03a0a4d Compare January 7, 2025 11:49
@retrry retrry closed this Nov 6, 2025
@github-project-automation github-project-automation bot moved this from Ready for review to Done in @xrmx's Python PR digest Nov 6, 2025
@retrry retrry deleted the bugfix/http_route_fastapi_sub_app branch November 6, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants