Payload params class is a ActiveSupport::HashWithIndifferentAccess
Opened this issue · 2 comments
StoneGod commented
Environment
Provide at least:
- Ruby Version. - 3.3.5
- Rails Version. - 7.1.4
- Semantic Logger Version. - 4.16.1
- Rails Semantic Logger Version. - 4.14.0
- Other Application/framework names and versions (e.g. Puma, etc.).
From: /usr/local/bundle/gems/rails_semantic_logger-4.14.0/lib/rails_semantic_logger/action_controller/log_subscriber.rb:13 RailsSemanticLogger::ActionController::LogSubscriber#process_action:
8: controller_logger(event).debug { "Processing ##{event.payload[:action]}" }
9: end
10:
11: def process_action(event)
12: controller_logger(event).info do
=> 13: binding.pry
14: payload = event.payload.dup
15:
16: # Unused, but needed for Devise 401 status code monkey patch to still work.
17: ::ActionController::Base.log_process_action(payload)
18:
[1] pry(#<RailsSemanticLogger::ActionController::LogSubscriber>)> event
=> #<ActiveSupport::Notifications::Event:0x00007fffcfc6ea68
[2] pry(#<RailsSemanticLogger::ActionController::LogSubscriber>)> event.payload[:params].class
=> ActiveSupport::HashWithIndifferentAccess
Because of this, kibana cannot parse payload params
I can make an MP with a fix if this is really a bug and not a configuration problem
Drowze commented
I can confirm this is also the case on Rails Semantic logger 4.17.0
Because of this, kibana cannot parse payload params
Where do you see an error/problem?
HashWithIndifferentAccess is not a problem for us (though we just output our JSON logs to stdout - which seems to be different from your usecase)
StoneGod commented
I'm still looking for reasons. But the problem is that Kibana does not parse parameters