Add smoke test for Logback MDC instrumentation - Spring Boot app changes (#1228)
This commit is contained in:
parent
b240cf95e7
commit
c45a8cd432
|
@ -17,13 +17,18 @@
|
|||
package io.opentelemetry.smoketest.springboot.controller;
|
||||
|
||||
import io.opentelemetry.extensions.auto.annotations.WithSpan;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class WebController {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(WebController.class);
|
||||
|
||||
@RequestMapping("/greeting")
|
||||
public String greeting() {
|
||||
LOGGER.info("HTTP request received");
|
||||
return withSpan();
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
logging.level.root=WARN
|
||||
logging.level.root=WARN
|
||||
logging.level.io.opentelemetry=INFO
|
||||
logging.pattern.console=%-5level [%t] %C{1.}: %msg traceId=%X{traceId}%n
|
Loading…
Reference in New Issue