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

Change in behavior in 2.0 for the Rails activerecord integration #4179

Open
alexevanczuk opened this issue Dec 2, 2024 · 0 comments
Open
Labels
bug Involves a bug community Was opened by a community member

Comments

@alexevanczuk
Copy link
Contributor

The rails instrumentation sets up an activerecord integration here: https://github.com/DataDog/dd-trace-rb/blob/master/lib/datadog/tracing/contrib/rails/framework.rb

This sets up a service called postgres via the activerecord configuration (lib/datadog/tracing/contrib/active_record/configuration/settings.rb) which calls Utils.adapter_name which calls Contrib::Utils::Database.normalize_vendor(connection_config[:adapter]) which evaluates to postgres.

In our postgres service, we're now seeing new errors come in after the 2.0 upgrade. We typically turn off error propagation for our instrumentations because it results in double signal. That is – if an error propagates up and causes an application bug, it results in a bug in an outer span beyond the instrumentation. Normally we just set the on_error (or error_handler prior to the 2.0 upgrade) as a no-op to not attach these errors to these instrumentation spans. However, we didn't need this for the rails instrumentation before, and now after 2.0 there doesn't appear to be a configuration option in lib/datadog/tracing/contrib/rails/configuration/settings.rb that allows us to no-op these postgres errors.

Please let me know your recommendation for disabling these errors again! Thank you!

@alexevanczuk alexevanczuk added bug Involves a bug community Was opened by a community member labels Dec 2, 2024
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

1 participant