getsentry / getsentry/sentry-java
Support slf4j/logback fluent logging and key-value pairs in logback logging integration
- Ngôn ngữ chính
- Kotlin
- Star
- 1.4k
- Fork
- 478
- Merge trung bình
- 2 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 67
Mô tả
### Problem Statement
We are using SLF4J fluent logging API -- https://www.slf4j.org/manual.html#fluent in a Spring Boot application using logback as implementation.
We have enabled Sentry logback integration
```
...
true
CHANGE-IT
INFO
ERROR
...
```
Dependencies:
```
...
[INFO] +- io.sentry:sentry-spring-boot-starter-jakarta:jar:8.11.1:compile
[INFO] | \- io.sentry:sentry-spring-boot-jakarta:jar:8.11.1:compile
[INFO] | +- io.sentry:sentry-spring-jakarta:jar:8.11.1:compile
[INFO] | \- io.sentry:sentry-reactor:jar:8.11.1:compile
[INFO] +- io.sentry:sentry-logback:jar:8.11.1:compile
[INFO] | \- io.sentry:sentry:jar:8.11.1:compile
...
[INFO] +- org.springframework.boot:spring-boot-starter-logging:jar:3.4.4:compile
[INFO] | +- ch.qos.logback:logback-classic:jar:1.5.18:compile
[INFO] | \- org.apache.logging.log4j:log4j-to-slf4j:jar:2.24.3:compile
[INFO] | \- org.apache.logging.log4j:log4j-api:jar:2.24.3:compile
...
[INFO] +- org.slf4j:jul-to-slf4j:jar:2.0.17:compile
[INFO] +- ch.qos.logback:logback-core:jar:1.5.18:compile
...
[INFO] +- io.sentry:sentry-logback:jar:8.11.1:compile
[INFO] | \- io.sentry:sentry:jar:8.11.1:compile
...
```
Our log messages look like this:
```
log.atError()
.addKeyValue("key1", valueInstance1)
.addKeyValue("key2", valueInstance2)
.setMessage("Error doing blah blah blah")
.setCause(ex)
.log()
```
Our problem is that in Sentry dashboard we are not seeing the key-value'd information, and instead we are only seeing the "Error doing ..." message.
In our log file we are indeed seeing these values via `... [%kvp] ...` in the file log pattern set via our `logback-spring.xml`.
Please add support for this usage pattern in the Java SDK. If this is already supported and I missed it from the documentation, please point me towards it, thanks!
### Solution Brainstorm
_No response_
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.