Skip to content

ActiveRecord SQL spans don't have the same service name as Instantiation spans #3359

Open

Description

Current behaviour
ActiveRecord SQL calls reflect the configured service name, but instantiations do not

The difference is clear comparing the contrib code: sql gets the settings, instantiation does not:
https://github.com/DataDog/dd-trace-rb/blob/master/lib/datadog/tracing/contrib/active_record/events/sql.rb#L34
vs
https://github.com/DataDog/dd-trace-rb/blob/master/lib/datadog/tracing/contrib/active_record/events/instantiation.rb#L32

Expected behaviour
Since this is part of the active record instrumentations, the service name should match the other instrumentation for active record spans.

Steps to reproduce
Instrument active record and create an instantiation something like below should make something that creates instantiations

class ApplicationRecord < ActiveRecord::Base
  self.abstract_class = true
end

Environment

  • ddtrace version: ddtrace (~> 1.14.0)
  • Configuration block (Datadog.configure ...):
  • Ruby version: 3.2.2 and 3.1.3
  • Operating system: Alpine and Rocky Linux
  • **Relevant library versions: ddtrace (~> 1.14.0) **
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugInvolves a bugcommunityWas opened by a community member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions