зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-09-03 17:55:52 +03:00
Specs for instrumentation
Этот коммит содержится в:
@@ -81,7 +81,8 @@ module Telegram
|
||||
include AbstractController::Translation
|
||||
include Rescue
|
||||
include ReplyHelpers
|
||||
prepend Instrumentation
|
||||
include Instrumentation
|
||||
|
||||
extend Session::ConfigMethods
|
||||
|
||||
PAYLOAD_TYPES = %w[
|
||||
|
||||
@@ -4,12 +4,13 @@ module Telegram
|
||||
# Most methods are taken from ActionController::Instrumentation,
|
||||
# some are slightly modified.
|
||||
module Instrumentation
|
||||
class << self
|
||||
def prepended(base)
|
||||
base.send :config_accessor, :logger
|
||||
base.extend ClassMethods
|
||||
end
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
config_accessor :logger
|
||||
end
|
||||
|
||||
class << self
|
||||
def instrument(action, *args, &block)
|
||||
ActiveSupport::Notifications.instrument(
|
||||
"#{action}.updates_controller.bot.telegram",
|
||||
|
||||
Ссылка в новой задаче
Block a user