Skip to content

Commit

Permalink
add log_level configuration
Browse files Browse the repository at this point in the history
This is to support the env variable OTEL_LOG_LEVEL.

Fixes #120

Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
codeboten committed Sep 16, 2024
1 parent 05a15a8 commit 858e4bc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions examples/kitchen-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ file_format: "0.1"
# Environment variable: OTEL_SDK_DISABLED
disabled: false

# Configure the log level used by the SDK logger
#
# Environment variable: OTEL_LOG_LEVEL
log_level: info

# Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits.
attribute_limits:
# Configure max attribute value size.
Expand Down
3 changes: 3 additions & 0 deletions examples/sdk-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ file_format: "0.1"
# Configure if the SDK is disabled or not.
disabled: false

# Configure the log level used by the SDK logger
log_level: info

# Configure resource for all signals.
resource:
# Configure resource attributes.
Expand Down
4 changes: 3 additions & 1 deletion examples/sdk-migration-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# for more information. The following spec defined env vars are NOT referenced and are thus
# ignored:
#
# - OTEL_LOG_LEVEL
# - OTEL_PROPAGATORS
# - OTEL_TRACES_SAMPLER
# - OTEL_TRACES_SAMPLER_ARG
Expand Down Expand Up @@ -42,6 +41,9 @@ file_format: "0.1"
# Configure if the SDK is disabled or not.
disabled: ${OTEL_SDK_DISABLED:-false}

# Configure the log level used by the SDK logger
log_level: ${OTEL_LOG_LEVEL:-info}

# Configure resource for all signals.
resource:
# Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list.
Expand Down
3 changes: 3 additions & 0 deletions schema/opentelemetry_configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"disabled": {
"type": ["boolean", "null"]
},
"log_level": {
"type": ["string", "null"]
},
"attribute_limits": {
"$ref": "#/$defs/AttributeLimits"
},
Expand Down

0 comments on commit 858e4bc

Please sign in to comment.