Skip to content

Commit

Permalink
Suppress deprecations on AggregationTemporality.toOtlpAggregationTemp…
Browse files Browse the repository at this point in the history
…orality() (#5754)

See gh-5733
  • Loading branch information
izeye authored Dec 23, 2024
1 parent 580636c commit 589c0e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class OtlpMetricConverter {

private final long deltaTimeUnixNano;

@SuppressWarnings("deprecation")
OtlpMetricConverter(Clock clock, Duration step, TimeUnit baseTimeUnit,
AggregationTemporality aggregationTemporality, NamingConvention namingConvention) {
this.clock = clock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ void distributionWithPercentileShouldWriteSummary() {
assertThat(writeToMetric(ds).getDataCase().getNumber()).isEqualTo(Metric.DataCase.SUMMARY.getNumber());
}

@SuppressWarnings("deprecation")
@Test
void multipleMetricsWithSameMetaDataShouldBeSingleMetric() {
Tags firstTag = Tags.of("key", "first");
Expand Down Expand Up @@ -333,6 +334,7 @@ protected void stepOverNStep(int numStepsToSkip) {
clock.addSeconds(otlpConfig().step().getSeconds() * numStepsToSkip);
}

@SuppressWarnings("deprecation")
protected void assertHistogram(Metric metric, long startTime, long endTime, String unit, long count, double sum,
double max) {
assertThat(metric.getHistogram().getAggregationTemporality())
Expand Down Expand Up @@ -361,6 +363,7 @@ protected void assertHistogram(Metric metric, long startTime, long endTime, Stri
}
}

@SuppressWarnings("deprecation")
protected void assertSum(Metric metric, long startTime, long endTime, double expectedValue) {
NumberDataPoint sumDataPoint = metric.getSum().getDataPoints(0);
assertThat(metric.getName()).isEqualTo(METER_NAME);
Expand Down

0 comments on commit 589c0e3

Please sign in to comment.