Skip to content

Commit

Permalink
chore: added unit test for grpc otlp metric exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Dudssource authored and ocelotl committed Feb 13, 2024
1 parent 491482d commit 489b4c5
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1006,3 +1006,19 @@ def _number_data_point(value: int) -> NumberDataPoint:
time_unix_nano=1641946016139533244,
value=value,
)

def test_preferred_aggregation_override(self):

histogram_aggregation = ExplicitBucketHistogramAggregation(
boundaries=[0.05, 0.1, 0.5, 1, 5, 10],
)

exporter = OTLPMetricExporter(
preferred_aggregation={
Histogram: histogram_aggregation,
},
)

self.assertEqual(
exporter._preferred_aggregation[Histogram], histogram_aggregation
)

0 comments on commit 489b4c5

Please sign in to comment.