Rename API endpoint.
This commit is contained in:
parent
fc36443ae2
commit
e8d5b236cc
@ -17,8 +17,8 @@ public class SleuthTraceIdController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private Tracer tracer;
|
private Tracer tracer;
|
||||||
|
|
||||||
@GetMapping("/hello")
|
@GetMapping("/traceid")
|
||||||
public String hello() {
|
public String getSleuthTraceId() {
|
||||||
logger.info("Hello with Sleuth");
|
logger.info("Hello with Sleuth");
|
||||||
Span span = tracer.currentSpan();
|
Span span = tracer.currentSpan();
|
||||||
if (span != null) {
|
if (span != null) {
|
||||||
@ -27,6 +27,6 @@ public class SleuthTraceIdController {
|
|||||||
logger.info("Trace ID hex {}", span.context().traceIdString());
|
logger.info("Trace ID hex {}", span.context().traceIdString());
|
||||||
logger.info("Trace ID decimal {}", span.context().traceId());
|
logger.info("Trace ID decimal {}", span.context().traceId());
|
||||||
}
|
}
|
||||||
return "hello";
|
return "Hello from Sleuth";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user