instana / ruby-sensor

💎 Ruby Distributed Tracing & Metrics Sensor for Instana
https://www.instana.com/
MIT License
26 stars 25 forks source link

[Bug]: Error with logger usage breaks installation #264

Closed synth closed 2 years ago

synth commented 2 years ago

Problem Description

I am just getting started with Instana and simply added the gem and tried to deploy. Our deploy is crashing because we are getting:

2021-12-04 23:59:40W, [2021-12-04T23:59:40.185580 #71] WARN -- : An error occurred when sending a notification using 'logger' notifier.ActionView::Template::Error: wrong number of arguments (given 2, expected 0)
2021-12-04 23:59:40/usr/src/app/vendor/bundle/ruby/2.7.0/gems/instana-1.7.5/lib/instana/frameworks/instrumentation/action_view.rb:9:in `render_partial_with_instana'

Minimal, Complete, Verifiable, Example

This is our logger usage:

  if ENV["RAILS_LOG_TO_STDOUT"].present?
    logger           = ActiveSupport::Logger.new(STDOUT)
    logger.formatter = config.log_formatter
    config.logger = ActiveSupport::TaggedLogging.new(logger)
  end

Gemfile.lock

instana (1.7.5)
      ffi (>= 1.8.1)
      get_process_mem (>= 0.2.1)
      sys-proctable (>= 1.1.3)
      timers (>= 4.0.0)

Ruby Version

2.7.2
hmadison commented 2 years ago

Hi @synth,

It looks like you are running a very old version of the Instana gem. Can you try to reproduce the issue on v1.208.0?

Thanks, Hunter

synth commented 2 years ago

Ahh, thanks. Got auto-installed to an earlier version of instana due to dependency conflict with oj gem. Will resolve on my end. Thanks.