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

Is there a way to disable specific metrics? #27

Open
heka1024 opened this issue Feb 6, 2024 · 2 comments
Open

Is there a way to disable specific metrics? #27

heka1024 opened this issue Feb 6, 2024 · 2 comments

Comments

@heka1024
Copy link

heka1024 commented Feb 6, 2024

I'm considering turning off certain metrics that I think negligible because our metrics have too high cardinality. Is there any way to do that? If not, I'd love to make a pull request.

@Envek
Copy link
Member

Envek commented Feb 6, 2024

Hey. Nope, there is no way to disable arbitrary metrics yet.

I was thinking about something similar, but there was neither need of it to me nor request from the community (see Help wanted section in the Yabeda README for examples).

So, ideas (or pull requests) are welcome

Please tell more about your use case. Do you want to skip both declaration and collection of all rails-specific metrics for the whole process lifetime?

@heka1024
Copy link
Author

heka1024 commented Feb 6, 2024

Do you want to skip both declaration and collection of all rails-specific metrics for the whole process lifetime?

What I want is to disable rails_view_runtime, rails_db_runtime and some other metrics in another Yabeda gem. Since the primary purpose of my main application is an API, I think metrics on view or db are redundant.

I think it would be great if we can provide an option for disable specific metrics likes the following:.

Yabeda::Rails.configure do |c|
  c.rails_view_runtime = false
  c.rails_db_runtime = false
end

I'll try and make a pull request for it. I'd love to hear your thoughts on this.

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

No branches or pull requests

2 participants