Skip to content

Commit 8d7e24f

Browse files
committed
feat:: Added --insecure of CLI argument
1 parent 7413895 commit 8d7e24f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
from opentelemetry.sdk.environment_variables import (
8888
OTEL_EXPORTER_JAEGER_ENDPOINT,
8989
OTEL_EXPORTER_JAEGER_TIMEOUT,
90+
OTEL_PYTHON_INSECURE,
9091
)
9192
from opentelemetry.sdk.resources import SERVICE_NAME, Resource
9293
from opentelemetry.sdk.trace.export import SpanExporter, SpanExportResult
@@ -122,6 +123,9 @@ def __init__(
122123
self.collector_endpoint = collector_endpoint or environ.get(
123124
OTEL_EXPORTER_JAEGER_ENDPOINT, DEFAULT_GRPC_COLLECTOR_ENDPOINT
124125
)
126+
self.insecure = insecure or bool(
127+
OTEL_PYTHON_INSECURE, None
128+
)
125129
self._timeout = timeout or int(
126130
environ.get(OTEL_EXPORTER_JAEGER_TIMEOUT, DEFAULT_EXPORT_TIMEOUT)
127131
)

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

+7
Original file line numberDiff line numberDiff line change
@@ -421,3 +421,10 @@
421421
``DELTA``: Choose ``DELTA`` aggregation temporality for ``Counter``, ``Asynchronous Counter`` and ``Histogram``.
422422
Choose ``CUMULATIVE`` aggregation temporality for ``UpDownCounter`` and ``Asynchronous UpDownCounter``.
423423
"""
424+
425+
OTEL_PYTHON_INSECURE = "OTEL_PYTHON_INSECURE"
426+
"""
427+
.. envvar:: OTEL_PYTHON_INSECURE
428+
429+
The :envvar:`OTEL_PYTHON_INSECURE` is a boolean flag to True if collector has no encryption or authentication.
430+
"""

0 commit comments

Comments
 (0)