{"record":{"id":"890120a1a6e1f172","repo":"quarkusio/quarkus","slug":"unrecognized-default-histogram-aggregation","errorCode":null,"errorMessage":"Unrecognized default histogram aggregation: ","messagePattern":"Unrecognized default histogram aggregation: ","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OTelExporterRecorder.java","lineNumber":349,"sourceCode":"        };\n    }\n\n    private static DefaultAggregationSelector aggregationResolver(OtlpExporterMetricsConfig metricsConfig) {\n        String defaultHistogramAggregation = metricsConfig.defaultHistogramAggregation()\n                .map(s -> s.toLowerCase(Locale.ROOT))\n                .orElse(\"explicit_bucket_histogram\");\n\n        DefaultAggregationSelector aggregationSelector;\n        if (defaultHistogramAggregation.equals(\"explicit_bucket_histogram\")) {\n            aggregationSelector = DefaultAggregationSelector.getDefault();\n        } else if (BASE2EXPONENTIAL_AGGREGATION_NAME.equalsIgnoreCase(defaultHistogramAggregation)) {\n\n            aggregationSelector = DefaultAggregationSelector\n                    .getDefault()\n                    .with(InstrumentType.HISTOGRAM, Aggregation.base2ExponentialBucketHistogram());\n\n        } else {\n            throw new ConfigurationException(\n                    \"Unrecognized default histogram aggregation: \" + defaultHistogramAggregation);\n        }\n        return aggregationSelector;\n    }\n\n    private static AggregationTemporalitySelector aggregationTemporalityResolver(OtlpExporterMetricsConfig metricsConfig) {\n        String temporalityValue = metricsConfig.temporalityPreference()\n                .map(s -> s.toLowerCase(Locale.ROOT))\n                .orElse(\"cumulative\");\n        AggregationTemporalitySelector temporalitySelector = switch (temporalityValue) {\n            case \"cumulative\" -> AggregationTemporalitySelector.alwaysCumulative();\n            case \"delta\" -> AggregationTemporalitySelector.deltaPreferred();\n            case \"lowmemory\" -> AggregationTemporalitySelector.lowMemory();\n            default -> throw new ConfigurationException(\"Unrecognized aggregation temporality: \" + temporalityValue);\n        };\n        return temporalitySelector;\n    }\n","sourceCodeStart":331,"sourceCodeEnd":367,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OTelExporterRecorder.java#L331-L367","documentation":"`quarkus.otel.exporter.otlp.metrics.default_histogram_aggregation` accepts only `explicit_buckets_histogram` and `exponential_bucket_histogram`. Any other value makes `aggregationResolver` throw a ConfigurationException naming the bad value. This determines the SDK's default aggregation for histogram instruments.","triggerScenarios":"Configuring `quarkus.otel.exporter.otlp.metrics.default_histogram_aggregation` with a misspelled or unsupported string (e.g. `explicit`, `exponential`, `histogram`).","commonSituations":"Guessing value names instead of copying from the Quarkus OTel docs; older configs written for previous SDK naming; autocomplete against non-Quarkus property names.","solutions":["Set the value to `explicit_buckets_histogram`","Or set it to `exponential_bucket_histogram`","Check spelling; the message after the colon shows exactly what value was rejected","Remove the property to use the SDK default"],"exampleFix":"# before\nquarkus.otel.exporter.otlp.metrics.default_histogram_aggregation=exponential\n# after\nquarkus.otel.exporter.otlp.metrics.default_histogram_aggregation=exponential_bucket_histogram","handlingStrategy":"validation","validationCode":"String a = ConfigProvider.getConfig().getValue(\"quarkus.otel.exporter.otlp.metrics.default_histogram_aggregation\", String.class);\nif (!java.util.List.of(\"explicit_buckets_histogram\", \"exponential_bucket_histogram\").contains(a)) {\n    throw new IllegalArgumentException(\"Invalid default_histogram_aggregation: \" + a);\n}","typeGuard":"static boolean isSupportedHistogramAggregation(String a) {\n    return \"explicit_buckets_histogram\".equals(a) || \"exponential_bucket_histogram\".equals(a);\n}","tryCatchPattern":"try {\n    app.start();\n} catch (RuntimeException e) {\n    if (String.valueOf(e.getMessage()).startsWith(\"Unrecognized default histogram aggregation\")) {\n        LOG.error(\"Use explicit_buckets_histogram or exponential_bucket_histogram\");\n    }\n}","preventionTips":["Copy values verbatim from the Quarkus OpenTelemetry config reference","Prefer removing the property and using the SDK default unless specific behavior is needed","Keep enum-valued config keys in a shared, reviewed properties template"],"tags":["opentelemetry","configuration","metrics","histogram"],"backgroundTag":"invalid-enum-config-value","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}