Skip to content

refactor: switch OTLP handler to AppendableV2#17996

Merged
bwplotka merged 2 commits intomainfrom
bwplotka/a2-otlp-3
Feb 3, 2026
Merged

refactor: switch OTLP handler to AppendableV2#17996
bwplotka merged 2 commits intomainfrom
bwplotka/a2-otlp-3

Conversation

@bwplotka
Copy link
Member

@bwplotka bwplotka commented Feb 2, 2026

Progresses #17632

This PR switched prod OTLP handling to AppenderV2. I will switch otlp* package tests to teststorage.Appendable in the next PR, couldn't make it now or before the switch.

Early benchmarks:

benchstat fromMetrics.txt fromMetricsV2.txt                                                    
goos: darwin
goarch: arm64
pkg: github.com/prometheus/prometheus/storage/remote/otlptranslator/prometheusremotewrite
cpu: Apple M4 Pro
                                                                                                                                                              │ fromMetrics.txt │          fromMetricsV2.txt          │
                                                                                                                                                              │     sec/op      │    sec/op     vs base               │
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2           1.581m ± 173%   1.186m ±  7%  -24.94% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2           2.738m ±   5%   2.544m ±  9%        ~ (p=0.065 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2          3.676m ±   4%   3.327m ±  8%   -9.49% (p=0.009 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2          6.834m ±   2%   6.692m ±  4%        ~ (p=0.065 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2          8.263m ±   5%   7.748m ±  5%   -6.24% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2         9.639m ±   3%   8.947m ±  5%   -7.18% (p=0.009 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_0-2           2.618m ±   8%   1.544m ±  5%  -41.01% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_5-2           3.387m ±   4%   2.315m ±  7%  -31.66% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_10-2          4.140m ±   7%   2.970m ±  3%  -28.24% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_0-2          6.622m ±  10%   5.077m ±  3%  -23.34% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_5-2          6.969m ±  14%   5.925m ± 11%  -14.98% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_10-2         7.526m ±   7%   7.055m ± 12%   -6.26% (p=0.041 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2        3.813m ±   5%   2.860m ±  3%  -24.98% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2        5.777m ±   3%   4.605m ±  1%  -20.30% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2       7.399m ±   4%   6.204m ±  6%  -16.15% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2       13.20m ±   2%   11.76m ±  3%  -10.91% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2       15.43m ±   5%   13.58m ±  1%  -11.97% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2      17.03m ±   2%   15.28m ±  5%  -10.29% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2           1.544m ±   5%   1.208m ±  5%  -21.77% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2           2.720m ±   3%   2.346m ±  6%  -13.74% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2          3.623m ±   5%   3.345m ±  4%   -7.68% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2          6.883m ±   3%   6.492m ±  5%   -5.67% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2          8.340m ±   4%   7.929m ±  2%   -4.92% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2         9.465m ±   7%   8.867m ±  1%   -6.31% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_0-2           2.638m ±   2%   1.552m ±  6%  -41.17% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_5-2           3.286m ±   8%   2.353m ±  5%  -28.39% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_10-2          3.841m ±   6%   2.950m ±  5%  -23.19% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_0-2          6.199m ±   3%   5.099m ±  1%  -17.74% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_5-2          7.075m ±   7%   6.108m ±  4%  -13.67% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_10-2         7.746m ±  11%   6.695m ±  3%  -13.57% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2        4.044m ±   3%   2.817m ±  4%  -30.34% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2        5.718m ±   6%   4.553m ±  5%  -20.38% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2       7.321m ±   4%   6.243m ±  4%  -14.73% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2       13.02m ±   4%   11.80m ±  4%   -9.37% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2       15.64m ±   3%   13.45m ±  1%  -13.99% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2      17.16m ±   2%   15.42m ±  4%  -10.15% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2          1.535m ±   6%   1.222m ±  5%  -20.39% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2          2.634m ±   7%   2.341m ±  5%  -11.11% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2         3.582m ±   1%   3.369m ±  7%        ~ (p=0.065 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2         7.008m ±   4%   6.549m ±  3%   -6.56% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2         8.151m ±   6%   7.781m ±  4%   -4.55% (p=0.009 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2        9.373m ±   3%   8.978m ±  4%   -4.22% (p=0.015 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_0-2          2.574m ±   2%   1.568m ±  4%  -39.09% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_5-2          3.267m ±   7%   2.425m ±  4%  -25.77% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_10-2         3.867m ±   6%   2.949m ±  4%  -23.75% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_0-2         6.019m ±   6%   5.240m ±  3%  -12.94% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_5-2         6.775m ±   7%   5.911m ±  6%  -12.76% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_10-2        7.683m ±   7%   6.586m ±  4%  -14.28% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2       3.792m ±   8%   2.814m ±  1%  -25.79% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2       5.544m ±   5%   4.647m ±  4%  -16.19% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2      7.289m ±   6%   6.255m ±  4%  -14.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2      12.77m ±   6%   11.71m ±  1%   -8.26% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2      15.29m ±   4%   13.65m ±  5%  -10.72% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2     17.04m ±   3%   15.65m ±  6%   -8.15% (p=0.002 n=6)
geomean                                                                                                                                                           5.780m          4.826m        -16.50%

                                                                                                                                                              │ fromMetrics.txt │          fromMetricsV2.txt          │
                                                                                                                                                              │      B/op       │     B/op      vs base               │
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2           1592.4Ki ± 0%   824.5Ki ± 0%  -48.22% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2            3.173Mi ± 0%   2.423Mi ± 0%  -23.64% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2           4.790Mi ± 0%   4.040Mi ± 0%  -15.66% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2           4.093Mi ± 0%   3.343Mi ± 0%  -18.32% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2           5.710Mi ± 0%   4.960Mi ± 0%  -13.13% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2          7.328Mi ± 0%   6.578Mi ± 0%  -10.23% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_0-2            4.568Mi ± 0%   1.567Mi ± 0%  -65.69% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_5-2            5.957Mi ± 0%   2.956Mi ± 0%  -50.38% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_10-2           7.437Mi ± 0%   4.436Mi ± 0%  -40.35% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_0-2           9.198Mi ± 0%   6.197Mi ± 0%  -32.62% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_5-2          10.586Mi ± 0%   7.586Mi ± 0%  -28.34% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_10-2         12.067Mi ± 0%   9.066Mi ± 0%  -24.87% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2         5.368Mi ± 0%   2.367Mi ± 0%  -55.90% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2         8.374Mi ± 0%   5.373Mi ± 0%  -35.84% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2       11.471Mi ± 0%   8.471Mi ± 0%  -26.16% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2       12.530Mi ± 0%   9.530Mi ± 0%  -23.95% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2        15.54Mi ± 0%   12.54Mi ± 0%  -19.31% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2       18.63Mi ± 0%   15.63Mi ± 0%  -16.10% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2           1593.7Ki ± 0%   825.8Ki ± 0%  -48.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2            3.174Mi ± 0%   2.424Mi ± 0%  -23.63% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2           4.791Mi ± 0%   4.041Mi ± 0%  -15.65% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2           4.093Mi ± 0%   3.343Mi ± 0%  -18.32% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2           5.711Mi ± 0%   4.961Mi ± 0%  -13.13% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2          7.328Mi ± 0%   6.578Mi ± 0%  -10.23% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_0-2            4.570Mi ± 0%   1.569Mi ± 0%  -65.67% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_5-2            5.958Mi ± 0%   2.957Mi ± 0%  -50.37% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_10-2           7.438Mi ± 0%   4.437Mi ± 0%  -40.34% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_0-2           9.199Mi ± 0%   6.198Mi ± 0%  -32.62% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_5-2          10.587Mi ± 0%   7.586Mi ± 0%  -28.34% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_10-2         12.067Mi ± 0%   9.066Mi ± 0%  -24.87% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2         5.369Mi ± 0%   2.368Mi ± 0%  -55.89% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2         8.375Mi ± 0%   5.374Mi ± 0%  -35.83% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2       11.473Mi ± 0%   8.472Mi ± 0%  -26.16% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2       12.531Mi ± 0%   9.530Mi ± 0%  -23.95% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2        15.54Mi ± 0%   12.54Mi ± 0%  -19.31% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2       18.63Mi ± 0%   15.63Mi ± 0%  -16.10% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2          1605.8Ki ± 0%   837.9Ki ± 0%  -47.82% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2           3.186Mi ± 0%   2.436Mi ± 0%  -23.54% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2          4.803Mi ± 0%   4.053Mi ± 0%  -15.61% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2          4.101Mi ± 0%   3.352Mi ± 0%  -18.28% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2          5.719Mi ± 0%   4.969Mi ± 0%  -13.11% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2         7.336Mi ± 0%   6.586Mi ± 0%  -10.22% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_0-2           4.581Mi ± 0%   1.580Mi ± 0%  -65.50% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_5-2           5.970Mi ± 0%   2.969Mi ± 0%  -50.27% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_10-2          7.450Mi ± 0%   4.449Mi ± 0%  -40.28% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_0-2          9.207Mi ± 0%   6.206Mi ± 0%  -32.59% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_5-2         10.595Mi ± 0%   7.595Mi ± 0%  -28.32% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_10-2        12.075Mi ± 0%   9.075Mi ± 0%  -24.85% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2        5.381Mi ± 0%   2.380Mi ± 0%  -55.77% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2        8.387Mi ± 0%   5.386Mi ± 0%  -35.78% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2      11.484Mi ± 0%   8.484Mi ± 0%  -26.13% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2      12.539Mi ± 0%   9.538Mi ± 0%  -23.93% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2       15.55Mi ± 0%   12.54Mi ± 0%  -19.30% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2      18.64Mi ± 0%   15.64Mi ± 0%  -16.10% (p=0.002 n=6)
geomean                                                                                                                                                            7.044Mi        4.756Mi       -32.49%

                                                                                                                                                              │ fromMetrics.txt │         fromMetricsV2.txt         │
                                                                                                                                                              │    allocs/op    │  allocs/op   vs base              │
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2             18.05k ± 0%   18.02k ± 0%  -0.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2             50.05k ± 0%   50.02k ± 0%  -0.07% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2            80.05k ± 0%   80.02k ± 0%  -0.04% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2            18.08k ± 0%   18.05k ± 0%  -0.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2            50.08k ± 0%   50.05k ± 0%  -0.06% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2           80.08k ± 0%   80.05k ± 0%  -0.04% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_0-2             26.11k ± 0%   26.02k ± 0%  -0.32% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_5-2             46.11k ± 0%   46.02k ± 0%  -0.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_10-2            62.11k ± 0%   62.02k ± 0%  -0.13% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_0-2            26.13k ± 0%   26.05k ± 0%  -0.31% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_5-2            46.13k ± 0%   46.05k ± 0%  -0.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_10-2           62.13k ± 0%   62.05k ± 0%  -0.13% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2          44.10k ± 0%   44.02k ± 0%  -0.19% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2          96.11k ± 0%   96.02k ± 0%  -0.09% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2         142.1k ± 0%   142.0k ± 0%  -0.06% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2         44.13k ± 0%   44.05k ± 0%  -0.19% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2         96.13k ± 0%   96.05k ± 0%  -0.09% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_0/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2        142.1k ± 0%   142.0k ± 0%  -0.06% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2             18.06k ± 0%   18.03k ± 0%  -0.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2             50.06k ± 0%   50.03k ± 0%  -0.07% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2            80.06k ± 0%   80.03k ± 0%  -0.04% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2            18.09k ± 0%   18.05k ± 0%  -0.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2            50.09k ± 0%   50.05k ± 0%  -0.06% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2           80.09k ± 0%   80.05k ± 0%  -0.04% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_0-2             26.12k ± 0%   26.03k ± 0%  -0.32% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_5-2             46.12k ± 0%   46.03k ± 0%  -0.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_10-2            62.12k ± 0%   62.03k ± 0%  -0.13% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_0-2            26.14k ± 0%   26.06k ± 0%  -0.31% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_5-2            46.14k ± 0%   46.06k ± 0%  -0.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_10-2           62.14k ± 0%   62.06k ± 0%  -0.13% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2          44.12k ± 0%   44.03k ± 0%  -0.19% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2          96.12k ± 0%   96.03k ± 0%  -0.09% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2         142.1k ± 0%   142.0k ± 0%  -0.06% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2         44.14k ± 0%   44.05k ± 0%  -0.19% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2         96.14k ± 0%   96.06k ± 0%  -0.09% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_5/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2        142.1k ± 0%   142.1k ± 0%  -0.06% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2            18.11k ± 0%   18.08k ± 0%  -0.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2            50.12k ± 0%   50.08k ± 0%  -0.07% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2           80.12k ± 0%   80.08k ± 0%  -0.04% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2           18.13k ± 0%   18.10k ± 0%  -0.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2           50.13k ± 0%   50.10k ± 0%  -0.07% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_0/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2          80.13k ± 0%   80.10k ± 0%  -0.04% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_0-2            26.17k ± 0%   26.08k ± 0%  -0.32% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_5-2            46.17k ± 0%   46.09k ± 0%  -0.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_2/exemplars_per_series:_10-2           62.17k ± 0%   62.09k ± 0%  -0.13% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_0-2           26.19k ± 0%   26.10k ± 0%  -0.31% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_5-2           46.19k ± 0%   46.10k ± 0%  -0.18% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_0/labels_per_metric:_20/exemplars_per_series:_10-2          62.19k ± 0%   62.10k ± 0%  -0.13% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_0-2         44.17k ± 0%   44.08k ± 0%  -0.19% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_5-2         96.17k ± 0%   96.08k ± 0%  -0.09% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_2/exemplars_per_series:_10-2        142.2k ± 0%   142.1k ± 0%  -0.06% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_0-2        44.19k ± 0%   44.10k ± 0%  -0.19% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_5-2        96.18k ± 0%   96.10k ± 0%  -0.09% (p=0.002 n=6)
PrometheusConverter_FromMetrics/resource_attribute_count:_50/histogram_count:_1000/non-histogram_count:_1000/labels_per_metric:_20/exemplars_per_series:_10-2       142.2k ± 0%   142.1k ± 0%  -0.06% (p=0.002 n=6)
geomean                                                                                                                                                             52.97k        52.89k       -0.14%

Does this PR introduce a user-facing change?

NONE

Signed-off-by: bwplotka <bwplotka@gmail.com>
Copy link
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my otlpInstrumentedAppender.Append comment for a potential bug.

Signed-off-by: bwplotka <bwplotka@gmail.com>
Copy link
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bwplotka bwplotka merged commit 7769495 into main Feb 3, 2026
50 checks passed
@bwplotka bwplotka deleted the bwplotka/a2-otlp-3 branch February 3, 2026 16:44
wbollock pushed a commit to wbollock/prometheus that referenced this pull request Feb 6, 2026
* refactor: switch OTLP handler to AppendableV2

Signed-off-by: bwplotka <bwplotka@gmail.com>

* addressed comments

Signed-off-by: bwplotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: Will Bollock <wbollock@linode.com>
wbollock pushed a commit to wbollock/prometheus that referenced this pull request Feb 6, 2026
* refactor: switch OTLP handler to AppendableV2

Signed-off-by: bwplotka <bwplotka@gmail.com>

* addressed comments

Signed-off-by: bwplotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
wbollock pushed a commit to wbollock/prometheus that referenced this pull request Feb 6, 2026
* refactor: switch OTLP handler to AppendableV2

Signed-off-by: bwplotka <bwplotka@gmail.com>

* addressed comments

Signed-off-by: bwplotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
wbollock pushed a commit to wbollock/prometheus that referenced this pull request Feb 6, 2026
* refactor: switch OTLP handler to AppendableV2

Signed-off-by: bwplotka <bwplotka@gmail.com>

* addressed comments

Signed-off-by: bwplotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
wbollock pushed a commit to wbollock/prometheus that referenced this pull request Feb 6, 2026
* refactor: switch OTLP handler to AppendableV2

Signed-off-by: bwplotka <bwplotka@gmail.com>

* addressed comments

Signed-off-by: bwplotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
wbollock pushed a commit to wbollock/prometheus that referenced this pull request Feb 6, 2026
* refactor: switch OTLP handler to AppendableV2

Signed-off-by: bwplotka <bwplotka@gmail.com>

* addressed comments

Signed-off-by: bwplotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants