dd-trace-rb icon indicating copy to clipboard operation
dd-trace-rb copied to clipboard

[APMS-17529][APMAPI-1751]: Error tracking default grouping is taking gem frames into account

Open agrobbin opened this issue 4 months ago • 6 comments

Tracer Version(s)

2.21.0

Ruby Version(s)

ruby 3.4.6 (2025-09-16 revision dbd83256b1) +PRISM

Relevent Library and Version(s)

pg 1.6.2

Bug Report

We had 2 instances of PG statement timeouts in different areas of the application. In one case, that scenario is unfortunate but expected (it is gracefully retried in the background) and was ignored in DD Error Tracking, however in another area it is entirely unexpected and was a sign of an issue to be investigated.

Unfortunately, the error fingerprint of both exceptions was grouped together, and according to the Error Tracking grouping explanation, the reason it was grouped together was because of the actual datadog gem tracing:

Image

This seems like a surprising experience, with Datadog tracing actually changing the grouping logic of errors.

Reproduction Code

No response

Configuration Block

No response

Error Logs

No response

Operating System

No response

How does Datadog help you?

No response

agrobbin avatar Oct 07 '25 18:10 agrobbin

Hey! Thanks a lot of the report, and sorry for the issue.

Can I ask that you report this via the support request link? Since this may need some work from both dd-trace-rb and some tweaks on the error tracking part, we should be able to better communicate and escalate via that route.

ivoanjo avatar Oct 13 '25 13:10 ivoanjo

@ivoanjo sure thing! I've opened request #2268925 with the same info. Happy to provide additional details as necessary in that system.

agrobbin avatar Oct 13 '25 16:10 agrobbin

Perfect, I can see it on our support board, thank you!

ivoanjo avatar Oct 14 '25 07:10 ivoanjo

Hello 👋 Do you have some updates on this issue? As we are facing the same

marcovaccari avatar Nov 20 '25 13:11 marcovaccari

Hey @marcovaccari! Unfortunately the fix will need some work on the backend side and will take some time 😓

I've left a note on the internal ticket to +1 on your behalf on this.

ivoanjo avatar Nov 25 '25 13:11 ivoanjo

Hi @ivoanjo I'd like to +1 this on behalf of Underdog as well. It causes lots of errors to be grouped that shouldn't be grouped and is going to be a blocker for us to start using DD Error Tracking over something like Honey Badger.

I will add that this basically happens with all errors that get raised from within the DD Tracing Instrumentation integrations

orionstudt avatar Dec 10 '25 00:12 orionstudt

hi @ivoanjo 👋 in the documentation there is a section about custom fingerprint that can be used https://docs.datadoghq.com/tracing/error_tracking/error_grouping/?tab=android#custom-grouping but it seems to be related to Android?

Is there a way for ruby integration to write some lambda that would receive an exception and allow to compute the customer fingerprint in the current dd-trace-rb library?

adrian-tp avatar Dec 18 '25 09:12 adrian-tp