Skip to content

Commit 69bc2c4

Browse files
committed
Add optional to arguments that are optional
1 parent 1bd9ec6 commit 69bc2c4

File tree

2 files changed

+6
-6
lines changed
  • exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter
  • opentelemetry-sdk/src/opentelemetry/sdk/trace/export

2 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ def __init__(
109109
timeout: Optional[int] = None,
110110
compression: Optional[Compression] = None,
111111
session: Optional[requests.Session] = None,
112-
preferred_temporality: Dict[type, AggregationTemporality] = None,
113-
preferred_aggregation: Dict[type, Aggregation] = None,
112+
preferred_temporality: Optional[Dict[type, AggregationTemporality]] = None,
113+
preferred_aggregation: Optional[Dict[type, Aggregation]] = None,
114114
):
115115
self._endpoint = endpoint or environ.get(
116116
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT,

opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ class BatchSpanProcessor(SpanProcessor):
155155
def __init__(
156156
self,
157157
span_exporter: SpanExporter,
158-
max_queue_size: int = None,
159-
schedule_delay_millis: float = None,
160-
max_export_batch_size: int = None,
161-
export_timeout_millis: float = None,
158+
max_queue_size: Optional[int] = None,
159+
schedule_delay_millis: Optional[float] = None,
160+
max_export_batch_size: Optional[int] = None,
161+
export_timeout_millis: Optional[float] = None,
162162
):
163163
if max_queue_size is None:
164164
max_queue_size = BatchSpanProcessor._default_max_queue_size()

0 commit comments

Comments
 (0)