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

Bugfix: fail if the OTEL URLs does not include a schema #111

Merged
merged 1 commit into from
May 16, 2023

Conversation

mariomac
Copy link
Contributor

If you didn't include the schema in the Metrics/Traces, endpoint, the autoinstrumenter started normally but then couldn't send metrcis/traces, showing this error in the logs.

2023/05/15 10:32:30 Post "https:///v1/metrics": http: no Host in request URL

This was caused by a URL like foo:8080 being parsed with foo as schema and no hostname.

This PR will cause the autoinstrumenter to fail at startup so the user can realize faster that the configuration is wrong.

@mariomac mariomac requested a review from grcevski as a code owner May 15, 2023 11:09
Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice catch.

@mariomac mariomac merged commit 02bb8af into grafana:main May 16, 2023
3 checks passed
@mariomac mariomac deleted the fail-url branch May 16, 2023 13:40
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.

None yet

2 participants