Phase 4: support otel-arrow-dfe-pdata-views MetricsView for OTAP batch construction

Aperta
#28 0 commenti 1 reazione 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@bwplotka ci sta già lavorando.

Dal 5/11/2026.

  • #31 di @bwplotka — chiusa senza merge

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement

Suggested by @lquerel, who noted that otel-arrow-dfe-pdata-views lets format decoders share OTAP batch construction logic via encode_metrics_otap_batch.

Currently src/arrow.rs, src/arrow/schema.rs, and src/arrow/records.rs maintain custom Arrow column builders and OTAP schema definitions to avoid depending on otel-arrow-dfe-pdata. However, otel-arrow-dfe-pdata-views has zero dependencies and defines backend-agnostic MetricsView traits.

Prometheus text and OpenMetrics formats still need Layer 0 parsing, string unescaping into contiguous &[u8] slices, and Layer 1 multi-line family assembly for _bucket, _sum, _count, quantile, and _created series before a metric family can be viewed as OTLP data points. Implementing MetricsView over the decoder's reusable staging buffers lets otel-arrow build OtapArrowRecords::Metrics through encode_metrics_otap_batch instead of duplicating OTAP schema and dictionary builders in two repositories.

Plan:

  1. Coordinate MSRV and dependency setup for otel-arrow-dfe-pdata-views, which currently inherits rust-version = "1.94" from the otel-arrow workspace while scrape.rs targets 1.88.
  2. Track per-family data-point index ranges in the decoder's staging tables so each assembled metric family iterates its NumberDataPoint, HistogramDataPoint, ExponentialHistogramDataPoint, and SummaryDataPoint slices directly without scanning parent_id.
  3. Implement MetricsView, ResourceMetricsView, ScopeMetricsView, MetricView, DataView, and the data-point, exemplar, and attribute view traits over the decoder's staged family buffers and string interners.
  4. Verify in tests/otap-compat that passing the decoded MetricsView to otel_arrow_dfe_pdata::encode::encode_metrics_otap_batch produces equivalent OtapArrowRecords::Metrics and OTLP output across all metric types.
  5. Benchmark encode_metrics_otap_batch over MetricsView against the direct ArrowDecoder builders, including builder reuse across scrapes and interaction with cooperative decoding, to evaluate replacing the custom Arrow column builders in src/arrow/.
Lingua principale
Rust
Stelle
27
Fork
5
Merge medio
1g 15h
PR unite (30g)
22

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di prometheus/scrape.rs

Tutte le issue di prometheus/scrape.rs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.