-
-
Notifications
You must be signed in to change notification settings - Fork 459
Open
Labels
Description
Integration
sentry
Java Version
11
Version
8.23.0
Steps to Reproduce
- Setup logs in a SpringBoot app or other java framework
- Add MDC tags
- Send errors and logs to Sentry
Logger logger = LoggerFactory.getLogger("demo");
MDC.put("MDCTag","MDCvalue");
logger.info("MDC info log");
logger.error("MDC error log");
System.out.println(Sentry.isEnabled());
try {
System.out.println("throwing spring boot error.");
throw new Exception("MDC tags test error");
} catch (Exception e) {
System.out.println(Sentry.captureException(e));
}
SDK configuration:
sentry.dsn=...
sentry.traces-sample-rate=1.0
sentry.debug=true
sentry.logs.enabled=true
sentry.logging.minimumLevel=INFO
sentry.contextTags=MDCTag
Expected Result
MDC tag information is added to both logs and errors. Ideally, as tags so the information can be used to search events in Sentry.
Actual Result
MDC tags are currently only added as additional context to error event.
Error with MDC context
[edit: fixing acronyms]
lcian and dazld
Metadata
Metadata
Assignees
Labels
Projects
Status
No status