Skip to content

Commit 6c2740a

Browse files
committed
fix envvar and typecheck
1 parent fcadee2 commit 6c2740a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ def _load_credential_from_envvar(
153153
credentials = _import_config_component(
154154
credential_env, "opentelemetry_otlp_credential_provider"
155155
)()
156-
if _GRPC_IMPORTED and isinstance(credentials, ChannelCredentials):
156+
if _GRPC_IMPORTED and isinstance(credentials, ChannelCredentials): # type: ignore[reportPossiblyUnboundVariable]
157157
return ("credentials", credentials)
158158

159-
if _REQUESTS_IMPORTED and isinstance(credentials, Session):
159+
if _REQUESTS_IMPORTED and isinstance(credentials, Session): # type: ignore[reportPossiblyUnboundVariable]
160160
return ("session", credentials)
161161
raise RuntimeError(
162162
f"{credential_env} is neither a grpc.ChannelCredentials or requests.Session type."

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@
398398
"OTEL_PYTHON_EXPORTER_OTLP_LOGS_CREDENTIAL_PROVIDER"
399399
)
400400
"""
401-
.. envvar:: OTEL_PYTHON_EXPORTER_OTLP_CREDENTIAL_PROVIDER
401+
.. envvar:: OTEL_PYTHON_EXPORTER_OTLP_LOGS_CREDENTIAL_PROVIDER
402402
403403
The :envvar:`OTEL_PYTHON_EXPORTER_OTLP_LOGS_CREDENTIAL_PROVIDER` provides either ChannelCredentials for grpc OTLP Log exporters,
404404
or request.Session for HTTP Log exporters.
@@ -416,7 +416,7 @@
416416
"OTEL_PYTHON_EXPORTER_OTLP_TRACES_CREDENTIAL_PROVIDER"
417417
)
418418
"""
419-
.. envvar:: OTEL_PYTHON_EXPORTER_OTLP_CREDENTIAL_PROVIDER
419+
.. envvar:: OTEL_PYTHON_EXPORTER_OTLP_TRACES_CREDENTIAL_PROVIDER
420420
421421
The :envvar:`OTEL_PYTHON_EXPORTER_OTLP_TRACES_CREDENTIAL_PROVIDER` provides either ChannelCredentials for grpc OTLP Span exporters,
422422
or request.Session for HTTP Span exporters.
@@ -425,7 +425,7 @@
425425
"OTEL_PYTHON_EXPORTER_OTLP_METRICS_CREDENTIAL_PROVIDER"
426426
)
427427
"""
428-
.. envvar:: OTEL_PYTHON_EXPORTER_OTLP_CREDENTIAL_PROVIDER
428+
.. envvar:: OTEL_PYTHON_EXPORTER_OTLP_METRICS_CREDENTIAL_PROVIDER
429429
430430
The :envvar:`OTEL_PYTHON_EXPORTER_OTLP_METRICS_CREDENTIAL_PROVIDER` provides either ChannelCredentials for grpc OTLP Metric exporters,
431431
or request.Session for HTTP Metric exporters.

0 commit comments

Comments
 (0)