-
Notifications
You must be signed in to change notification settings - Fork 729
Add credentials environment variables to let ChannelCredentials
and Session
be injected
#4689
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
base: main
Are you sure you want to change the base?
Conversation
@@ -202,12 +245,43 @@ def _get_exporter_names( | |||
] | |||
|
|||
|
|||
def _init_exporter( | |||
signal_type: Literal["traces", "metrics", "logs"], | |||
exporter_args_map: Mapping[str, Any], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exporter_args_map
has been used consistently with the type ExporterArgsMap
, I'll just call this exporter_args
since this is already for a specific exporter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack good point, switched it out for ExporterArgsMap // exporter_args
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant to only change the name. The type was fine.
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
- Overwrite logging.config.fileConfig and logging.config.dictConfig to ensure | |||
the OTLP `LogHandler` remains attached to the root logger. Fix a bug that | |||
can cause a deadlock to occur over `logging._lock` in some cases ([#4636](https://github.com/open-telemetry/opentelemetry-python/pull/4636)). | |||
- Add new environment variables to the SDK `OTEL_PYTHON_EXPORTER_OTLP_{METRICS/TRACES/LOGS}_CREDENTIAL_PROVIDER` that can be used to | |||
inject a `requests.Session` or `grpc.ChannelCredentials` object into OTLP exporters created during auto instrumentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to link this PR
inject a `requests.Session` or `grpc.ChannelCredentials` object into OTLP exporters created during auto instrumentation. | |
inject a `requests.Session` or `grpc.ChannelCredentials` object into OTLP exporters created during auto instrumentation ([#4689](https://github.com/open-telemetry/opentelemetry-python/pull/4689)). |
|
||
from grpc import ChannelCredentials # pylint: disable=import-error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be an issue if the SDK is running in an environment without grpcio installed? I know the operator auto-instrumentation layer for Python pre-installs the HTTP exporters and not the grpc exporters to avoid extension issues.
Description
Add environment variables to allow
ChannelCredentials
andSession
to be injected into OTLP exporters for auto instrumentation. See #4459 for more details..Fixes # 4459
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Unit tests
Does This PR Require a Contrib Repo Change?
Checklist: