138 lines
3.0 KiB
Plaintext
138 lines
3.0 KiB
Plaintext
### The contributions are injected using this file and byteman
|
|
###
|
|
### Helpers are a DD specific, they are defined in the current project
|
|
### The rule names provided (RULE <rulename>) are also used in the configuration.
|
|
### The name is used to remove the script if there is no support of the framework
|
|
###
|
|
### So, ensure that the rule name is correct defined both here and in the dd-trace-supported-framework.yaml
|
|
###
|
|
|
|
|
|
# Instrument Apache HTTP Client
|
|
# =============================
|
|
RULE opentracing-apache-httpclient
|
|
CLASS org.apache.http.impl.client.HttpClientBuilder
|
|
METHOD create()
|
|
HELPER com.datadoghq.trace.agent.integration.ApacheHTTPClientHelper
|
|
AT EXIT
|
|
IF TRUE
|
|
DO
|
|
$! = patch($!);
|
|
ENDRULE
|
|
|
|
|
|
|
|
# Instrument AWS SDK client
|
|
# ==========================
|
|
RULE opentracing-aws-sdk
|
|
CLASS ^com.amazonaws.client.builder.AwsClientBuilder
|
|
METHOD build()
|
|
HELPER com.datadoghq.trace.agent.integration.AWSClientHelper
|
|
AT ENTRY
|
|
IF TRUE
|
|
DO
|
|
patch($this);
|
|
ENDRULE
|
|
|
|
|
|
# Instrument Cassandra client
|
|
# ===========================
|
|
RULE opentracing-cassandra-driver
|
|
CLASS com.datastax.driver.core.Cluster$Manager
|
|
METHOD newSession()
|
|
HELPER com.datadoghq.trace.agent.integration.CassandraHelper
|
|
AT EXIT
|
|
IF TRUE
|
|
DO
|
|
$! = patch($!);
|
|
ENDRULE
|
|
|
|
|
|
# Instrument JMS
|
|
# ===========================
|
|
RULE opentracing-jms-2_producer
|
|
INTERFACE javax.jms.Session
|
|
METHOD createProducer
|
|
HELPER com.datadoghq.trace.agent.integration.JMSMessageProducerHelper
|
|
AT EXIT
|
|
IF TRUE
|
|
DO
|
|
$! = patch($!);
|
|
ENDRULE
|
|
|
|
|
|
RULE opentracing-jms-2_consumer
|
|
INTERFACE javax.jms.Session
|
|
METHOD createConsumer
|
|
HELPER com.datadoghq.trace.agent.integration.JMSMessageConsumerHelper
|
|
AT EXIT
|
|
IF TRUE
|
|
DO
|
|
$! = patch($!);
|
|
ENDRULE
|
|
|
|
|
|
# Instrument Mongo client
|
|
# ========================
|
|
RULE opentracing-mongo-driver
|
|
CLASS com.mongodb.MongoClientOptions$Builder
|
|
METHOD build
|
|
HELPER com.datadoghq.trace.agent.integration.MongoHelper
|
|
AT ENTRY
|
|
IF getState($0) == 0
|
|
DO
|
|
patch($this);
|
|
ENDRULE
|
|
|
|
RULE opentracing-mongo-driver-helper
|
|
CLASS io.opentracing.contrib.mongo.TracingCommandListener
|
|
METHOD decorate
|
|
HELPER com.datadoghq.trace.agent.integration.MongoHelper
|
|
AT EXIT
|
|
IF TRUE
|
|
DO
|
|
decorate($1, $2);
|
|
ENDRULE
|
|
|
|
|
|
# Instrument OkHttp
|
|
# ===========================
|
|
RULE opentracing-okhttp3
|
|
CLASS okhttp3.OkHttpClient$Builder
|
|
METHOD build()
|
|
HELPER com.datadoghq.trace.agent.integration.OkHttpHelper
|
|
AT ENTRY
|
|
IF TRUE
|
|
DO
|
|
patch($this)
|
|
ENDRULE
|
|
|
|
|
|
# Instrument Servlet - Jetty
|
|
# ===========================
|
|
# State 0 - no filter installed
|
|
# State 1 - filter installed
|
|
RULE opentracing-web-servlet-filter_jetty
|
|
CLASS org.eclipse.jetty.servlet.ServletContextHandler
|
|
METHOD <init>
|
|
HELPER com.datadoghq.trace.agent.integration.JettyServletHelper
|
|
AT EXIT
|
|
IF getState($0.getServletContext()) == 0
|
|
DO
|
|
patch($this)
|
|
ENDRULE
|
|
|
|
|
|
# Instrument Servlet - Tomcat
|
|
# ===========================
|
|
RULE opentracing-web-servlet-filter_tomcat
|
|
CLASS org.apache.catalina.core.ApplicationContext
|
|
METHOD <init>
|
|
COMPILE
|
|
HELPER com.datadoghq.trace.agent.integration.TomcatServletHelper
|
|
AT EXIT
|
|
IF TRUE
|
|
DO
|
|
patch($this)
|
|
ENDRULE
|