-
Notifications
You must be signed in to change notification settings - Fork 572
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exporters/autoexport: add support for signal-specific protocols envir…
…onment variables (#5816) This PR adds support for signal-specific environment variables to configure the OTLP protocol used with the exporter. The following environment variables have been added to configure signal-specific protocols: - `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL` - `OTEL_EXPORTER_OTLP_LOGS_PROTOCOL` - `OTEL_EXPORTER_OTLP_METRICS_PROTOCOL` The package will first attempt to load the protocol for a signal from the corresponding environment variable. If it is not set or is empty, it will try to determine the protocol from `OTEL_EXPORTER_OTLP_PROTOCOL`. If this is also not defined or is empty, it will fall back to `http/protobuf`. **Note for reviewers**: As you'll see in the code, I use my own [env](https://github.com/thomasgouveia/goutils/tree/main/env) package (MIT License) to facilitate environment variable management. If needed, I can backport the used functions into the code here and remove the dependency. Let me know. Closes #5807 --------- Signed-off-by: thomasgouveia <[email protected]> Co-authored-by: Robert Pająk <[email protected]> Co-authored-by: Tyler Yahn <[email protected]>
- Loading branch information
1 parent
fbc3302
commit 5b6a960
Showing
7 changed files
with
114 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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