NewRelic Instrumentation for SlackRubyBot
NewRelic instrumentation for slack-ruby-bot.
Install
Add to Gemfile.
gem 'newrelic-slack-ruby-bot'
Usage
This gem adds New Relic tracing to the Slack message hook, which is the start of all messages coming in from Slack.
New Relic will automatically record any external requests made through supported libraries (such as Net::HTTP
) and database queries for supported databases (such as MongoDB
and Redis
).
This gem also adds the team, channel, user, and match data from each message, which can be seen in New Relic transaction traces and Insights.
Renaming transactions
By default, newrelic-slack-ruby-bot
names New Relic transactions according to the operator, command, match, or scan route that was called.
To rename a New Relic transaction, make a call directly to the New Relic agent.
::NewRelic::Agent.set_transaction_name('new name')
The typical format for transaction names is ClassName/method
.
Adding custom attributes
You can add additional custom attributes via the New Relic agent.
::NewRelic::Agent.add_custom_attributes(key: value)
I only see Web transactions! Where are my Slack transactions?
Contributing
You're encouraged to contribute to this gem. See CONTRIBUTING for details.
Copyright and License
Copyright (c) 2015, Daniel Doubrovkine and Contributors.
This project is licensed under the MIT License.