Skip to content

Commit 829fcc5

Browse files
authored
sdk: remove duplicated env vars (#4491)
* remove duplicated env vars from sdk Signed-off-by: emdneto <[email protected]> * add changelog Signed-off-by: emdneto <[email protected]> --------- Signed-off-by: emdneto <[email protected]>
1 parent 525b523 commit 829fcc5

File tree

3 files changed

+17
-61
lines changed

3 files changed

+17
-61
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
([#4475](https://github.com/open-telemetry/opentelemetry-python/pull/4475))
1212
- Improve performance of baggage operations
1313
([#4466](https://github.com/open-telemetry/opentelemetry-python/pull/4466))
14+
- sdk: remove duplicated constant definitions for `environment_variables`
15+
([#4491](https://github.com/open-telemetry/opentelemetry-python/pull/4491))
1416
- api: Revert record `BaseException` change in `trace_api.use_span()`
1517
([#4494](https://github.com/open-telemetry/opentelemetry-python/pull/4494))
1618

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

-61
Original file line numberDiff line numberDiff line change
@@ -565,25 +565,6 @@
565565
Default: False
566566
"""
567567

568-
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT = "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT"
569-
"""
570-
.. envvar:: OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
571-
572-
The :envvar:`OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` target to which the metric exporter is going to send spans.
573-
The endpoint MUST be a valid URL host, and MAY contain a scheme (http or https), port and path.
574-
A scheme of https indicates a secure connection and takes precedence over this configuration setting.
575-
"""
576-
577-
OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE = (
578-
"OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE"
579-
)
580-
"""
581-
.. envvar:: OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE
582-
583-
The :envvar:`OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE` stores the path to the certificate file for
584-
TLS credentials of gRPC client for metrics. Should only be used for a secure connection for metrics.
585-
"""
586-
587568
OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE = "OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE"
588569
"""
589570
.. envvar:: OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE
@@ -592,22 +573,6 @@
592573
TLS credentials of gRPC client for logs. Should only be used for a secure connection for logs.
593574
"""
594575

595-
OTEL_EXPORTER_OTLP_METRICS_HEADERS = "OTEL_EXPORTER_OTLP_METRICS_HEADERS"
596-
"""
597-
.. envvar:: OTEL_EXPORTER_OTLP_METRICS_HEADERS
598-
599-
The :envvar:`OTEL_EXPORTER_OTLP_METRICS_HEADERS` contains the key-value pairs to be used as headers for metrics
600-
associated with gRPC or HTTP requests.
601-
"""
602-
603-
OTEL_EXPORTER_OTLP_METRICS_TIMEOUT = "OTEL_EXPORTER_OTLP_METRICS_TIMEOUT"
604-
"""
605-
.. envvar:: OTEL_EXPORTER_OTLP_METRICS_TIMEOUT
606-
607-
The :envvar:`OTEL_EXPORTER_OTLP_METRICS_TIMEOUT` is the maximum time the OTLP exporter will
608-
wait for each batch export for metrics.
609-
"""
610-
611576
OTEL_EXPORTER_OTLP_LOGS_TIMEOUT = "OTEL_EXPORTER_OTLP_LOGS_TIMEOUT"
612577
"""
613578
.. envvar:: OTEL_EXPORTER_OTLP_LOGS_TIMEOUT
@@ -616,16 +581,6 @@
616581
wait for each batch export for logs.
617582
"""
618583

619-
OTEL_EXPORTER_OTLP_METRICS_COMPRESSION = (
620-
"OTEL_EXPORTER_OTLP_METRICS_COMPRESSION"
621-
)
622-
"""
623-
.. envvar:: OTEL_EXPORTER_OTLP_METRICS_COMPRESSION
624-
625-
Same as :envvar:`OTEL_EXPORTER_OTLP_COMPRESSION` but only for the metric
626-
exporter. If both are present, this takes higher precedence.
627-
"""
628-
629584
OTEL_EXPORTER_JAEGER_CERTIFICATE = "OTEL_EXPORTER_JAEGER_CERTIFICATE"
630585
"""
631586
.. envvar:: OTEL_EXPORTER_JAEGER_CERTIFICATE
@@ -714,13 +669,6 @@
714669
The :envvar:`OTEL_METRIC_EXPORT_TIMEOUT` is the maximum allowed time (in milliseconds) to export data.
715670
"""
716671

717-
OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY = "OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY"
718-
"""
719-
.. envvar:: OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY
720-
721-
The :envvar:`OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY` is the clients private key to use in mTLS communication in PEM format.
722-
"""
723-
724672
OTEL_METRICS_EXEMPLAR_FILTER = "OTEL_METRICS_EXEMPLAR_FILTER"
725673
"""
726674
.. envvar:: OTEL_METRICS_EXEMPLAR_FILTER
@@ -737,15 +685,6 @@
737685
The :envvar:`OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION` is the default aggregation to use for histogram instruments.
738686
"""
739687

740-
OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE = (
741-
"OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE"
742-
)
743-
"""
744-
.. envvar:: OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE
745-
746-
The :envvar:`OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE` is the client certificate/chain trust for clients private key to use in mTLS communication in PEM format.
747-
"""
748-
749688
OTEL_EXPERIMENTAL_RESOURCE_DETECTORS = "OTEL_EXPERIMENTAL_RESOURCE_DETECTORS"
750689
"""
751690
.. envvar:: OTEL_EXPERIMENTAL_RESOURCE_DETECTORS

pyproject.toml

+15
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,24 @@ pythonVersion = "3.8"
103103
include = [
104104
"opentelemetry-semantic-conventions",
105105
"opentelemetry-api",
106+
"opentelemetry-sdk",
107+
]
108+
109+
exclude = [
110+
"opentelemetry-sdk/tests",
111+
"opentelemetry-sdk/src/opentelemetry/sdk/_configuration",
112+
"opentelemetry-sdk/src/opentelemetry/sdk/_events",
113+
"opentelemetry-sdk/src/opentelemetry/sdk/_logs",
114+
"opentelemetry-sdk/src/opentelemetry/sdk/error_handler",
115+
"opentelemetry-sdk/src/opentelemetry/sdk/resources",
116+
"opentelemetry-sdk/src/opentelemetry/sdk/metrics",
117+
"opentelemetry-sdk/src/opentelemetry/sdk/trace",
118+
"opentelemetry-sdk/src/opentelemetry/sdk/util",
119+
"opentelemetry-sdk/benchmarks",
106120
]
107121

108122
# When packages are correct typed add them to the strict list
109123
strict = [
110124
"opentelemetry-semantic-conventions",
125+
"opentelemetry-sdk/src/opentelemetry/sdk/environment_variables",
111126
]

0 commit comments

Comments
 (0)