-
Notifications
You must be signed in to change notification settings - Fork 829
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prototype histogram advice API (i.e. Hints) (#5217)
- Loading branch information
Showing
34 changed files
with
703 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
Comparing source compatibility of against | ||
No changes. | ||
*** MODIFIED CLASS: PUBLIC io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader (not serializable) | ||
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0 | ||
+++ NEW METHOD: PUBLIC(+) STATIC(+) io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader create(io.opentelemetry.sdk.metrics.export.AggregationTemporalitySelector, io.opentelemetry.sdk.metrics.export.DefaultAggregationSelector) | ||
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.metrics.Aggregation getDefaultAggregation(io.opentelemetry.sdk.metrics.InstrumentType) |
18 changes: 18 additions & 0 deletions
18
...ain/java/io/opentelemetry/extension/incubator/metrics/ExtendedDoubleHistogramBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.extension.incubator.metrics; | ||
|
||
import io.opentelemetry.api.metrics.DoubleHistogramBuilder; | ||
import java.util.function.Consumer; | ||
|
||
/** Extended {@link DoubleHistogramBuilder} with experimental APIs. */ | ||
public interface ExtendedDoubleHistogramBuilder extends DoubleHistogramBuilder { | ||
|
||
/** Specify advice for histogram implementations. */ | ||
default DoubleHistogramBuilder setAdvice(Consumer<HistogramAdviceConfigurer> adviceConsumer) { | ||
return this; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
.../main/java/io/opentelemetry/extension/incubator/metrics/ExtendedLongHistogramBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.extension.incubator.metrics; | ||
|
||
import io.opentelemetry.api.metrics.LongHistogramBuilder; | ||
import java.util.function.Consumer; | ||
|
||
/** Extended {@link LongHistogramBuilder} with experimental APIs. */ | ||
public interface ExtendedLongHistogramBuilder extends LongHistogramBuilder { | ||
|
||
/** Specify advice for histogram implementations. */ | ||
default LongHistogramBuilder setAdvice(Consumer<HistogramAdviceConfigurer> adviceConsumer) { | ||
return this; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...src/main/java/io/opentelemetry/extension/incubator/metrics/HistogramAdviceConfigurer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.extension.incubator.metrics; | ||
|
||
import io.opentelemetry.api.metrics.DoubleHistogram; | ||
import io.opentelemetry.api.metrics.LongHistogram; | ||
import java.util.List; | ||
|
||
/** Configure advice for implementations of {@link LongHistogram} and {@link DoubleHistogram}. */ | ||
public interface HistogramAdviceConfigurer { | ||
|
||
/** Specify recommended set of explicit bucket boundaries for this histogram. */ | ||
HistogramAdviceConfigurer setExplicitBucketBoundaries(List<Double> bucketBoundaries); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.