quarkusio/quarkus · error · ConfigurationException

Unrecognized aggregation temporality:

Error message

Unrecognized aggregation temporality: 

What it means

`quarkus.otel.exporter.otlp.metrics.aggregation_temporality` accepts only `cumulative`, `delta`, or `lowmemory` (case-insensitive). Any other value makes `aggregationTemporalityResolver` throw a ConfigurationException. Temporality controls how metric values are reported to the collector.

Source

Thrown at extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OTelExporterRecorder.java:363

                    .getDefault()
                    .with(InstrumentType.HISTOGRAM, Aggregation.base2ExponentialBucketHistogram());

        } else {
            throw new ConfigurationException(
                    "Unrecognized default histogram aggregation: " + defaultHistogramAggregation);
        }
        return aggregationSelector;
    }

    private static AggregationTemporalitySelector aggregationTemporalityResolver(OtlpExporterMetricsConfig metricsConfig) {
        String temporalityValue = metricsConfig.temporalityPreference()
                .map(s -> s.toLowerCase(Locale.ROOT))
                .orElse("cumulative");
        AggregationTemporalitySelector temporalitySelector = switch (temporalityValue) {
            case "cumulative" -> AggregationTemporalitySelector.alwaysCumulative();
            case "delta" -> AggregationTemporalitySelector.deltaPreferred();
            case "lowmemory" -> AggregationTemporalitySelector.lowMemory();
            default -> throw new ConfigurationException("Unrecognized aggregation temporality: " + temporalityValue);
        };
        return temporalitySelector;
    }

    private static boolean determineCompression(OtlpExporterConfig config) {
        if (config.compression().isPresent()) {
            return (config.compression().get() == CompressionType.GZIP);
        }
        return false;
    }

    private static Map<String, String> populateTracingExportHttpHeaders(OtlpExporterConfig config) {
        Map<String, String> headersMap = new HashMap<>();
        OtlpUserAgent.addUserAgentHeader(headersMap::put);
        if (config.headers().isPresent()) {
            List<String> headers = config.headers().get();
            if (!headers.isEmpty()) {
                for (String header : headers) {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Set the value to `cumulative` (default)
  2. Or `delta` if your collector prefers delta temporality
  3. Or `lowmemory` for the low-memory temporality selector
  4. Mind the exact spelling — `lowmemory` has no space or hyphen

Example fix

# before
quarkus.otel.exporter.otlp.metrics.aggregation_temporality=low-memory
# after
quarkus.otel.exporter.otlp.metrics.aggregation_temporality=lowmemory
Defensive patterns

Strategy: validation

Validate before calling

String t = ConfigProvider.getConfig().getOptionalValue("quarkus.otel.exporter.otlp.metrics.aggregation_temporality", String.class).orElse("cumulative");
if (!java.util.List.of("cumulative", "delta", "lowmemory").contains(t.toLowerCase(java.util.Locale.ROOT))) {
    throw new IllegalArgumentException("Invalid aggregation_temporality: " + t);
}

Type guard

static boolean isSupportedTemporality(String t) {
    String v = t == null ? "cumulative" : t.toLowerCase(java.util.Locale.ROOT);
    return java.util.List.of("cumulative", "delta", "lowmemory").contains(v);
}

Try / catch

try {
    app.start();
} catch (RuntimeException e) {
    if (String.valueOf(e.getMessage()).startsWith("Unrecognized aggregation temporality")) {
        LOG.error("Use cumulative, delta, or lowmemory");
    }
}

Prevention

When it happens

Trigger: Setting `quarkus.otel.exporter.otlp.metrics.aggregation_temporality` to an unrecognized value such as `low-memory`, `deltatemporal`, or `cumulative_only`.

Common situations: Confusing upstream OTel temporality preference strings with Quarkus' three-value set; hyphenating `lowmemory`; typos in long property names.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/5d03bbf3b2d4e625. Report an issue: GitHub.