def METHOD_NAME(sentry_init, capture_events):
    sentry_init(integrations=[LoggingIntegration()], default_integrations=False)
    events = capture_events()
    logger.error("first", exc_info=True)
    logger.error("second")
    (
        event_with,
        event_without,
    ) = events
    assert event_with["level"] == "error"
    assert event_with["threads"]["values"][0]["stacktrace"]["frames"]
    assert event_without["level"] == "error"
    assert "threads" not in event_without