1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use the right instrumentation name

The pattern is event.component

Closes #11769

Conflicts:
	railties/CHANGELOG.md
This commit is contained in:
Rafael Mendonça França 2013-08-05 18:16:41 -03:00
parent 9b6a434def
commit d86ccec097
3 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,7 @@
* Fix the event name of action_dispatch requests.
*Rafael Mendonça França*
* Make `config.log_level` work with custom loggers.
*Max Shytikov*

View file

@ -33,7 +33,7 @@ module Rails
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 @@ module Rails
private
def finish(request)
@instrumenter.finish 'action_dispatch.request', request: request
@instrumenter.finish 'request.action_dispatch', request: request
end
def development?

View file

@ -38,7 +38,7 @@ module Rails
def setup
@subscriber = Subscriber.new
@notifier = ActiveSupport::Notifications.notifier
notifier.subscribe 'action_dispatch.request', subscriber
notifier.subscribe 'request.action_dispatch', subscriber
end
def teardown