Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 511 Bytes

Application-toolkit-trace.md

File metadata and controls

19 lines (16 loc) · 511 Bytes
  • Dependency the toolkit, such as using maven or gradle
   <dependency>
      <groupId>org.apache.skywalking</groupId>
      <artifactId>apm-toolkit-trace</artifactId>
      <version>${skywalking.version}</version>
   </dependency>
  • Use TraceContext.traceId() API to obtain traceId.
import TraceContext;
...

modelAndView.addObject("traceId", TraceContext.traceId());

Sample codes only

  • Add @Trace to any method you want to trace. After that, you can see the span in the Stack.