Add credentials environment variables to let ChannelCredentials and Session be injected#4689
Conversation
|
I'm realizing there's 3 ways to do this in the exporters:
I'm going forward with #2 since that's simplest for both the user and the entry point provider. So the function signature that gets associated w/ the entry point should look like: |
…__init__.py Co-authored-by: Aaron Abbott <aaronabbott@google.com>
…ry-python into add_cred_envvar
xrmx
left a comment
There was a problem hiding this comment.
Confused by the tox.ini changes but lgtm
|
Yeah I'm having issues w/ pytest in the venv created by tox.. It is supposedly installed by the test, but I get the following error If I then run |
|
Does it pass CI on Github if you just revert those files back to |
|
yeah it works. reverted the change |
… `Session` be injected (open-telemetry#4689) * Initial Commit * Fix broken tests * Start writing test * Fix tests * Add changelog * Improne and fix _init_exporter func * Fix desc * Run precommit and update variable * Update changelog * Fix_type * Commit changes * Add test * fix envvar and typecheck * Precommit and constraints * Move change to exporter * Move common code to util. * Fix lint err and print statment * Update opentelemetry-sdk/src/opentelemetry/sdk/environment_variables/__init__.py Co-authored-by: Aaron Abbott <aaronabbott@google.com> * Respond to comments * Ruff * Document the entry points better * Going with factory function approach w/ 2 entry points * Add tests.. Fix tox.ini ? * Add http/grpc env var variants * Respond to comments * Rename python env var with _ * Precommit * Commit changes * add new line * Fix docs error.. * get rid of envvar in docstring * Revert tox.ini changes * Revert tox --------- Co-authored-by: Aaron Abbott <aaronabbott@google.com>
… `Session` be injected (open-telemetry#4689) * Initial Commit * Fix broken tests * Start writing test * Fix tests * Add changelog * Improne and fix _init_exporter func * Fix desc * Run precommit and update variable * Update changelog * Fix_type * Commit changes * Add test * fix envvar and typecheck * Precommit and constraints * Move change to exporter * Move common code to util. * Fix lint err and print statment * Update opentelemetry-sdk/src/opentelemetry/sdk/environment_variables/__init__.py Co-authored-by: Aaron Abbott <aaronabbott@google.com> * Respond to comments * Ruff * Document the entry points better * Going with factory function approach w/ 2 entry points * Add tests.. Fix tox.ini ? * Add http/grpc env var variants * Respond to comments * Rename python env var with _ * Precommit * Commit changes * add new line * Fix docs error.. * get rid of envvar in docstring * Revert tox.ini changes * Revert tox --------- Co-authored-by: Aaron Abbott <aaronabbott@google.com>
Description
Add environment variables to allow
ChannelCredentialsandSessionto 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: