发布

  • [NA] [BE] feat(otel): emit base2 exponential histograms for HTTP server metrics (#6715)

    frostbyte_neo 发布于 2026-05-15 08:25:51 +00:00

    The OTel Java instrumentation attaches explicit-bucket advice to the
    stable HTTP semconv histograms (http.server.request.duration,
    http.server.request.body.size, http.server.response.body.size), with
    boundaries capping at 10 seconds. That advice acts as an inline
    aggregation hint that takes precedence over the
    OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION env-var
    default — so even when the env var is set to
    base2_exponential_bucket_histogram (now true in dev/staging/prod via
    comet-helm), these three HTTP histograms stay classic and quantile
    estimation is clipped at the 10s boundary.

    Override the advice via the existing opik-otel-views.yaml view config
    (loaded by the agent at startup via
    -Dotel.experimental.metrics.view-config=...), setting
    aggregation: base2_exponential_bucket_histogram on each of the three
    HTTP histogram views. The existing attribute_keys cardinality control
    is preserved.

    Once the image carrying this change ships, the three histograms surface
    in Prometheus as native histograms; _bucket / _count / _sum
    companion series will age out and be replaced by the bare-name series.
    Dashboards / alerts keyed on those companion series need to be migrated
    to native-histogram query syntax (histogram_quantile/histogram_count/
    histogram_sum on the bare metric) — tracked separately on
    comet-monitoring so we land them in lockstep with the next prod roll.

    Co-authored-by: Claude Opus 4.7 (1M context) noreply@anthropic.com

    下载附件