-
Notifications
You must be signed in to change notification settings - Fork 21
Do not merge controller back in #19
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
Conversation
lib/yabeda/rails.rb
Outdated
format: event.payload[:format], | ||
method: event.payload[:method].downcase, | ||
}.merge!(event.payload.slice(*Yabeda.default_tags.keys)) | ||
}.merge!(event.payload.slice(*Yabeda.default_tags.keys.excluding(:controller))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: excluding is only rails 6+.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, now it is obvious that we need to exclude all keys that we manually set in. Please try something like this:
}.merge!(event.payload.slice(*Yabeda.default_tags.keys.excluding(:controller))) | |
} | |
labels.merge!(event.payload.slice(*Yabeda.default_tags.keys - labels.keys)) |
Optionally, I'd prefer there be a |
From the readme, we have to both do a |
If a user defines a `default_tag :controller, nil`, then it cause the metrics to use `event.payload[:controller]` which is `"ApplicationController"` instead of `"application"`.
|
Released in 0.7.2 Thank you! |
If a user defines a
default_tag :controller, nil
, then it cause the metrics to useevent.payload[:controller]
which is"ApplicationController"
instead of"application"
.