Skip to content

Active Record Instrumentation bug in combination with permanent_records gem. #1851

@mikesapienza

Description

@mikesapienza

When using the OTEL instrumentation gem with the permanent_records gem, this monkey patch causes an argument error because permanent records allows (:force) to be passed to destroy. Argument forwarding can be added to the destroy method to fix this. We have it monkey patched in our app would it be possible to get this fixed in the gem?

module OpenTelemetry
    module Instrumentation
      module ActiveRecord
        module Patches
          module Persistence
            def destroy(...)
              tracer.in_span("#{self.class}#destroy") do
                super
              end
            end
          end
        end
      end
    end
  end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions