Skip to content

Commit

Permalink
Drop OTLP exponential histogram environment variable option (#5290)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg committed Mar 17, 2023
1 parent 302f889 commit e2817eb
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,8 @@ public static void configureOtlpHistogramDefaultAggregation(
if (defaultHistogramAggregation == null) {
return;
}
// TODO(jack-berg): remove EXPONENTIAL_BUCKET_HISTOGRAM in 1.24.0
if (defaultHistogramAggregation.equalsIgnoreCase("EXPONENTIAL_BUCKET_HISTOGRAM")
|| AggregationUtil.aggregationName(Aggregation.base2ExponentialBucketHistogram())
.equalsIgnoreCase(defaultHistogramAggregation)) {
if (AggregationUtil.aggregationName(Aggregation.base2ExponentialBucketHistogram())
.equalsIgnoreCase(defaultHistogramAggregation)) {
defaultAggregationSelectorConsumer.accept(
DefaultAggregationSelector.getDefault()
.with(InstrumentType.HISTOGRAM, Aggregation.base2ExponentialBucketHistogram()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,20 +390,6 @@ void configureOtlpHistogramDefaultAggregation() {
"BASE2_EXPONENTIAL_BUCKET_HISTOGRAM"))
.getDefaultAggregation(InstrumentType.HISTOGRAM))
.isEqualTo(Aggregation.base2ExponentialBucketHistogram());
assertThat(
configureHistogramDefaultAggregation(
ImmutableMap.of(
"otel.exporter.otlp.metrics.default.histogram.aggregation",
"exponential_bucket_histogram"))
.getDefaultAggregation(InstrumentType.HISTOGRAM))
.isEqualTo(Aggregation.base2ExponentialBucketHistogram());
assertThat(
configureHistogramDefaultAggregation(
ImmutableMap.of(
"otel.exporter.otlp.metrics.default.histogram.aggregation",
"EXPONENTIAL_BUCKET_HISTOGRAM"))
.getDefaultAggregation(InstrumentType.HISTOGRAM))
.isEqualTo(Aggregation.base2ExponentialBucketHistogram());

assertThat(
configureHistogramDefaultAggregation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ static Resource configureResource(

Set<String> enabledProviders =
new HashSet<>(config.getList("otel.java.enabled.resource.providers"));
// TODO(anuraaga): We use a hyphen only once in this artifact, for
// otel.java.disabled.resource-providers. But fetching by the dot version is the simplest way
// to implement it for now.
Set<String> disabledProviders =
new HashSet<>(config.getList("otel.java.disabled.resource.providers"));
for (ResourceProvider resourceProvider :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ void setup() {
@Test
@SetSystemProperty(key = "otel.propagators", value = "cat")
void invalidPropagator() {
// TODO(jack-berg): confirm log warnings go away once exporters are properly shutdown (#5113)
assertThatThrownBy(AutoConfiguredOpenTelemetrySdk::initialize)
.isInstanceOf(ConfigurationException.class)
.hasMessage(
Expand Down

0 comments on commit e2817eb

Please sign in to comment.