<dependency> <groupId>org.apache.skywalking</groupId> <artifactId>apm-toolkit-trace</artifactId> <version>${skywalking.version}</version> </dependency>
TraceContext.traceId()
API to obtain traceId.import TraceContext; ... modelAndView.addObject("traceId", TraceContext.traceId());
Sample codes only
@Trace
to any method you want to trace. After that, you can see the span in the Stack.ActiveSpan.tag("my_tag", "my_value");