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

OTLP: errors 401 or 404 for the metrics endpoint #291

Closed
mariomac opened this issue Sep 18, 2023 · 3 comments
Closed

OTLP: errors 401 or 404 for the metrics endpoint #291

mariomac opened this issue Sep 18, 2023 · 3 comments
Assignees
Milestone

Comments

@mariomac
Copy link
Contributor

mariomac commented Sep 18, 2023

When using the OTEL_EXPORTER_OTLP_HEADERS environment variable to authenticate the connection to send either metrics and traces to the OTEL endpoint, Beyla sends traces correctly but logs the following message:

2023/09/18 14:03:02 failed to upload metrics: failed to send metrics to https://otlp-gateway-prod-eu-west-0.grafana.net/otlp/v1/metrics: 401 Unauthorized

Also 404 errors have been observed in some versions of the OTEL endpoint.

The cause is that the underlying OpenTelemetry Go library is not accepting the OTEL_EXPORTER_OTLP_HEADERS value for metrics (it works for traces)

Workaround

You can explicitly set the OTEL_EXPORTER_OTLP_METRICS_HEADERS environment variable with the same value as OTEL_EXPORTER_OTLP_HEADERS so Beyla will send the proper headers to the metrics endpoint.

@mariomac mariomac added the bug label Sep 19, 2023
@mariomac mariomac changed the title OTEL_EXPORTER_OTLP_HEADERS does not work for metrics OTLP: errors 401 or 404 for the metrics endpoint Sep 19, 2023
@gouthamve gouthamve added this to the Beyla GA milestone Oct 30, 2023
@mariomac mariomac self-assigned this Nov 14, 2023
@mariomac
Copy link
Contributor Author

Closing, as I can't reproduce it.

@gouthamve gouthamve reopened this Nov 16, 2023
@gouthamve
Copy link
Member

We just reproduced it and found the root-cause. Fix incoming.

@mariomac
Copy link
Contributor Author

Fix: #446

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

No branches or pull requests

2 participants