3 sky walking application toolkit trace context
吴晟 Wu Sheng edited this page 2017-07-10 14:27:53 +08:00
  • Dependency the toolkit, such as using maven or gradle
   <dependency>
      <groupId>org.skywalking</groupId>
      <artifactId>apm-toolkit-trace-context</artifactId>
      <version>${skywalking.version}</version>
   </dependency>

    Download

  • Use TraceContext.traceId() to retrieve the tracaId in any moment and anywhere.
import org.skywalking.apm.toolkit.trace.TraceContext;
...

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

sample code only