[APMS-17529][APMAPI-1751]: Error tracking default grouping is taking gem frames into account
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:
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
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 sure thing! I've opened request #2268925 with the same info. Happy to provide additional details as necessary in that system.
Perfect, I can see it on our support board, thank you!
Hello 👋 Do you have some updates on this issue? As we are facing the same
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.
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
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?