Files
cozystack/packages/system/monitoring-agents
ZverGuy f98ee76d2d feat(monitoring): stamp application identity on cluster-wide scrapes
Scoping a metrics query to one application needs the application's
identity on the series themselves, and it is only a boundary if the
scraped pod cannot choose it. A default scrape class on the cluster-wide
vmagent copies the pod's lineage labels into
apps_cozystack_io_application_{group,kind,name} at scrape time.

The target always carries all three labels, with a placeholder when the
pod has no lineage, so an exporter's own copy always collides, is
renamed to exported_* under honorLabels false, and is dropped. Without
the placeholder a pod lacking lineage could publish any identity
unchallenged. The placeholder is removed again before storage, so series
of pods without lineage look as they did before.

Scrapes with honorLabels true keep the exporter's value; none of them
scrapes a tenant-controlled exporter.

Assisted-by: LLM
Signed-off-by: ZverGuy <maximbel2003@gmail.com>
2026-11-04 04:16:56 +07:00
..
2024-11-04 19:01:33 +01:00
2024-11-04 19:01:33 +01:00