-
Notifications
You must be signed in to change notification settings - Fork 657
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
Adding support for setting OTLP exporter protocol by env vars #2893
Adding support for setting OTLP exporter protocol by env vars #2893
Conversation
|
opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py
Outdated
Show resolved
Hide resolved
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.
in the PR you mentioned:
Since the SDK already supports setting the protocol using the values otlp_proto_grpc and otlp_proto_http of OTEL_TRACES_EXPORTER, these values are still supported and have priority over the new supported variables. In case of conflict, a warning will be printed.
Is our goal to deprecate otlp_proto_grpc/http
over time or discourage the use of them? if so maybe we should issue a deprecation warning / log
opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py
Outdated
Show resolved
Hide resolved
@srikanthccv what do you think about that? |
Ideally we should deprecate them. It may be our shortsightedness because the way this going - for someone who is Installing just the |
I think it's OK that the user will have to explicitly specify the OTLP protocol in case he doesn't use the default value. |
Description
Fixes #2586
Adding support for specifying OTLP export protocol using env vars, as defined in the specifications.
Since the SDK already supports setting the protocol using the values
otlp_proto_grpc
andotlp_proto_http
ofOTEL_TRACES_EXPORTER
, these values are still supported and have priority over the new supported variables. In case of conflict, a warning will be printed.Future support for configuring metrics and logs with HTTP exporter is already added, although those do not exist yet, therefore will result in a
RuntimeError
.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Does This PR Require a Contrib Repo Change?
See open-telemetry/opentelemetry-python-contrib#1250
Contrib repo change is not necessarily required, but it is related to fixing the same issue.
Checklist: