Skip to content

Commit ed4457b

Browse files
committed
allow pass a client certificate to OTLPLogExporter
1 parent d213e02 commit ed4457b

File tree

1 file changed

+3
-0
lines changed
  • exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_log_exporter

1 file changed

+3
-0
lines changed

exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def __init__(
6767
self,
6868
endpoint: Optional[str] = None,
6969
certificate_file: Optional[str] = None,
70+
client_certificate_file: Optional[str] = None,
7071
headers: Optional[Dict[str, str]] = None,
7172
timeout: Optional[int] = None,
7273
compression: Optional[Compression] = None,
@@ -82,6 +83,7 @@ def __init__(
8283
OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE,
8384
environ.get(OTEL_EXPORTER_OTLP_CERTIFICATE, True),
8485
)
86+
self._client_certificate_file = certificate_file
8587
headers_string = environ.get(
8688
OTEL_EXPORTER_OTLP_LOGS_HEADERS,
8789
environ.get(OTEL_EXPORTER_OTLP_HEADERS, ""),
@@ -118,6 +120,7 @@ def _export(self, serialized_data: bytes):
118120
data=data,
119121
verify=self._certificate_file,
120122
timeout=self._timeout,
123+
cert=self._client_certificate_file,
121124
)
122125

123126
@staticmethod

0 commit comments

Comments
 (0)