Browse files

Use the right instrumentation name

The pattern is event.component

Closes #11769
  • Loading branch information...
1 parent 45764ad commit aee5fe9f7feaa3f4110721c509c7d22f1ea92012 @rafaelfranca rafaelfranca committed Aug 5, 2013
Showing with 7 additions and 3 deletions.
  1. +4 −0 railties/CHANGELOG.md
  2. +2 −2 railties/lib/rails/rack/logger.rb
  3. +1 −1 railties/test/rack_logger_test.rb
View
4 railties/CHANGELOG.md
@@ -1,5 +1,9 @@
## unreleased ##
+* Fix the event name of action_dispatch requests.
+
+ *Rafael Mendonça França*
+
* Make `config.log_level` work with custom loggers.
*Max Shytikov*
View
4 railties/lib/rails/rack/logger.rb
@@ -33,7 +33,7 @@ def call_app(request, env)
logger.debug ''
end
- @instrumenter.start 'action_dispatch.request', request: request
+ @instrumenter.start 'request.action_dispatch', request: request
logger.info started_request_message(request)
resp = @app.call(env)
resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request) }
@@ -70,7 +70,7 @@ def compute_tags(request)
private
def finish(request)
- @instrumenter.finish 'action_dispatch.request', request: request
+ @instrumenter.finish 'request.action_dispatch', request: request
end
def development?
View
2 railties/test/rack_logger_test.rb
@@ -38,7 +38,7 @@ def finish(name, id, payload)
def setup
@subscriber = Subscriber.new
@notifier = ActiveSupport::Notifications.notifier
- notifier.subscribe 'action_dispatch.request', subscriber
+ notifier.subscribe 'request.action_dispatch', subscriber
end
def teardown

0 comments on commit aee5fe9

Please sign in to comment.