Skip to content

Commit f83580d

Browse files
authored
add log_level configuration (#121)
This is to support the env variable OTEL_LOG_LEVEL. Fixes #120 --------- Signed-off-by: Alex Boten <[email protected]>
1 parent 568e508 commit f83580d

5 files changed

+16
-1
lines changed

examples/kitchen-sink.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ file_format: "0.3"
1212
# Configure if the SDK is disabled or not.
1313
# If omitted or null, false is used.
1414
disabled: false
15+
# Configure the log level of the internal logger used by the SDK.
16+
# If omitted, info is used.
17+
log_level: info
1518
# Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits.
1619
attribute_limits:
1720
# Configure max attribute value size.

examples/sdk-config.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ file_format: "0.3"
1212
# Configure if the SDK is disabled or not.
1313
# If omitted or null, false is used.
1414
disabled: false
15+
# Configure the log level of the internal logger used by the SDK.
16+
# If omitted, info is used.
17+
log_level: info
1518
# Configure resource for all signals.
1619
# If omitted, the default resource is used.
1720
resource:

examples/sdk-migration-config.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# for more information. The following spec defined env vars are NOT referenced and are thus
1515
# ignored:
1616
#
17-
# - OTEL_LOG_LEVEL
1817
# - OTEL_PROPAGATORS
1918
# - OTEL_TRACES_SAMPLER
2019
# - OTEL_TRACES_SAMPLER_ARG
@@ -41,6 +40,9 @@ file_format: "0.3"
4140
# Configure if the SDK is disabled or not.
4241
# If omitted or null, false is used.
4342
disabled: ${OTEL_SDK_DISABLED:-false}
43+
# Configure the log level of the internal logger used by the SDK.
44+
# If omitted, info is used.
45+
log_level: ${OTEL_LOG_LEVEL:-info}
4446
# Configure resource for all signals.
4547
# If omitted, the default resource is used.
4648
resource:

schema/opentelemetry_configuration.json

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"disabled": {
1212
"type": ["boolean", "null"]
1313
},
14+
"log_level": {
15+
"type": ["string", "null"]
16+
},
1417
"attribute_limits": {
1518
"$ref": "#/$defs/AttributeLimits"
1619
},

schema/type_descriptions.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
Configure if the SDK is disabled or not.
2424
2525
If omitted or null, false is used.
26+
log_level: >
27+
Configure the log level of the internal logger used by the SDK.
28+
29+
If omitted, info is used.
2630
resource: >
2731
Configure resource for all signals.
2832

0 commit comments

Comments
 (0)