Merge pull request #23 from DataDog/tyler/rename-package

Rename packages for consistency
This commit is contained in:
Guillaume Polaert 2017-06-29 09:03:28 +02:00 committed by GitHub
commit d945def42b
36 changed files with 59 additions and 58 deletions

View File

@ -250,8 +250,8 @@
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Agent-Class>io.opentracing.contrib.agent.AnnotationsTracingAgent</Agent-Class>
<Premain-Class>io.opentracing.contrib.agent.AnnotationsTracingAgent
<Agent-Class>com.datadoghq.trace.agent.AnnotationsTracingAgent</Agent-Class>
<Premain-Class>com.datadoghq.trace.agent.AnnotationsTracingAgent
</Premain-Class>
<Can-Redefine-Classes>true</Can-Redefine-Classes>
<Can-Retransform-Classes>true</Can-Retransform-Classes>

View File

@ -1,4 +1,6 @@
package io.opentracing.contrib.agent;
package com.datadoghq.trace.agent;
import com.datadoghq.trace.Trace;
public class SayTracedHello {

View File

@ -1,11 +1,11 @@
package io.opentracing.contrib.agent;
package com.datadoghq.trace.agent;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Before;
import org.junit.Test;
import com.datadoghq.trace.instrument.AAgentIntegration;
import com.datadoghq.trace.agent.integration.AAgentIntegration;
public class TraceAnnotationsManagerTest extends AAgentIntegration{

View File

@ -1,4 +1,4 @@
package com.datadoghq.trace.instrument;
package com.datadoghq.trace.agent.integration;
import org.junit.Before;

View File

@ -1,4 +1,4 @@
package com.datadoghq.trace.instrument;
package com.datadoghq.trace.agent.integration;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;

View File

@ -1,15 +1,9 @@
package com.datadoghq.trace.instrument;
package com.datadoghq.trace.agent.integration;
import io.opentracing.contrib.apache.http.client.TracingHttpClientBuilder;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClientBuilder;
import org.junit.Test;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import static org.assertj.core.api.Assertions.assertThat;
public class ApacheHTTPClientTest extends AAgentIntegration {

View File

@ -1,4 +1,4 @@
package com.datadoghq.trace.instrument;
package com.datadoghq.trace.agent.integration;
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.Session;

View File

@ -1,4 +1,4 @@
package com.datadoghq.trace.instrument;
package com.datadoghq.trace.agent.integration;
import io.opentracing.contrib.jms.TracingMessageProducer;
import io.opentracing.contrib.jms.common.TracingMessageConsumer;

View File

@ -1,4 +1,4 @@
package com.datadoghq.trace.instrument;
package com.datadoghq.trace.agent.integration;
import static org.assertj.core.api.Assertions.assertThat;

View File

@ -1,4 +1,4 @@
package com.datadoghq.trace.instrument;
package com.datadoghq.trace.agent.integration;
import static org.assertj.core.api.Assertions.assertThat;

View File

@ -1,4 +1,4 @@
package com.datadoghq.trace.instrument;
package com.datadoghq.trace.agent.integration;
import static org.assertj.core.api.Assertions.assertThat;

View File

@ -1,4 +1,4 @@
package com.datadoghq.trace.instrument;
package com.datadoghq.trace.agent.integration;
import static org.assertj.core.api.Assertions.assertThat;

View File

@ -293,8 +293,8 @@
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Agent-Class>io.opentracing.contrib.agent.AnnotationsTracingAgent</Agent-Class>
<Premain-Class>io.opentracing.contrib.agent.AnnotationsTracingAgent
<Agent-Class>com.datadoghq.trace.agent.AnnotationsTracingAgent</Agent-Class>
<Premain-Class>com.datadoghq.trace.agent.AnnotationsTracingAgent
</Premain-Class>
<Can-Redefine-Classes>true</Can-Redefine-Classes>
<Can-Retransform-Classes>true</Can-Retransform-Classes>

View File

@ -1,4 +1,6 @@
package com.datadoghq.trace.resolver;
package com.datadoghq.trace.agent;
import com.datadoghq.trace.resolver.TracerConfig;
import java.util.ArrayList;
import java.util.List;

View File

@ -14,7 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.opentracing.contrib.agent;
package com.datadoghq.trace.agent;
import io.opentracing.contrib.agent.OpenTracingAgent;
import java.lang.instrument.Instrumentation;
@ -42,7 +44,7 @@ public class AnnotationsTracingAgent extends OpenTracingAgent {
} else {
agentArgs += ",";
}
agentArgs += "manager:"+io.opentracing.contrib.agent.TraceAnnotationsManager.class.getName();
agentArgs += "manager:" + TraceAnnotationsManager.class.getName();
return agentArgs;
}

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent;
package com.datadoghq.trace.agent;
import com.datadoghq.trace.resolver.FactoryUtils;

View File

@ -1,6 +1,6 @@
package io.opentracing.contrib.agent;
package com.datadoghq.trace.agent;
import com.datadoghq.trace.resolver.AgentTracerConfig;
import com.datadoghq.trace.Trace;
import com.datadoghq.trace.resolver.DDTracerFactory;
import com.datadoghq.trace.resolver.FactoryUtils;
import javassist.ClassPool;

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent.helper;
package com.datadoghq.trace.agent.integration;
import com.amazonaws.client.builder.AwsClientBuilder;
import com.amazonaws.handlers.RequestHandler2;

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent.helper;
package com.datadoghq.trace.agent.integration;
import io.opentracing.contrib.apache.http.client.TracingHttpClientBuilder;
import org.apache.http.impl.client.HttpClientBuilder;

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent.helper;
package com.datadoghq.trace.agent.integration;
import com.datastax.driver.core.Session;
import io.opentracing.Tracer;

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent.helper;
package com.datadoghq.trace.agent.integration;
import io.opentracing.NoopTracerFactory;
import io.opentracing.Tracer;

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent.helper;
package com.datadoghq.trace.agent.integration;
import io.opentracing.ActiveSpan;
import io.opentracing.Span;
@ -12,7 +12,7 @@ import java.lang.reflect.Method;
/**
* Instrument all Elasticsearch queries.
* We have not found a way to inject the opentracing contribution, so this helper is the instrumentation.
* We have not found a way to inject the opentracing contribution, so this integration is the integration.
* FIXME find a better to way to inject the OT contrib
*/
public class ElasticsearchHelper extends DDAgentTracingHelper<ActionListener> {
@ -24,7 +24,7 @@ public class ElasticsearchHelper extends DDAgentTracingHelper<ActionListener> {
private Object request;
/**
* This method is used to register/save some object that will be used for the instrumentation.
* This method is used to register/save some object that will be used for the integration.
* Currently, we need to keep a reference of the request called
*
* @param request The request used for the query
@ -39,7 +39,7 @@ public class ElasticsearchHelper extends DDAgentTracingHelper<ActionListener> {
}
/**
* Strategy: When a query is executed, if start the instrumentation and a new Span.
* Strategy: When a query is executed, if start the integration and a new Span.
* We override the default FutureAction by using the one provided in the opentracing contribution.
*
* @param listener default listener

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent.helper;
package com.datadoghq.trace.agent.integration;
import io.opentracing.contrib.jms.common.TracingMessageConsumer;
import org.jboss.byteman.rule.Rule;

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent.helper;
package com.datadoghq.trace.agent.integration;
import io.opentracing.contrib.jms.TracingMessageProducer;
import org.jboss.byteman.rule.Rule;

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent.helper;
package com.datadoghq.trace.agent.integration;
import io.opentracing.contrib.web.servlet.filter.TracingFilter;
import org.eclipse.jetty.servlet.ServletContextHandler;

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent.helper;
package com.datadoghq.trace.agent.integration;
import com.mongodb.MongoClientOptions;
import io.opentracing.contrib.mongo.TracingCommandListener;

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent.helper;
package com.datadoghq.trace.agent.integration;
import io.opentracing.contrib.okhttp3.TracingInterceptor;
import okhttp3.OkHttpClient;

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent.helper;
package com.datadoghq.trace.agent.integration;
import io.opentracing.contrib.web.servlet.filter.TracingFilter;
import org.apache.catalina.core.ApplicationContext;

View File

@ -13,7 +13,7 @@
RULE opentracing-mongo-driver
CLASS com.mongodb.MongoClientOptions$Builder
METHOD build
HELPER io.opentracing.contrib.agent.helper.MongoHelper
HELPER com.datadoghq.trace.agent.integration.MongoHelper
AT ENTRY
IF getState($0) == 0
DO
@ -26,7 +26,7 @@ ENDRULE
RULE opentracing-aws-sdk
CLASS ^com.amazonaws.client.builder.AwsClientBuilder
METHOD build()
HELPER io.opentracing.contrib.agent.helper.AWSClientHelper
HELPER com.datadoghq.trace.agent.integration.AWSClientHelper
AT ENTRY
IF TRUE
DO
@ -39,7 +39,7 @@ ENDRULE
RULE opentracing-apache-httpclient
CLASS org.apache.http.impl.client.HttpClientBuilder
METHOD create()
HELPER io.opentracing.contrib.agent.helper.ApacheHTTPClientHelper
HELPER com.datadoghq.trace.agent.integration.ApacheHTTPClientHelper
AT EXIT
IF TRUE
DO
@ -52,7 +52,7 @@ ENDRULE
RULE opentracing-elasticsearch-client
INTERFACE org.elasticsearch.client.ElasticsearchClient
METHOD execute(org.elasticsearch.action.Action,org.elasticsearch.action.ActionRequest,org.elasticsearch.action.ActionListener)
HELPER io.opentracing.contrib.agent.helper.ElasticsearchHelper
HELPER com.datadoghq.trace.agent.integration.ElasticsearchHelper
AT ENTRY
IF $# == 3 AND NOT $3.getClass().getCanonicalName().equals("io.opentracing.contrib.elasticsearch.TracingResponseListener")
DO
@ -66,7 +66,7 @@ ENDRULE
RULE opentracing-cassandra-driver
CLASS com.datastax.driver.core.Cluster$Manager
METHOD newSession()
HELPER io.opentracing.contrib.agent.helper.CassandraHelper
HELPER com.datadoghq.trace.agent.integration.CassandraHelper
AT EXIT
IF TRUE
DO
@ -81,7 +81,7 @@ ENDRULE
RULE opentracing-web-servlet-filter_jetty
CLASS org.eclipse.jetty.servlet.ServletContextHandler
METHOD <init>
HELPER io.opentracing.contrib.agent.helper.JettyServletHelper
HELPER com.datadoghq.trace.agent.integration.JettyServletHelper
AT EXIT
IF getState($0.getServletContext()) == 0
DO
@ -94,7 +94,7 @@ ENDRULE
RULE opentracing-web-servlet-filter_tomcat
CLASS org.apache.catalina.core.ApplicationContext
METHOD <init>
HELPER io.opentracing.contrib.agent.helper.TomcatServletHelper
HELPER com.datadoghq.trace.agent.integration.TomcatServletHelper
AT EXIT
IF TRUE
DO
@ -107,7 +107,7 @@ ENDRULE
RULE opentracing-okhttp3
CLASS okhttp3.OkHttpClient$Builder
METHOD build()
HELPER io.opentracing.contrib.agent.helper.OkHttpHelper
HELPER com.datadoghq.trace.agent.integration.OkHttpHelper
AT ENTRY
IF TRUE
DO
@ -120,7 +120,7 @@ ENDRULE
RULE opentracing-jms-2_producer
INTERFACE javax.jms.Session
METHOD createProducer
HELPER io.opentracing.contrib.agent.helper.JMSMessageProducerHelper
HELPER com.datadoghq.trace.agent.integration.JMSMessageProducerHelper
AT EXIT
IF TRUE
DO
@ -131,7 +131,7 @@ ENDRULE
RULE opentracing-jms-2_consumer
INTERFACE javax.jms.Session
METHOD createConsumer
HELPER io.opentracing.contrib.agent.helper.JMSMessageConsumerHelper
HELPER com.datadoghq.trace.agent.integration.JMSMessageConsumerHelper
AT EXIT
IF TRUE
DO

View File

@ -1,5 +1,6 @@
package io.opentracing.contrib.agent;
package com.datadoghq.trace.agent;
import com.datadoghq.trace.agent.InstrumentationChecker;
import com.datadoghq.trace.resolver.FactoryUtils;
import org.junit.Before;
import org.junit.Test;

View File

@ -1,4 +1,4 @@
package io.opentracing.contrib.agent;
package com.datadoghq.trace;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

View File

@ -2,7 +2,7 @@ package com.example.helloworld.client;
import java.io.IOException;
import io.opentracing.contrib.agent.Trace;
import com.datadoghq.trace.Trace;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

View File

@ -1,11 +1,11 @@
package com.example.helloworld.resources;
import com.datadoghq.trace.Trace;
import com.example.helloworld.api.Book;
import com.google.common.base.Optional;
import com.mongodb.MongoClient;
import com.mongodb.client.MongoCursor;
import com.mongodb.client.MongoDatabase;
import io.opentracing.contrib.agent.Trace;
import org.bson.Document;
import javax.ws.rs.GET;

View File

@ -18,7 +18,7 @@ import java.util.*;
/**
* DDTracer makes it easy to send traces and span to DD using the OpenTracing instrumentation.
* DDTracer makes it easy to send traces and span to DD using the OpenTracing integration.
*/
public class DDTracer implements io.opentracing.Tracer {

View File

@ -11,7 +11,7 @@ import org.slf4j.LoggerFactory;
* This sampler sample the traces at a predefined rate.
* <p>
* Keep (100 * `sample_rate`)% of the traces.
* It samples randomly, its main purpose is to reduce the instrumentation footprint.
* It samples randomly, its main purpose is to reduce the integration footprint.
*/
@AutoService(Sampler.class)
public class RateSampler extends AbstractSampler {