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

Custom labels for sidekiq stats metrics #196

Open
marmaxev opened this issue Dec 2, 2021 · 4 comments
Open

Custom labels for sidekiq stats metrics #196

marmaxev opened this issue Dec 2, 2021 · 4 comments

Comments

@marmaxev
Copy link

marmaxev commented Dec 2, 2021

Hello.

Perhaps you should add custom labels for metrics in SidekiqStatsCollector. It would be extremely useful.

#194

@joaovictor-local
Copy link

Agree... I don't know why today it isn't obtained from the middleware 🤔

@joaovictor-local
Copy link

Agree... I don't know why today it isn't obtained from the middleware 🤔

I got confused because of the old implementation to insert custom labels in the application, this solution worked for me:
https://github.com/discourse/prometheus_exporter#client-default-labels

@marmaxev
Copy link
Author

marmaxev commented Dec 8, 2021

Yes, it is possible to insert custom labels in the application. But they are not added to the SidekiqStats metrics. As it is written here, I added custom labels and got something like this.

# HELP minor_gc_ops_total Minor GC operations by process.
# TYPE minor_gc_ops_total counter
minor_gc_ops_total{type="ruby",pid="34",foo="bar",test_label="my_label"} 59

# HELP allocated_objects_total Total number of allocated objects by process.
# TYPE allocated_objects_total counter
allocated_objects_total{type="ruby",pid="34",foo="bar",test_label="my_label"} 3344395

# HELP sidekiq_stats_dead_size Size of dead the queue
# TYPE sidekiq_stats_dead_size gauge
sidekiq_stats_dead_size 0

# HELP sidekiq_stats_enqueued Number of enqueued jobs
# TYPE sidekiq_stats_enqueued gauge
sidekiq_stats_enqueued 1

Labels are added to process metrics, but not to sidekiq stats metrics. I'd like to know if it's a bug or a feature.

@cyrilus
Copy link

cyrilus commented Nov 18, 2023

Hello
the problem seem to persist. For me it's a bug

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

No branches or pull requests

3 participants