Skip to content

[BUG]: new warning from 2.16.0 #4670

Description

@modosc

Tracer Version(s)

2.16.0

Ruby Version(s)

3.4.1

Relevent Library and Version(s)

No response

Bug Report

since we upgraded from 2.15.0 to 2.16.0 we started getting this warning in our logs:

W, [2025-05-20T17:40:04.980636 #1448]  WARN -- datadog: [datadog] on_error argument to SpanOperation ignored because is not a Proc: #<Method: Net::HTTP(Datadog::Tracing::Contrib::HTTP::Instrumentation::InstanceMethods)#annotate_span_with_error!(span, error) /rails/vendor/ruby/3.4.0/gems/datadog-2.16.0/lib/datadog/tracing/contrib/http/instrumentation.rb:115>

Reproduction Code

No response

Configuration Block

  # see https://github.com/DataDog/dd-trace-rb/issues/2012
  Datadog.configuration.tracing.log_injection = false

  # ugh, see https://github.com/DataDog/dd-trace-rb/issues/4231#issuecomment-2548035220
  Datadog.configure { |c| c.logger.level = Logger::ERROR }

  Datadog.configure do |c|
    c.profiling.enabled = true
    # enable allocation profiling, see https://www.datadoghq.com/blog/ruby-allocations-profiler/
    c.profiling.allocation_enabled = true
    # enable gvl profiling, see https://rubykaigi.org/2023/presentations/KnuX.html
    c.profiling.advanced.preview_gvl_enabled = true

    c.tracing.enabled = true
    c.tracing.instrument :action_mailer
    c.tracing.instrument :action_cable
    c.tracing.instrument :rails
    c.tracing.instrument :faraday, split_by_domain: true
  end

  # ignore healthcheck
  Datadog::Tracing.before_flush(
    Datadog::Tracing::Pipeline::SpanFilter.new { |span| span.resource.include? "HealthController#show" },
  )

Error Logs

No response

Operating System

No response

How does Datadog help you?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugInvolves a bugcommunityWas opened by a community member

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions