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

Implement full http.route setting for FastAPI sub applications #2891

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

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

Copy link

linux-foundation-easycla bot commented Sep 30, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: retrry / name: Tadas Barzdžius (35d2977, 255de61, faf8ca6)
  • ✅ login: emdneto / name: Emídio Neto (73a560e)
  • ✅ login: xrmx / name: Riccardo Magliocchetti (830e55c)

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants