-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[connector/datadog] Support obfuscating sql queries in APM stats #35401
Conversation
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
cc @jackgopack4 for context |
@@ -158,3 +176,20 @@ func (c *traceToMetricConnectorNative) run() { | |||
} | |||
} | |||
} | |||
|
|||
// fork of https://github.com/DataDog/datadog-agent/blob/7642cf1aa659f82744038602044a8a00aa1a0dfb/pkg/trace/agent/obfuscate.go#L109 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this sustainable long-term? Is it possible we could add this as a function to pkg/obfuscate
instead so that it doesn't get forgotten when obfuscate folks make changes to their obfuscateStatsGroup calculations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are already having to import pkg/obfuscate; I feel like we could add a function there that takes the c.obfuscator
as a parameter instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
submitted a PR to modify the signature of this function in trace agent: DataDog/datadog-agent#32064
closing in favor of DataDog/datadog-agent#32750 |
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Support obfuscating SQL and Redis queries in APM stats in Datadog Connector. replace statement in otelcontribcol was necessary due to failing build in pipeline. It doesn't appear that any modules use any affected functions, but building otelcontribcol with ocb failed due to an API change. Also opened an issue to bump the `receiver/awscontainerinsight` dependency so that this replace can be removed in the future: #37486 <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Replaces #35401 <!--Describe what testing was performed and which tests were added.--> #### Testing Added TestObfuscate in connector_native_test.go <!--Describe the documentation added.--> #### Documentation added release note and link to semantics on Datadog vendor website <!--Please delete paragraphs that you did not use before submitting.-->
…emetry#37457) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Support obfuscating SQL and Redis queries in APM stats in Datadog Connector. replace statement in otelcontribcol was necessary due to failing build in pipeline. It doesn't appear that any modules use any affected functions, but building otelcontribcol with ocb failed due to an API change. Also opened an issue to bump the `receiver/awscontainerinsight` dependency so that this replace can be removed in the future: open-telemetry#37486 <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Replaces open-telemetry#35401 <!--Describe what testing was performed and which tests were added.--> #### Testing Added TestObfuscate in connector_native_test.go <!--Describe the documentation added.--> #### Documentation added release note and link to semantics on Datadog vendor website <!--Please delete paragraphs that you did not use before submitting.-->
Description:
Support obfuscating sql queries in APM stats in DD connector
This simulates the same in trace agent: https://github.com/DataDog/datadog-agent/blob/7642cf1aa659f82744038602044a8a00aa1a0dfb/pkg/trace/agent/obfuscate.go#L109