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

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

Closed
omervk opened this issue Sep 19, 2023 · 1 comment · Fixed by #156
Labels
status: oncall Flagged for awareness from Honeycomb Telemetry Oncall type: enhancement New feature or request

Comments

@omervk
Copy link

omervk commented Sep 19, 2023

Hey y'all 👋🏻
Thanks for the great bootstrapping library :)

Is your feature request related to a problem? Please describe.

I tried instantiating HoneycombOptions with https://<collector url>/v1/traces and got unhelpful error messages and no traces exported.

Describe the solution you'd like

If I instantiate HoneycombOptions with an endpoint that ends with /v1/traces and exporter_protocol=EXPORTER_PROTOCOL_HTTP_PROTO, do not append that suffix again.

Describe alternatives you've considered

An alternative is to warn users that they're providing an invalid value to the field.

@omervk omervk added the type: enhancement New feature or request label Sep 19, 2023
@JamieDanielson JamieDanielson added the status: oncall Flagged for awareness from Honeycomb Telemetry Oncall label Sep 20, 2023
@MikeGoldsmith
Copy link
Contributor

Thanks for raising @omervk - I've got a fix incoming 👍🏻

vreynolds pushed a commit that referenced this issue Sep 22, 2023
## 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.

- Closes #155 

## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: oncall Flagged for awareness from Honeycomb Telemetry Oncall type: enhancement New feature or request
Projects
None yet
3 participants