Skip to content

Commit df9466b

Browse files
committed
Raise exception
1 parent b703f93 commit df9466b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

opentelemetry-sdk/src/opentelemetry/sdk/_metrics/aggregation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ def _create_aggregation(self, instrument: Instrument) -> _Aggregation:
120120
if isinstance(instrument, ObservableGauge):
121121
return _LastValueAggregation()
122122

123-
return None
123+
else:
124+
raise Exception("Invalid aggregation type found")
124125

125126

126127
class _SumAggregation(_Aggregation[Sum]):

0 commit comments

Comments
 (0)