Git Product home page Git Product logo

newrelic-redis's Introduction

newrelic-redis

This gem is deprecated in favor of newrelic_rpm's built-in instrumentation

If you're using newrelic-redis, we recommend removing it and updating your newrelic_rpm to any version >= 3.18.1

LICENSE:

(The MIT License)

Copyright (c) 2012 Evan Phoenix

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

newrelic-redis's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

newrelic-redis's Issues

Allow the instrumentation to be disabled

The instrumentation should be disabled during oddball runs such as rake tasks or deploys and such. Should also abide by the NewRelic global ENV['NEWRELIC_ENABLE'].

Ignore certain methods

It would be very cool to be able to ignore specific methods (like BRPOP). BRPOP is going to be very high response time and throughput on sidekiq workers, by nature, and can shadow out other database items in % utilization.

If I end up building this, I'll be sure to PR it.

resque-scheduler (2.0.0) getting undefined method `trace_execution_scoped' for Redis::Client:Class

Hi

I just installed the gem newrelic-redis on a project using redis, resque and resque-scheduler. Resque workers are starting fine but the resque-scheduler is getting an undefined method error (the trace log can be found at the end of this issue)

I changed my resque.rake such a in this issue (http://stackoverflow.com/questions/9961044/postgres-error-on-heroku-with-resque/9964924#9964924) but I am still getting the error

2012-10-31 12:17:54 Loading Schedule
2012-10-31 12:17:54 Scheduling move_day_pinned_tasks 
2012-10-31 12:17:54 Scheduling move_week_pinned_tasks 
2012-10-31 12:17:54 Scheduling move_month_pinned_tasks 
2012-10-31 12:17:54 Scheduling send_task_reminders_30_mins_interval 
** Invoke resque:scheduler (first_time)
** Invoke resque:scheduler_setup (first_time)
** Execute resque:scheduler_setup
** Execute resque:scheduler
rake aborted!
undefined method `trace_execution_scoped' for Redis::Client:Class
/var/www/my_project_staging/shared/bundle/ruby/1.9.1/gems/newrelic-redis-1.3.2/lib/newrelic_redis/instrumentation.rb:33:in `call_with_newrelic_trace'
/var/www/my_project_staging/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis.rb:681:in `block in del'
/usr/local/rvm/rubies/ruby-1.9.3-p125-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/var/www/my_project_staging/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis.rb:680:in `del'
/var/www/my_project_staging/shared/bundle/ruby/1.9.1/gems/redis-namespace-1.0.3/lib/redis/namespace.rb:213:in `method_missing'
/var/www/my_project_staging/shared/bundle/ruby/1.9.1/gems/resque-scheduler-2.0.0.g/lib/resque/scheduler.rb:103:in `load_schedule!'
/var/www/my_project_staging/shared/bundle/ruby/1.9.1/gems/resque-scheduler-2.0.0.g/lib/resque/scheduler.rb:45:in `run'
/var/www/my_project_staging/shared/bundle/ruby/1.9.1/gems/resque-scheduler-2.0.0.g/lib/resque_scheduler/tasks.rb:23:in `block (2 levels) in <top (required)>'
/var/www/my_project_staging/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'

Unable to NewRelic instrumentation for redis

As per instructions I added this gem to my Gemfile and run bundle install. No it should start tracking redis but unble to see any log on new-relic.

Could someone please help me ? and let me know what is the correct way to make it work.

Also please let me know where I can see redis logs on NewRelic dashboard.

Instrumentation not shown in Database transaction tab

Looking at the core rpm instrumentation for mongo, I see it is added under the "Datastore" namespace:
https://github.com/newrelic/rpm/blob/master/lib/new_relic/agent/datastores/mongo/metric_translator.rb#L54

While redis is added under "database":

https://github.com/evanphx/newrelic-redis/blob/master/lib/newrelic_redis/instrumentation.rb#L67

I wonder if simply changing the namespace is all that is needed, or there is more to it?

Basically what I want is to have the redis issues pile up in the "Slow SQL Traces" block of the UI.

See redis as separated color in dashboard

Before we migrated from memcache to redis NewRelic was showing it as separated color on App Server Response Time graph on Dashboard.

But redis is not shown there. I believe it is included as part of ruby or database.

Is it possible to make distinguish it from the rest just like memcache?

Change the metric name from Database/Redis/allWeb to Datastore/Redis/allWeb

Quoting https://docs.newrelic.com/docs/apm/apis/application-examples-v2/obtaining-web-transaction-response-time-data-v2#datastore-v-database

As of February 2015, the New Relic agents (starting with Python) will begin to display the database time broken out into specific database types. Agents will replace the Database metric name with Datastore/${DBTYPE}, where ${DBTYPE} will identify the appropriate database; for example, Postgres, MongoDB, MSSQL, ODBC, Redis, SQLite, Memcached, etc.

Would it be possible to make use of Datastore/${DBTYPE} in the newrelic-redis gem? It sounds like it's an all around improvement over Database/${DBTYPE}.

Datastore metrics revision

Was doing some research on third-party extensions to the Ruby agent (newrelic_rpm), and I happened across #18.

There's actually work needed on the New Relic UI side to enable the Datastore functionality. These changes alone won't work until a new (as yet unreleased) Ruby agent is available.

Also, it looks like the metric names will need to be tweaked to line up with what the New Relic UI is expecting.

Given that, could we hold up on releasing newrelic-redis with these changes until the new Ruby agent is out? I'll get back to you when that's available, along with the finalized metrics to record then.

Sinatra support

I don't get any New Relic profiling for Redis in my Sinatra app. Should it work? If so what am I missing?

I have the following in my Gemfile:

gem 'newrelic_rpm', '3.4.2.1'
gem 'newrelic-redis', '1.3.2'

And the following in app.rb:

configure :production do
  require 'newrelic_rpm'
end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.