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

Metric Bug Fix: Strip out Query and Fragment in extractAPIPathValue Logic #36

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

jj22ee
Copy link
Contributor

@jj22ee jj22ee commented Aug 29, 2024

Issue #, if available:

  • httpTarget can be of the form /pathname?q=query#fragment.
  • extractAPIPathValue(httpTarget) will include the query or the fragment parts, which we do not want.
  • This isn't caught with the existing unit test (/users/1/pet?query#fragment) because the query+fragment is removed after the extractAPIPathValue Logic splits the slashes.

Description of changes:

  • In this PR, we remove the query and fragment.

Testing:

  • Unit tests
  • Observed removal of query and fragment from Console Span Exporter.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jj22ee jj22ee requested review from pxaws and majanjua-amzn August 29, 2024 02:16
@jj22ee jj22ee requested a review from a team as a code owner August 29, 2024 02:16
@jj22ee jj22ee marked this pull request as draft August 29, 2024 02:33
@jj22ee jj22ee marked this pull request as ready for review August 29, 2024 02:56
@jj22ee jj22ee merged commit 9da4bdf into main Aug 29, 2024
6 checks passed
@jj22ee jj22ee deleted the ignore-query-fragment branch August 29, 2024 17:00
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