Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Error with APM on pg traces sicne updating to 2.x #4258

Closed
wyardley opened this issue Jan 6, 2025 · 3 comments
Closed

[BUG]: Error with APM on pg traces sicne updating to 2.x #4258

wyardley opened this issue Jan 6, 2025 · 3 comments
Labels
bug Involves a bug community Was opened by a community member

Comments

@wyardley
Copy link

wyardley commented Jan 6, 2025

Tracer Version(s)

2.8.0

Ruby Version(s)

ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x86_64-linux-musl]

Relevent Library and Version(s)

pg (1.4.1)

Bug Report

Since updating to 2.x, we're seeing this error:

E, [2025-01-06T10:22:31.740031 #56844] ERROR -- datadog: [datadog] (/usr/local/bundle/gems/datadog-2.8.0/lib/datadog/tracing/contrib/active_record/events/sql.rb:72:in `rescue in on_start') You can't invoke instance_variable_get on #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x00007f0793ed89a0>

The APM is being initialized in a pretty vanilla way, I think (leaving out some of the irrelevant config options):

Reproduction Code

No response

Configuration Block

Datadog.configure do |c|
  if enable_datadog
    require "datadog/auto_instrument"
    c.tracing.instrument :pg, comment_propagation: "full"
    # [...]
end

Error Logs

E, [2025-01-06T10:22:31.740031 #56844] ERROR -- datadog: [datadog] (/usr/local/bundle/gems/datadog-2.8.0/lib/datadog/tracing/contrib/active_record/events/sql.rb:72:in `rescue in on_start') You can't invoke instance_variable_get on #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x00007f0793ed89a0>

Operating System

Linux cd8a7bf08538 6.10.14-linuxkit #1 SMP

How does Datadog help you?

No response

@wyardley wyardley added bug Involves a bug community Was opened by a community member labels Jan 6, 2025
@wyardley
Copy link
Author

wyardley commented Jan 6, 2025

I came across #4179, but don't think it's related.

@wyardley
Copy link
Author

wyardley commented Jan 8, 2025

Issue turned out to be in rails console only, and related to a gem that interfered with the APM, so this is resolved now.

@wyardley wyardley closed this as completed Jan 8, 2025
@ivoanjo
Copy link
Member

ivoanjo commented Jan 8, 2025

Thanks for letting us know @wyardley 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug community Was opened by a community member
Projects
None yet
Development

No branches or pull requests

2 participants