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

add headers_list support, similar to attributes_list #122

Merged
merged 3 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions examples/kitchen-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ logger_provider:
# Environment variable: OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_LOGS_HEADERS
headers:
api-key: "1234"
# Configure headers. Entries have lower priority than entries from .headers.
#
# The value is a list of comma separated key-value pairs, matching the format of OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_LOGS_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.
headers_list: "api-key=1234"
# Configure compression.
#
# Environment variable: OTEL_EXPORTER_OTLP_COMPRESSION, OTEL_EXPORTER_OTLP_LOGS_COMPRESSION
Expand Down Expand Up @@ -187,6 +191,10 @@ meter_provider:
# Environment variable: OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_METRICS_HEADERS
headers:
api-key: !!str 1234
# Configure headers. Entries have lower priority than entries from .headers.
#
# The value is a list of comma separated key-value pairs, matching the format of OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_METRICS_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.
headers_list: "api-key=1234"
# Configure compression.
#
# Environment variable: OTEL_EXPORTER_OTLP_COMPRESSION, OTEL_EXPORTER_OTLP_METRICS_COMPRESSION
Expand Down Expand Up @@ -314,6 +322,10 @@ tracer_provider:
# Environment variable: OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_TRACES_HEADERS
headers:
api-key: !!str 1234
# Configure headers. Entries have lower priority than entries from .headers.
#
# The value is a list of comma separated key-value pairs, matching the format of OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_TRACES_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.
headers_list: "api-key=1234"
# Configure compression.
#
# Environment variable: OTEL_EXPORTER_OTLP_COMPRESSION, OTEL_EXPORTER_OTLP_TRACES_COMPRESSION
Expand Down
13 changes: 12 additions & 1 deletion examples/sdk-migration-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
# - OTEL_EXPORTER_OTLP_CERTIFICATE
# - OTEL_EXPORTER_OTLP_CLIENT_KEY
# - OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE
# - OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_{SIGNAL}_HEADERS
# - OTEL_EXPORTER_OTLP_COMPRESSION
# - OTEL_EXPORTER_OTLP_TIMEOUT

Expand Down Expand Up @@ -98,6 +97,10 @@ tracer_provider:
timeout: ${OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:-10000}
# Configure headers:
headers: {}
# Configure headers. Entries have lower priority than entries from .headers.
#
# The value is a list of comma separated key-value pairs, matching the format of OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_TRACES_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.
headers_list: ${OTEL_EXPORTER_OTLP_TRACES_HEADERS}
# Configure span limits. See also attribute_limits.
limits:
# Configure max span attribute value size. Overrides attribute_limits.attribute_value_length_limit.
Expand Down Expand Up @@ -167,6 +170,10 @@ meter_provider:
timeout: ${OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:-10000}
# Configure headers:
headers: {}
# Configure headers. Entries have lower priority than entries from .headers.
#
# The value is a list of comma separated key-value pairs, matching the format of OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_METRICS_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.
headers_list: "{OTEL_EXPORTER_OTLP_METRICS_HEADERS}"
# Configure temporality preference.
temporality_preference: ${OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:-cumulative}
# Configure default histogram aggregation.
Expand Down Expand Up @@ -206,6 +213,10 @@ logger_provider:
timeout: ${OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:-10000}
# Configure headers:
headers: {}
# Configure headers. Entries have lower priority than entries from .headers.
#
# The value is a list of comma separated key-value pairs, matching the format of OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_LOGS_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.
headers_list: "{OTEL_EXPORTER_OTLP_LOGS_HEADERS}"
# Configure log record limits. See also attribute_limits.
limits:
# Configure max log record attribute value size. Overrides attribute_limits.attribute_value_length_limit.
Expand Down
3 changes: 3 additions & 0 deletions schema/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"headers": {
"$ref": "#/$defs/Headers"
},
"headers_list": {
"type": ["string", "null"]
},
"compression": {
"type": ["string", "null"]
},
Expand Down
3 changes: 3 additions & 0 deletions schema/meter_provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@
"headers": {
"$ref": "common.json#/$defs/Headers"
},
"headers_list": {
"type": ["string", "null"]
},
"compression": {
"type": ["string", "null"]
},
Expand Down
Loading