Skip to content

Commit e008658

Browse files
committed
Fix: OTEL_LOG_LEVEL default to info for partial success logging.
1 parent baefbc0 commit e008658

File tree

3 files changed

+5
-2
lines changed
  • exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc
  • opentelemetry-sdk/src/opentelemetry/sdk/environment_variables

3 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
1313
## Unreleased
1414

15+
- OTLP exporters now log partial success responses when `OTEL_LOG_LEVEL` is set to `info`, `debug`, or `verbose`.
16+
([#4805](https://github.com/open-telemetry/opentelemetry-python/pull/4805))
1517
- docs: Added sqlcommenter example
1618
([#4734](https://github.com/open-telemetry/opentelemetry-python/pull/4734))
1719
- build: bump ruff to 0.14.1

exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def _get_credentials(
259259

260260

261261
def _should_log_partial_responses():
262-
otel_log_level = environ.get(OTEL_LOG_LEVEL, "off").lower()
262+
otel_log_level = environ.get(OTEL_LOG_LEVEL, "info").lower()
263263
return otel_log_level in ["verbose", "debug", "info"]
264264

265265

opentelemetry-sdk/src/opentelemetry/sdk/environment_variables/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
"""
5151
.. envvar:: OTEL_LOG_LEVEL
5252
53-
The :envvar:`OTEL_LOG_LEVEL` environment variable sets the log level used by the SDK logger
53+
The :envvar:`OTEL_LOG_LEVEL` environment variable sets the log level used by the SDK logger.
54+
OTLP exporters will log partial success responses when this is set to `info`, `debug`, or `verbose`.
5455
Default: "info"
5556
"""
5657

0 commit comments

Comments
 (0)