Skip to content

Changes the message that appears in eg flamegraph when the SQL cannot be obfuscated - #9289

Closed
andrewl wants to merge 2 commits into
DataDog:mainfrom
andrewl:andrewl/change-sql-obfuscation-message
Closed

Changes the message that appears in eg flamegraph when the SQL cannot be obfuscated#9289
andrewl wants to merge 2 commits into
DataDog:mainfrom
andrewl:andrewl/change-sql-obfuscation-message

Conversation

@andrewl

@andrewl andrewl commented Sep 28, 2021

Copy link
Copy Markdown

What does this PR do?

Changes the message that appears in eg flamegraph when the SQL obfuscator fails from "Non-parsable SQL query" to "Cannot obfuscate: Non-parsable SQL query".

This makes is clearer as to the origin of the error - otherwise to the uninitiated it looks as if it is the database throwing an error during SQL execution, when it is the logging tool, datadog, throwing an error during logging (specifically obfuscation).

Motivation

My team spent a few days diving down a rabbit-hole trying to debug what they thought was a complex SQL error, when in fact, everything was working fine and they should have ignored this error.

Additional Notes

If I save the sanity of another team, it will all have been worth it.

Describe how to test your changes

Throw a suitably complex, but correct, SQL statement at your database and watch the obfuscator weep. Ours was about 2000 lines long, but that's our problem.

@andrewl
andrewl requested a review from a team as a code owner September 28, 2021 20:49
@bits-bot

bits-bot commented Sep 28, 2021

Copy link
Copy Markdown
Collaborator

CLA assistant check
All committers have signed the CLA.

@andrewl andrewl changed the title Changes the message that appears in eg flamegraph when the SQL Changes the message that appears in eg flamegraph when the SQL cannot be obfuscated Sep 28, 2021
@andrewl
andrewl marked this pull request as draft September 28, 2021 21:21

const sqlQueryTag = "sql.query"
const nonParsableResource = "Non-parsable SQL query"
const nonParsableResource = "Cannot obfuscate: Non-parsable SQL query"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you that this is more explicit but unfortunately making this change would break backwards compatibility for anyone tracking this value, which is very likely. I'm afraid we can't make this change. At most we could edit the log output and make that better, but I'm not sure if that'll actually help.

@dd-octo-sts

dd-octo-sts Bot commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had activity in the past 15 days.

It will be closed in 30 days if no further activity occurs. If this pull request is still relevant, adding a comment or pushing new commits will keep it open. Also, you can always reopen the pull request if you missed the window.

Thank you for your contributions!

@jacjtito

Copy link
Copy Markdown

Hi,

We are closing this PR as there was no recent activity on it. Feel free to reopen it if you still need the feature.
Thanks

@jacjtito jacjtito closed this Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants