Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Gauge was collected before with the same name and label values #2

Open
bobrik opened this issue Nov 24, 2016 · 1 comment
Open

Gauge was collected before with the same name and label values #2

bobrik opened this issue Nov 24, 2016 · 1 comment

Comments

@bobrik
Copy link

bobrik commented Nov 24, 2016

Seeing this when scraping:

An error has occurred during metrics collection:

collected metric chronos_metrics_version label:<name:"version" value:"3.0.0" > gauge:<value:1 > was collected before with the same name and label values

Commenting the following in exporter.go helps:

		case "version":
			data := element.Data()
			version, ok := data.(string)
			if !ok {
				log.Errorf(fmt.Sprintf("Bad conversion! Unexpected value \"%v\" for version\n", data))
			} else {
				gauge, _ := e.Gauges.Fetch("metrics_version", "Chronos metrics version", "version")
				gauge.WithLabelValues(version).Set(1)
				gauge.Collect(ch)
			}
matt-deboer added a commit that referenced this issue Feb 24, 2017
@matt-deboer
Copy link
Contributor

Should be fixed in release v0.2.2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants