DataDog / dd-trace-rb

Datadog Tracing Ruby Client
https://docs.datadoghq.com/tracing/
Other
304 stars 369 forks source link

Allow to append (instead of prepend) `Propagation::SqlComment` comment #3601

Closed beauraF closed 3 weeks ago

beauraF commented 4 months ago

Hello 👋

When database monitoring is enable, and propagation mode is set to full or service, ddtrace is prepending a comment to each SQL query.

https://github.com/DataDog/dd-trace-rb/blob/master/lib/datadog/tracing/contrib/propagation/sql_comment.rb

While we understand the value of having them prefixed, this comes with the drawbacks of breaking query preview of other monitoring tool like AWS Performance Insights.

Would it be possible to expose a configuration in order to opt for suffixing instead of prefixing? Note that we maintain a patch on our side to handle this, and Database Monitoring still behaves correctly.

justiniso commented 4 months ago

Hi @beauraF! Thanks for bringing this to our attention. I've made a note of this internally, but I would suggest opening a feature request with Datadog Support as well so we have a record tied to your account. I'll discuss this with the engineering team on how we want to approach this.

I'm going to close this issue for now. By opening a feature request with support, you will also be notified of any updates.

marcotc commented 1 month ago

We are adding this option in https://github.com/DataDog/dd-trace-rb/pull/3809

TonyCTHsu commented 2 weeks ago

👋 @beauraF 2.3.0 is released, give it a try!

beauraF commented 4 days ago

Thanks @TonyCTHsu! Works great 🙏