Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mysql adding query values in instrumented mysql query #256

Closed

Conversation

iassal
Copy link

@iassal iassal commented Dec 5, 2017

CHANGE LOG

Changing mysql instrumentation to insert values in sql query

Example: Instead of instrumenting select * from user where id = ?, we'll instrument select * from user where id = 12345

INTERNAL LINKS

NOTES

@NatalieWolfe
Copy link
Contributor

Hi @iassal! Thanks for the contribution. The reason we don't do value substitution in the queries is that the query values could be sensitive. It could include email addresses, home addresses, API keys, social security numbers, passwords, names, credit card numbers, insurance information, or any number of other pieces of sensitive information that could be stored in a database.

Some of our customers have strict regulations that limit what can be sent to third parties such as us. Even putting this behind a configuration value could make it legally treacherous for these companies to use the Node Agent.

If you really want to do this, I would recommend you use newrelic.recordCustomEvent() and put both the original query and your query with substituted values into the attributes along with any other information you are interested in. You can then create a dashboard on Insights for these events.

@iassal
Copy link
Author

iassal commented Dec 6, 2017

Thanks @NatalieWolfe for sharing your insights! I'll explore the recordCustomEventApproach.

bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this pull request Apr 19, 2024
bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this pull request Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants