-
-
Notifications
You must be signed in to change notification settings - Fork 32
Attach breadcrumbs to events triggered in Logback integration. #532
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good stuff!!
Left a couple of nits
@@ -213,4 +225,29 @@ class SentryAppenderTest { | |||
}) | |||
} | |||
} | |||
|
|||
@Test | |||
fun `attaches breadcrumbs`() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fun `attaches breadcrumbs`() { | |
fun `attaches breadcrumbs with level higher than minimumBreadcrumbLevel`() { |
Can we have some more use cases here? Like level higher than breadcrumb is captured as event but not added as breadcrumbs.
Set only level for breadcrumb, only for event, etc?
fixture = Fixture(minimumBreadcrumbLevel = Level.DEBUG, minimumEventLevel = WARN) | ||
val utcTime = LocalDateTime.now(ZoneId.of("UTC")) | ||
|
||
fixture.logger.debug("this should be a breadcrumb #1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One test case could make sure this doesn't end up in a crumb because min level is Info.
Actually a test case for default would be nice, and default would be Info or higher for Breadcrumb and Error or higher for event.
📢 Type of change
📜 Description
Logback integration gets now an option to set
minimumEventLevel
andminimumBreadcrumbLevel
. Breadcrumbs are attached to current scope and sent along with followingSentryEvent
.💡 Motivation and Context
Requested by @bruno-garcia.
📝 Checklist