Skip to content

Commit

Permalink
Add Sentry Logging guide
Browse files Browse the repository at this point in the history
  • Loading branch information
ia3andy committed Dec 2, 2019
1 parent bda916f commit 78648d0
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
63 changes: 63 additions & 0 deletions docs/src/main/asciidoc/logging-sentry.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
////
This guide is maintained in the main Quarkus repository
and pull requests should be submitted there:
https://github.com/quarkusio/quarkus/tree/master/docs/src/main/asciidoc
////
= Quarkus - Configuring Sentry Logging

include::./attributes.adoc[]

This guide explains sentry logging and how to configure it.

== Run Time Configuration

Run time configuration of logging is done through the normal `application.properties` file.

include::{generated-dir}/config/quarkus-logging-sentry.adoc[opts=optional, leveloffset=+1]

== Description

Sentry is a really easy way to be notified of errors happening on you Quarkus application.

It is a Open Source, Self-hosted and cloud-based error monitoring that helps software teams discover, triage, and prioritize errors in real-time.

They offer a free starter price for cloud-based or you can self host it for free.

== Configuration

To start of, you need to get a Sentry DSN either by https://sentry.io/signup/[creating a Sentry account] or https://docs.sentry.io/server/[installing your self-hosted Sentry].

In order to configure Sentry logging, the `quarkus-logging-sentry` extension should be employed. Add this extension to your
application POM as the following snippet illustrates.

.Modifications to POM file to add the Sentry logging extension
[source,xml]
----
<build>
<dependencies>
<!-- ... your other dependencies are here ... -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-logging-sentry</artifactId>
</dependency>
</dependencies>
</build>
----

== Example

.All errors and warnings occuring in any the packages will be sent to Sentry with DSN `https://[email protected]/1234`
[source, properties]
----
quarkus.log.sentry=true
quarkus.log.sentry.dsn=https://[email protected]/1234
----

.All errors occuring in the package `org.example` will be sent to Sentry with DSN `https://[email protected]/1234`
[source, properties]
----
quarkus.log.sentry=true
quarkus.log.sentry.dsn=https://[email protected]/1234
quarkus.log.sentry.level=ERROR
quarkus.log.sentry.in-app-packages=org.example
----
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ metadata:
- "cloud"
categories:
- "core"
status: "preview"
status: "preview"
guide: "https://quarkus.io/guides/logging-sentry"

0 comments on commit 78648d0

Please sign in to comment.