telemetry/providers: set service.instance.id on the OTel resource so replicas stay distinct
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 66/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- observability-sre
Direzione di ricerca
Start with telemetry/providers/providers.go and trace how New applies WithAttributes, WithFromEnv, and WithHost. Check the existing tests for provider resource attributes and how they cover CustomAttributes and OTEL_RESOURCE_ATTRIBUTES; then verify the default instance ID uses POD_NAME when set and hostname otherwise, while an explicit caller value wins.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The resource built in telemetry/providers/providers.go (resource.New with WithAttributes, WithFromEnv, WithHost) sets service.name and service.version but never service.instance.id, the attribute the OTel semantic conventions designate for telling instances of the same service apart.
Consumers running more than one replica and pushing OTLP metrics to a collector whose Prometheus exporter is configured the default way (resource attributes are not converted to labels) get identical label sets from every replica. Each scrape then reflects whichever replica pushed last, so cumulative counters appear to flip between replicas' values. Prometheus reads every flip as a counter reset, which makes rate() and increase() report activity when nothing is happening.
Current behavior
The only per-replica attribute is host.name, which is only visible downstream if the collector enables resource_to_telemetry_conversion. Callers can work around this with WithCustomAttributes or OTEL_RESOURCE_ATTRIBUTES, but every consumer has to know to.
Request
Set service.instance.id by default when the caller hasn't provided one (via CustomAttributes or OTEL_RESOURCE_ATTRIBUTES). A reasonable source is POD_NAME when present, falling back to the hostname. An explicit value from the caller should always win.
Impact
Any service built on this package that runs multiple replicas against a default collector exporter.
- Lingua principale
- Go
- Stelle
- 2
- Fork
- 6
- Merge medio
- 23h 44m
- PR unite (30g)
- 133
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stacklok/toolhive-core
-
needs-triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
stacklok/toolhive-core#466 ·
I maintainer di solito rispondono entro 1 giorno
-
mcpcompat/server: refuse dispatch of a request whose per-request context is goneForse già presa @jhrozek l’ha presa 13 giorni fa. Apertaneeds-triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
stacklok/toolhive-core#414 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
stacklok/toolhive-core#343 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
stacklok/toolhive-core#342 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
stacklok/toolhive-core#341 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di stacklok/toolhive-core
Issue simili
-
govulncheck reports 7 reachable vulnerabilities in dependenciesForse già presa @dwisiswant0 l’ha presa oggi. ApertaType: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
projectdiscovery/rawhttp#558 ·
-
govulncheck reports 8 vulnerabilities in called codeForse già presa @dwisiswant0 l’ha presa oggi. ApertaType: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
projectdiscovery/vulnx#517 ·
-
routing: the tray panel's stage stands still with motion reduced while a request is in flightAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Type: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
rubys/roundhouse#1946 ·