yabeda icon indicating copy to clipboard operation
yabeda copied to clipboard

Export only desired metrics

Open surbhig213 opened this issue 3 years ago • 5 comments

Hey @Envek ,

Right now hitting /metrics displays all the default metrics. How can I restrict it to display only those metrics which I need?

surbhig213 avatar May 13 '21 12:05 surbhig213

Right now it is not possible to suppress export of some arbitrary metrics. All netrics collected in code running inside Sidekiq worker process, will be collected and exposed by yabeda-prometheus on /metrics endpoint of this process.

Can you please clarify, what are these “default” metrics you are talking about?

If you don't want to collect some of your custom metrics, you can place them inside unless ::Sidekiq.server? block.

Envek avatar May 13 '21 12:05 Envek

Hey @Envek , by default metrics I mean all the 'Local per-process metrics' and 'Global cluster-wide metrics' defined in the Readme file. My question is how can I export just a few of them and not all of them.

surbhig213 avatar May 14 '21 04:05 surbhig213

No, there is no way to do that currently. You can only disable the whole “Global cluster-wide metrics” group with collect_cluster_metrics setting.

But why do you need that? I still can't get the use case.

Envek avatar May 14 '21 08:05 Envek

Transferred this issue to main yabeda repo as it's should be fixed there. Most probably we would like to support this metrics filtering in future.

Envek avatar May 14 '21 08:05 Envek

No, there is no way to do that currently. You can only disable the whole “Global cluster-wide metrics” group with collect_cluster_metrics setting.

But why do you need that? I still can't get the use case.

Thanks @Envek , My use case is that I have to export a limited number of metrics to wavefront as we have a limit on the number of metrics to be sent. So, I was just trying if I could limit it from here itself somehow.

surbhig213 avatar May 17 '21 04:05 surbhig213