You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building this code with the latest Prometheus client library, I get:
# github.com/ewr/elasticsearch_exporter
./elasticsearch_exporter.go:300: e.counterVecs["jvm_gc_collection_seconds_count"].WithLabelValues(allStats.ClusterName, stats.Host, collector).Set undefined (type prometheus.Counter has no field or method Set)
./elasticsearch_exporter.go:301: e.counterVecs["jvm_gc_collection_seconds_sum"].WithLabelValues(allStats.ClusterName, stats.Host, collector).Set undefined (type prometheus.Counter has no field or method Set)
./elasticsearch_exporter.go:312: e.counterVecs["thread_pool_completed_count"].WithLabelValues(allStats.ClusterName, stats.Host, pool).Set undefined (type prometheus.Counter has no field or method Set)
./elasticsearch_exporter.go:313: e.counterVecs["thread_pool_rejected_count"].WithLabelValues(allStats.ClusterName, stats.Host, pool).Set undefined (type prometheus.Counter has no field or method Set)
./elasticsearch_exporter.go:330: e.counters["indices_fielddata_evictions"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set)
./elasticsearch_exporter.go:333: e.counters["indices_filter_cache_evictions"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set)
./elasticsearch_exporter.go:336: e.counters["indices_query_cache_evictions"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set)
./elasticsearch_exporter.go:339: e.counters["indices_request_cache_evictions"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set)
./elasticsearch_exporter.go:348: e.counters["indices_store_throttle_time_ms_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set)
./elasticsearch_exporter.go:350: e.counters["indices_flush_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set)
./elasticsearch_exporter.go:350: too many errors
Turns out Counter.Set() has been removed. the code needs to be rewritten to no longer use Counter, but NewConstMetric() instead.
The text was updated successfully, but these errors were encountered:
When building this code with the latest Prometheus client library, I get:
Turns out Counter.Set() has been removed. the code needs to be rewritten to no longer use Counter, but NewConstMetric() instead.
The text was updated successfully, but these errors were encountered: