axsuul / plex-media-server-exporter

A better Prometheus exporter for Plex Media Server
MIT License
56 stars 5 forks source link

Stacktrace throwing a 500 error #18

Open davidbhoward opened 5 days ago

davidbhoward commented 5 days ago

I ran into this error tonight. I think what triggered it was in Plex a user started some downloads of content on their device since they are traveling. That is only my best guess here.

Puma caught this error: labels must have the same signature (keys given: [:user_id, :user] vs. keys expected: [:user_id, :username] (Prometheus::Client::LabelSetValidator::InvalidLabelSetError)
/usr/local/bundle/gems/prometheus-client-4.0.0/lib/prometheus/client/label_set_validator.rb:45:in `validate_labelset!'
/usr/local/bundle/gems/prometheus-client-4.0.0/lib/prometheus/client/metric.rb:109:in `label_set_for'
/usr/local/bundle/gems/prometheus-client-4.0.0/lib/prometheus/client/gauge.rb:20:in `set'
/srv/lib/middleware/collector.rb:225:in `block in set_gauge_metric_values_or_reset_missing'
/srv/lib/middleware/collector.rb:224:in `each'
/srv/lib/middleware/collector.rb:224:in `set_gauge_metric_values_or_reset_missing'
/srv/lib/middleware/collector.rb:107:in `collect_activity_metrics'
/srv/lib/middleware/collector.rb:69:in `call'
/usr/local/bundle/gems/rack-3.0.1/lib/rack/deflater.rb:47:in `call'
/usr/local/bundle/gems/puma-6.0.0/lib/puma/configuration.rb:268:in `call'
/usr/local/bundle/gems/puma-6.0.0/lib/puma/request.rb:89:in `block in handle_request'
/usr/local/bundle/gems/puma-6.0.0/lib/puma/thread_pool.rb:343:in `with_force_shutdown'
/usr/local/bundle/gems/puma-6.0.0/lib/puma/request.rb:88:in `handle_request'
/usr/local/bundle/gems/puma-6.0.0/lib/puma/server.rb:430:in `process_client'
/usr/local/bundle/gems/puma-6.0.0/lib/puma/server.rb:233:in `block in run'
/usr/local/bundle/gems/puma-6.0.0/lib/puma/thread_pool.rb:150:in `block in spawn_thread'
acaranta commented 23 hours ago

I don't know much about Ruby, I tried something tho if it helps you may test maybe ? 😅

https://github.com/acaranta/plex-media-server-exporter and built there docker pull acaranta/plex-media-server-exporter:latest

if it works, I will send a MR 🙈