This commit is contained in:
Guillaume Polaert 2017-05-24 15:12:00 +02:00
parent 371cab8c02
commit 856a61ee4a
1 changed files with 9 additions and 9 deletions

View File

@ -124,15 +124,15 @@ class InstrumentedClass {
} }
void methodSDK() { void methodSDK() {
// Retrieve the tracer using the resolver provided // Retrieve the tracer using the resolver provided
// Make sure you have : // Make sure you have :
// 1. added the agent to the jvm (-javaagent;/path/to/agent.jar) // 1. added the agent to the jvm (-javaagent;/path/to/agent.jar)
// 2. a dd-trace.yaml file in your resources directory // 2. a dd-trace.yaml file in your resources directory
Tracer tracer = io.opentracing.util.GlobalTracer.get(); Tracer tracer = io.opentracing.util.GlobalTracer.get();
Span span = tracer.buildSpan("operation-name").build(); Span span = tracer.buildSpan("operation-name").build();
//Do some thing here ... //Do some thing here ...
Thread.sleep(1_000); Thread.sleep(1_000);
// Close the span, the trace will automatically reported to the writer configured // Close the span, the trace will automatically reported to the writer configured