[Prod] Ignore pg errors during rack requests

These are handled at the application level
This commit is contained in:
Earlopain 2024-04-15 19:55:41 +02:00
parent 3229106431
commit 0a35264ad8
No known key found for this signature in database
GPG Key ID: 48860312319ADF61

View File

@ -11,4 +11,11 @@ Datadog.configure do |c|
}, },
}, },
} }
# Ignore pg errors during rack requests
c.tracing.instrument :pg, on_error: ->(span, error) do
if Datadog::Tracing.active_trace&.name != Datadog::Tracing::Contrib::Rack::Ext::SPAN_REQUEST
span&.set_error(error)
end
end
end end