improving documentation
This commit is contained in:
parent
eaf6bbee45
commit
c5184070f4
40
pom.xml
40
pom.xml
|
@ -7,12 +7,36 @@
|
|||
<artifactId>raclette-java</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<opentracing.version>0.22.0</opentracing.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Opentracing core -->
|
||||
<dependency>
|
||||
<groupId>io.opentracing</groupId>
|
||||
<artifactId>opentracing-api</artifactId>
|
||||
<version>0.21.0</version>
|
||||
<version>${opentracing.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.opentracing</groupId>
|
||||
<artifactId>opentracing-noop</artifactId>
|
||||
<version>${opentracing.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.opentracing</groupId>
|
||||
<artifactId>opentracing-util</artifactId>
|
||||
<version>${opentracing.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Tracer resolver -->
|
||||
<dependency>
|
||||
<groupId>io.opentracing.contrib</groupId>
|
||||
<artifactId>opentracing-tracerresolver</artifactId>
|
||||
<version>0.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
|
@ -41,12 +65,7 @@
|
|||
<version>4.9</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Tracer resolver -->
|
||||
<dependency>
|
||||
<groupId>io.opentracing.contrib</groupId>
|
||||
<artifactId>opentracing-tracerresolver</artifactId>
|
||||
<version>0.1.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.auto.service</groupId>
|
||||
|
@ -73,12 +92,7 @@
|
|||
<version>2.7.22</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.opentracing.contrib</groupId>
|
||||
<artifactId>opentracing-agent</artifactId>
|
||||
<version>RELEASE</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
@ -34,10 +34,6 @@ public class DDTracerResolver extends TracerResolver {
|
|||
|
||||
private final static Logger logger = LoggerFactory.getLogger(DDTracerResolver.class);
|
||||
|
||||
// private static final ServiceLoader<Writer> WRITERS = ServiceLoader.load(Writer.class);
|
||||
// private static final ServiceLoader<Sampler> SAMPLERS = ServiceLoader.load(Sampler.class);
|
||||
// private static final ServiceLoader<DDSpanContextDecorator> DECORATORS = ServiceLoader.load(DDSpanContextDecorator.class);
|
||||
|
||||
public static final String TRACER_CONFIG = "dd-trace.yaml";
|
||||
private final ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory());
|
||||
|
||||
|
@ -129,10 +125,10 @@ public class DDTracerResolver extends TracerResolver {
|
|||
}
|
||||
|
||||
if (tracer == null) {
|
||||
tracer = NoopTracerFactory.create();
|
||||
tracer = NoopTracerFactory.create();
|
||||
}
|
||||
|
||||
GlobalTracer.register(tracer);
|
||||
return tracer;
|
||||
return tracer;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,36 @@
|
|||
# Service name used if none is provided in the app
|
||||
defaultServiceName: unnamed-java-app
|
||||
|
||||
# The writer to use.
|
||||
# Could be: LoggingWritter or DDAgentWriter (default)
|
||||
writer:
|
||||
# LoggingWriter: Spans are logged using the application configuration
|
||||
# DDAgentWriter: Spans are forwarding to a Datadog Agent
|
||||
# - Param 'host': the hostname where the DD Agent running (default: localhost)
|
||||
# - Param 'port': the port to reach the DD Agent (default: 8126)
|
||||
type: DDAgentWriter
|
||||
host: localhost
|
||||
port: 8126
|
||||
|
||||
# The sampler to use.
|
||||
# Could be: AllSampler (default) or RateSampler
|
||||
sampler:
|
||||
# AllSampler: all spans are reported to the writer
|
||||
# RateSample: only a portion of spans are reported to the writer
|
||||
# - Param 'rate': the portion of spans to keep
|
||||
type: AllSampler
|
||||
#decorators:
|
||||
# - type: HTTPServiceDecorator
|
||||
# componentName: hello
|
||||
# desiredServiceName: world
|
||||
|
||||
|
||||
# Decorators are used to add extra information to span
|
||||
# Could be DBServiceDecorator, MapperDecorator or HTTPServiceDecorator
|
||||
decorators:
|
||||
|
||||
# This span decorator leverages HTTP tags such as the URL requested
|
||||
- type: HTTPServiceDecorator
|
||||
componentName: http
|
||||
desiredServiceName: unnamed-java-http
|
||||
|
||||
# This span decorator leverages DB tags such as the statement requested
|
||||
- type: DBServiceDecorator
|
||||
componentName: db
|
||||
desiredServiceName: unnamed-java-db
|
||||
|
Loading…
Reference in New Issue