Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #11759 to 7.0: Fix Prometheus histograms when keylabels and values sit at the same path #11788

Closed
wants to merge 1 commit into from

Conversation

odacremolbap
Copy link
Contributor

Cherry-pick of PR #11759 to 7.0 branch. Original message:

When a Prometheus histogram is configured to set KeyLabel at the same path at the event where the values will be written, labels will be smashed by values.

Those scenario patterns are:

metric_name{label1="value1",label2="value2"} metric_value 

with mappings defined as

&MetricsMapping{
	Metrics: map[string]MetricMap{
		"metric_name": Metric("metrics.name"),
	},
				Labels: map[string]LabelMap{
					"rank":  KeyLabel("metric.name.label1"),
					"alive": KeyLabel("metric.name.label2"),
				},

which will lead to labels not included for histograms

…ath (elastic#11759)

- Fix Labels overwriting for Prometheus histograms + keylabels
- Add tests for keylabeled prometheus metrics

(cherry picked from commit eb89eaa)
@exekias
Copy link
Contributor

exekias commented Apr 12, 2019

I think this is not affecting any module in 7.0 (I may be wrong)
do we really need to backport the change?

@odacremolbap
Copy link
Contributor Author

I backported by inertia.
You are right. Closing.

@odacremolbap odacremolbap deleted the backport_11759_7.0 branch April 12, 2019 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants