weihao / bungeecord-prometheus-exporter

📊 A lightweight Bungeecord/Velocity plugin that exports network stats to Prometheus
MIT License
82 stars 22 forks source link

Failed to collect metric 'OnlinePlayer' #147

Closed Nubebuster closed 3 months ago

Nubebuster commented 7 months ago

[11:42:07] [Netty Boss IO Thread #0/INFO]: Listening on /0.0.0.0:25566 [11:42:08] [qtp1162203072-117/WARN] [BungeeCordPrometheusExporter]: Failed to collect metric 'OnlinePlayer': java.lang.IllegalArgumentException: Incorrect number of labels. at io.prometheus.client.SimpleCollector.labels(SimpleCollector.java:65) at org.akadia.prometheus.bungeecord.metrics.OnlinePlayer.lambda$doCollect$1(OnlinePlayer.java:19) at java.base/java.util.Map.forEach(Map.java:713) at org.akadia.prometheus.bungeecord.metrics.OnlinePlayer.doCollect(OnlinePlayer.java:18) at org.akadia.prometheus.interfaces.Metric.collect(Metric.java:22) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.akadia.prometheus.MetricRegistry.collectMetrics(MetricRegistry.java:26) at org.akadia.prometheus.MetricsServer$1.handle(MetricsServer.java:43) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:822) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at org.eclipse.jetty.server.Server.handle(Server.java:563) at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149) at java.base/java.lang.Thread.run(Thread.java:840)

[11:42:08] [qtp1162203072-117/WARN] [BungeeCordPrometheusExporter]: OnlinePlayer collect:java.lang.IllegalArgumentException: Incorrect number of labels.

weihao commented 7 months ago

Version number? The latest version should fixed this problem

Nubebuster commented 7 months ago

Version number? The latest version should fixed this problem

3.2.5

Jumala9163 commented 7 months ago

I am also using the latest version and get the same error

[qtp1207664059-201/WARN] [BungeeCordPrometheusExporter]: OnlinePlayer collect:java.lang.IllegalArgumentException: Incorrect number of labels. [qtp1207664059-207/WARN] [BungeeCordPrometheusExporter]: Failed to collect metric 'OnlinePlayer': java.lang.IllegalArgumentException: Incorrect number of labels. at io.prometheus.client.SimpleCollector.labels(SimpleCollector.java:65) at org.akadia.prometheus.bungeecord.metrics.OnlinePlayer.lambda$doCollect$1(OnlinePlayer.java:19) at java.base/java.util.Map.forEach(Map.java:713) at org.akadia.prometheus.bungeecord.metrics.OnlinePlayer.doCollect(OnlinePlayer.java:18) at org.akadia.prometheus.interfaces.Metric.collect(Metric.java:22) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.akadia.prometheus.MetricRegistry.collectMetrics(MetricRegistry.java:26) at org.akadia.prometheus.MetricsServer$1.handle(MetricsServer.java:43) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:822) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at org.eclipse.jetty.server.Server.handle(Server.java:563) at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:416) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:385) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:272) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:140) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149) at java.base/java.lang.Thread.run(Thread.java:840)