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

maint: Don’t append OTLP signal paths if already present #156

Merged
merged 4 commits into from
Sep 22, 2023

Conversation

MikeGoldsmith
Copy link
Contributor

Which problem is this PR solving?

If an HTTP endpoint for traces or metrics already includes the signal path (eg /v1/traces or /v1/metrics), the path is added a second time (eg http://somewhere.com/v1/traces becomes http://somewhere.com/v1/traces/v1/traces).

The path should only be added if it doesn't already exist.

Short description of the changes

  • Update options.get_traces_endpoint and options.get_metrics_endpoint to check if the endpoint already ends with the signal path before adding it
  • Add tests to verify behaviour

How to verify that this has the expected result

You can now use an endpoint with a signal path and the signal path won't be added twice.

@MikeGoldsmith MikeGoldsmith added the type: bug Something isn't working label Sep 21, 2023
@MikeGoldsmith MikeGoldsmith requested a review from a team September 21, 2023 13:29
@MikeGoldsmith MikeGoldsmith self-assigned this Sep 21, 2023
@vreynolds vreynolds added the version: bump patch A PR with release-worthy changes and is backwards-compatible. label Sep 22, 2023
@vreynolds vreynolds merged commit 9bc3f9a into main Sep 22, 2023
3 checks passed
@vreynolds vreynolds deleted the mike/otlp-path-exists branch September 22, 2023 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working version: bump patch A PR with release-worthy changes and is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When creating HoneycombOptions, do not append /v1/traces to traces_endpoint if it's already there
2 participants