-
Notifications
You must be signed in to change notification settings - Fork 324
Add USM instrumentation #4813
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
Add USM instrumentation #4813
Conversation
- removed SSLSocketImpl and its inner classes from ignored_class_name.trie to allow instrumenting them
….trie to allow instrumenting them
- sending captured data via ioctl with a special request code - using USMExtractor directly from SSLSocket advices
- updated MAX_HTTP_BUFFER_SIZE to match the relevant value on the Systemprobe side
…g-agent/pkg/network/ebpf/c/tracer.h
…ffer - added prints to ioctl execution - fixed connection encoding - fixed message validation bug
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
- added args parsing when injecting the agent dynamically
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
…encies in internal-api and agent-tooling modules. Instead, passing the connenction tuple directly from the advice
…tion-profile' into valeri.pliskin/java-tls-support-java-sdk16-and-above
…-java-sdk16-and-above Remove SSLSocketImpl references to support JDK 16 and above
Signed-off-by: Guillaume Pagnoux <[email protected]>
…sm-intrumentation-profile
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
…sm-intrumentation-profile
Signed-off-by: Guillaume Pagnoux <[email protected]>
dd-java-agent/agent-builder/src/main/java/datadog/trace/agent/tooling/AgentInstaller.java
Outdated
Show resolved
Hide resolved
internal-api/src/test/groovy/datadog/trace/util/StringsTest.groovy
Outdated
Show resolved
Hide resolved
Signed-off-by: Guillaume Pagnoux <[email protected]>
internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/UsmConnection.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Guillaume Pagnoux <[email protected]>
...t/src/main/java/datadog/trace/instrumentation/sslsocket/SslSocketStreamsInstrumentation.java
Outdated
Show resolved
Hide resolved
...slsocket/src/main/java/datadog/trace/instrumentation/sslsocket/SslSocketInstrumentation.java
Outdated
Show resolved
Hide resolved
...t/src/main/java/datadog/trace/instrumentation/sslsocket/SslSocketStreamsInstrumentation.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
mcculls
left a comment
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.
Needs a bit more cleanup before this can be merged - see comments about using USM specific package for new types and preferring agent-bootstrap over internal-api for bootstrap related instrumentation types
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/Agent.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Guillaume Pagnoux <[email protected]>
internal-api/src/main/java/datadog/trace/api/InstrumenterConfig.java
Outdated
Show resolved
Hide resolved
mcculls
left a comment
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.
Once the unrelated formatting changes have been cleaned up this should be OK to merge
Signed-off-by: Guillaume Pagnoux <[email protected]>
Signed-off-by: Guillaume Pagnoux <[email protected]>
Valeri is on PTO but we need this merged this week
Signed-off-by: Guillaume Pagnoux <[email protected]>
|
This breaks logic introduced in #4888 Specifically the part in parses agent arguments and injects them as system properties. The same logic was implemented in As the code added here expects args to be separated with space, when args are supplied in previous comma-separated format, they are all lumped together and injected under the name of the first arg. My suggestion would be to revert the |
What Does This Do
This PR adds a new instrumentation,
sslsocket, that captures HTTPS traffic in Java applications that useSSLSocketunder the hood, and sends it tosystem-probevia a customioctl. This part of USM's HTTPS monitoring support.Few things to note:
system-probe(which usesjattachunder the hood), which requires a different way to get thejavaagentargs, hence the addition toagentmain.ioctlusingjna. The dependency tojnais the reasonUsmMessageandUsmExtractorimplementations are in separate packages.ioctlcall as a side-effect, the included instrumentation test focuses on the "instrumentation part" i.e the advices, to make sure it does the expected calls to the implementation that makes the actualioctlcall.Changes for second review round
SSLSocketinstead ofSSLSocketImpl.Motivation
Additional Notes