Rename API endpoint.

This commit is contained in:
Attila Uhrin 2022-01-30 11:04:38 +01:00
parent fc36443ae2
commit e8d5b236cc

View File

@ -17,8 +17,8 @@ public class SleuthTraceIdController {
@Autowired
private Tracer tracer;
@GetMapping("/hello")
public String hello() {
@GetMapping("/traceid")
public String getSleuthTraceId() {
logger.info("Hello with Sleuth");
Span span = tracer.currentSpan();
if (span != null) {
@ -27,6 +27,6 @@ public class SleuthTraceIdController {
logger.info("Trace ID hex {}", span.context().traceIdString());
logger.info("Trace ID decimal {}", span.context().traceId());
}
return "hello";
return "Hello from Sleuth";
}
}