Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

A Gauge is using the "last value aggregation", when using the async version, when the callback is called, we can provide a measurement value together with attributes.

Aperta
#3,742 5 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ThomsonTan ci sta già lavorando.

Dal 1/12/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Stale triage/accepted

A Gauge is using the "last value aggregation", when using the async version, when the callback is called, we can provide a measurement value together with attributes.

We use the attributes for different purposes:

  • to just add an attribute carrying meta data (say a certain key:pair value we add to a "temperature metric", temperature as in instant temperature)
  • to give the same metric for multiple instances of something, where those multiple instances are dynamic, they may come and go, the attribute is for example "Name":"Instance15".

What we noticed is the moment an attribute changes (or a attribute gets added), the old situation (with the old attribute value and old measurement, or without the new attributed) keeps being reported, so we end up with an ever increasing set of datapoints, where the old ones are to be considered obsolete and should just die.

In the dynamic case, we will always report all of the existing instances, the fact we no longer mention a given instance means it is gone, it has passed on, it died ;-)

How can this be achieved ?

Originally posted by @killerbot242 in https://github.com/open-telemetry/opentelemetry-cpp/discussions/3688

Lingua principale
C++
Stelle
1.4k
Fork
658
Merge medio
1g 19h
PR unite (30g)
51

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 open-telemetry/opentelemetry-cpp

Tutte le issue di open-telemetry/opentelemetry-cpp

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.