-
Notifications
You must be signed in to change notification settings - Fork 2
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
Name New Relic transactions according to command called #8
Conversation
f48d43b
to
b0ca427
Compare
command_class.class_eval do | ||
class << self | ||
def call_command_with_new_relic(client, data, match, block) | ||
::NewRelic::Agent.set_transaction_name("#{self}/#{match[:command].downcase}") |
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.
Why downcase? Because the matching is not case-sensitive?
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.
New Relic separates transactions by name and is case sensitive. So if someone types @mybot Command
it would show up separately from @mybot command
. Downcasing normalizes the names so that individual commands are aggregated in New Relic.
It looks good. |
b0ca427
to
0c10acb
Compare
I added tests and support for matches from |
@kstole I added you to slack-ruby-bot (https://github.com/slack-ruby/slack-ruby-bot/invitations), so you can just make that release (follow RELEASING as usual). |
Closing and reopening to start new build |
Depends on refactoring in
SlackRubyBot::Commands::Base
: slack-ruby/slack-ruby-bot#164This causes transactions in New Relic to be separated by command.
E.g.
MySlackBot::Commands::Authentication/auth