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

Additional https:// string added as prefix to values in endpoint variable #19

Closed
AT2406 opened this issue Aug 1, 2024 · 1 comment · Fixed by #20
Closed

Additional https:// string added as prefix to values in endpoint variable #19

AT2406 opened this issue Aug 1, 2024 · 1 comment · Fixed by #20
Assignees
Labels

Comments

@AT2406
Copy link

AT2406 commented Aug 1, 2024

In my job I pull in an ssm parameter which is set to the http exporter endpoint variable, example below.

$ echo $K6_OTEL_HTTP_EXPORTER_ENDPOINT https://otlp.dummyurl.io/

But for some reason when i try to use this when i run my tests in a pipeline it looks like an additional https:// is added to the front of the endpoint when it exists already resulting in the error shown below

time="2024-08-01T08:42:01Z" level=error msg="failed to create OpenTelemetry exporter: parse \"https://https:%2F%2Fotlp.dummyurl.io/v1/metrics\": invalid port \":%2F%2Fotlp.dummyurl.io\" after host"

I have ended up stripping the string from the variable after i get the values from ssm but t might be worth having an if statement that checks for if the passed in value has the https prefix already or not

@mstoykov
Copy link
Contributor

mstoykov commented Aug 6, 2024

Hi @AT2406, thanks for reporting this 🙇

I have looked into this and it seems like any implementaiton where this is done automatically will conflict with K6_OTEL_HTTP_EXPORTER_INSECURE and looking at the code this all comes from how OTEL API and their env variables are defined.

I have opened #20 to at least check for this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants