Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove redis instrumentation and update readme to point to newrelic-r…

…edis
  • Loading branch information...
commit 6b450a756b72a543b0c2989bfe9f02c590e717ed 1 parent b1f68bd
@samg samg authored
View
34 README.md
@@ -3,6 +3,29 @@
The `rpm_contrib` gem contains instrumentation for the New Relic RPM agent
contributed by the community of RPM users. It requires the RPM Agent to run.
+## Deprecation of RPM Contrib
+
+Over the next several months we are planning to phase out the rpm_contrib gem.
+We plan to migrate the existing instrumentation into separate projects that
+instrument indivdual libraries or frameworks. We see this as having a number of
+advantages for newrelic users. We will provide a list of recommended
+instrumentation projects.
+
+### Removal of Redis Instrumenation
+
+As of version 2.1.8 Redis instrumentation has been removed from rpm_contrib.
+Please use Evan Phoenix's `newrelic-redis` gem instead.
+https://github.com/evanphx/newrelic-redis
+
+### Request for Maintainers
+
+If you're interested in maintaining instrumentation for a specific
+library/framework, please let us know. We'd love to work with you and promote
+your project. -The New Relic Ruby Agent Team
+
+
+## Getting Started
+
To use the rpm_contrib gem, install the `rpm_contrib` gem from rubygems.org.
It will also install the required version of the `newrelic_rpm` gem if it's not
already installed.
@@ -23,9 +46,6 @@ require the rpm_contrib gem:
require 'rubygems'
require 'rpm_contrib'
-When you load the rpm_contrib gem, the `newrelic_rpm` gem will also be
-initialized. No need for a separate require statement for `newrelic_rpm`.
-
In non-Rails frameworks, it's important that the New Relic Agent gets
loaded as late as possible, or that the final initialization hook is called
after all other frameworks have loaded:
@@ -43,6 +63,7 @@ fix the auto-detection logic.
If this does not help then set the `log_level` to `debug` in the `newrelic.yml` file
and examine the `newrelic_agent.log` file for errors after restarting your app.
+
## Supported Frameworks
A number of frameworks are supported in the contrib gem. They are all turned on
@@ -122,11 +143,10 @@ To disable resque, set 'disable_resque' to true in your newrelic.yml file.
### Redis
-Redis instrumentation will record operations as well as `allWeb` and `allOther`
-summary metrics under the `Database/Redis` metric namespace. This instrumentation
-supports Redis versions 1.x and 2.x.
+Redis instrumentation has been removed from rpm_contrib.
-To disable Redis instrumentation, set 'disable_redis' to true in your newrelic.yml file.
+Please use Evan Phoenix's `newrelic-redis` gem instead.
+https://github.com/evanphx/newrelic-redis
### Riak
View
42 lib/rpm_contrib/instrumentation/redis.rb
@@ -1,42 +0,0 @@
-# Redis instrumentation contributed by Ashley Martens of ngmoco
-#
-DependencyDetection.defer do
- @name = :redis
-
- depends_on do
- defined?(::Redis) && !NewRelic::Control.instance['disable_redis']
- end
-
- executes do
- NewRelic::Agent.logger.debug 'Installing Redis instrumentation'
- end
-
- executes do
- ::Redis::Client.class_eval do
-
- include NewRelic::Agent::MethodTracer
-
- def self.redis_call_method
- ::Redis::Client.new.respond_to?(:call) ? :call : :raw_call_command
- end
-
-
- def raw_call_command_with_newrelic_trace *args
- method_name = args[0].is_a?(Array) ? args[0][0] : args[0]
- metrics = ["Database/Redis/#{method_name}",
- (NewRelic::Agent::Instrumentation::MetricFrame.recording_web_transaction? ? 'Database/Redis/allWeb' : 'Database/Redis/allOther')]
- self.class.trace_execution_scoped(metrics) do
- # NewRelic::Control.instance.log.debug("Instrumenting Redis Call[#{method_name}]: #{args[0].inspect}")
- raw_call_command_without_newrelic_trace(*args)
- end
- end
-
- alias_method :raw_call_command_without_newrelic_trace, redis_call_method
- alias_method redis_call_method, :raw_call_command_with_newrelic_trace
-
- end
- end
-end
-
-
-
View
34 test/test_redis.rb
@@ -1,34 +0,0 @@
-require "#{File.dirname(__FILE__)}/helper"
-begin
- require 'redis'
- require 'ruby-debug'
-rescue LoadError
-end
-
-require "#{File.dirname(__FILE__)}/../lib/rpm_contrib/instrumentation/redis"
-
-if defined?(::Redis)
-
-
- class RedisTest < Test::Unit::TestCase
-
- # Called before every test method runs. Can be used
- # to set up fixture information.
- def setup
- # Do nothing
- end
-
- # Called after every test method runs. Can be used to tear
- # down fixture information.
-
- def teardown
- # Do nothing
- end
-
- # Fake test
- def test_fail
-
-
- end
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.