Skip to content

Commit 92ebea0

Browse files
committed
refactor(otlp exporter): refactor client certificate and key handling
- Moved `client_key_file` and `client_certificate_file` to local variables as suggested. - Added a comment explaining the retention of these as instance variables for testing purposes. - Addressed all review comments to improve code readability and maintainability.
1 parent 1e3ed88 commit 92ebea0

File tree

1 file changed

+3
-3
lines changed
  • exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc

1 file changed

+3
-3
lines changed

exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ def _get_file_content(file_path: str) -> bytes:
126126

127127

128128
def _load_credentials(
129-
certificate_file: Optional[str],
130-
client_key_file: Optional[str],
131-
client_certificate_file: Optional[str],
129+
certificate_file: str,
130+
client_key_file: str,
131+
client_certificate_file: str,
132132
) -> Optional[ChannelCredentials]:
133133
try:
134134
root_certificates = _get_file_content(certificate_file)

0 commit comments

Comments
 (0)