Skip to content

Conversation

beorn7
Copy link
Member

@beorn7 beorn7 commented Mar 15, 2015

...ilies.

If a metric family returned by the injection hook already exists (with
the same name), then its metrics are simply merged into that metric
family. With enabled collect-time checks, even uniqueness is checked,
but in general, things stay the same that the caller is responsible to
ensure metric consistency.

This fixes prometheus/pushgateway#27 .

@juliusv @brian-brazil

Note that we still want a way to switch off the automatic process metrics (which is being worked on, it just takes some time to do it right).
With this PR, at least everything works, but it will create inconsistent metrics (pushed process metrics end up with an additional "exporter_job" label, for example). But that problem is a bigger one, too. (I believe we discussed the problem with adding the exporter labels elsewhere...)

…families.

If a metric family returned by the injection hook already exists (with
the same name), then its metrics are simply merged into that metric
family. With enabled collect-time checks, even uniqueness is checked,
but in general, things stay the same that the caller is responsible to
ensure metric consistency.

This fixes prometheus/pushgateway#27 .
@beorn7 beorn7 force-pushed the beorn7/metric-family-injection branch from 046cf5e to a762e06 Compare March 15, 2015 15:34
@juliusv
Copy link
Member

juliusv commented Mar 16, 2015

👍

beorn7 added a commit that referenced this pull request Mar 16, 2015
Allow the metric family injection hook to merge with existing metric fam...
@beorn7 beorn7 merged commit 7fcf9f7 into master Mar 16, 2015
@beorn7 beorn7 deleted the beorn7/metric-family-injection branch March 16, 2015 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deal with clash between pushgateway's own metrics and pushed metrics

2 participants