Support configuration of basic auth for OTLP HTTP exporter. - #5997
Merged
Conversation
jeschkies
requested review from
mstoykov and
oleiade
and removed request for
a team
May 15, 2026 11:00
|
|
jeschkies
temporarily deployed
to
azure-trusted-signing
May 15, 2026 11:06 — with
GitHub Actions
Inactive
jeschkies
temporarily deployed
to
azure-trusted-signing
May 15, 2026 11:07 — with
GitHub Actions
Inactive
mstoykov
approved these changes
Jun 10, 2026
mstoykov
left a comment
Contributor
There was a problem hiding this comment.
LGTM, left a small nit comment on UX
| if cfg.HTTPUsername.Valid { | ||
| auth := []byte(cfg.HTTPUsername.String + ":" + cfg.HTTPPassword.String) | ||
| headers["Authorization"] = fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString(auth)) | ||
| } |
Contributor
There was a problem hiding this comment.
should this require password as well and error if only one present. I guess this might need to happen earlier in the confiugraiton?
oleiade
approved these changes
Jun 11, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
This change adds the option to define
K6_OTEL_HTTP_EXPORTER_USERNAMEandK6_OTEL_HTTP_EXPORTER_PASSWORDto set baisc auth credentials directly.Why?
While it is possible to define an
Authorizationheader viaK6_OTEL_HEADERSit is a bit inconvenient when used through Kubernetes secrets. Eg a secret would have to include the valueAuthorization= Basic <base64(user+":"password)>. It is simpler to pass username and password.Checklist
make check) and all pass.Checklist: Documentation (only for k6 maintainers and if relevant)
Please do not merge this PR until the following items are filled out.