Belemetry posts a metrics request with no data points when nothing was measured since the last delta export

Aperta
#15,571 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@msynk ci sta già lavorando.

Dal 1/12/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

With delta temporality, Belemetry posts a metrics request that holds no data point when nothing was measured since the last export. The request carries only the resource and the meter's name (about 340 bytes to an OTLP/HTTP endpoint).

Where it's seen

  • A short-lived process (bit CLI): after the run's metrics are exported, the final flush at shutdown posts a second /v1/metrics request with no point in it.
  • An idle server: the same empty request goes out on every export interval.

Why

  • BelemetryPipeline.ExportMetricsAsync (src/Utilities/Belemetry/Bit.Belemetry/Pipeline/BelemetryPipeline.cs) exports whenever Collect() returns any instrument that has ever had a point (metrics.Count == 0 is its only check).
  • The OTLP exporter then leaves out the points with no new value in the interval (BelemetryOtlpMetricPoints.Select, which keeps only HasDeltaUpdate points, and non-zero deltas for sums). It still sends the request around them.

Expected: an export whose metrics have no point left to send after that selection is skipped, so no request goes out. The Azure Monitor exporter should be checked for the same case, since it filters points the same way (BelemetryAzureMonitorEnvelopeSerializer).

Version: Bit.Belemetry 11.0.0-pre-26.

Workaround: a metric processor that drops a metric with no updated point.

Lingua principale
C#
Stelle
1.4k
Fork
264
Merge medio
5h 25m
PR unite (30g)
447

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 bitfoundation/bitplatform

Tutte le issue di bitfoundation/bitplatform

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.