net-mgmt/telegraf: Add header config to OpenTelemetry output and fix service_address string#5453
Open
tlaerm wants to merge 4 commits into
Open
net-mgmt/telegraf: Add header config to OpenTelemetry output and fix service_address string#5453tlaerm wants to merge 4 commits into
tlaerm wants to merge 4 commits into
Conversation
fichtner
reviewed
May 19, 2026
fichtner
reviewed
May 19, 2026
fichtner
reviewed
May 19, 2026
fichtner
reviewed
May 19, 2026
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.
Important notices
Before you submit a pull request, we ask you kindly to acknowledge the following:
If AI was used, please disclose:
Describe the problem
My OpenTelemetry collector is running on a https endpoint and requires a bearer token to be passed with each ingestion request. With 1.12.14 it is impossible to set this header in the config even though telegraf itself provides for it. see https://github.com/influxdata/telegraf/tree/master/plugins/outputs/opentelemetry
Describe the proposed solution
This PR adds two fields to the OpenTelemetry output config: One for the header name and one for the header value. I considered other formats, maybe even a possibility to add multiple headers but this all seemed overkill and would make the UI and input processing way more complex. This should solve the problem for the vast majority of users.
The other change is an even more trivial fix, adding quotes on the service_address field value as otherwise it does not work with https urls like https://hostname.tld/path/to/collector . The help text now also reflects the correct usage.
Related issue
None, consider it a trivial change.