How to integrate Java Wildfly Swarm applications with Sentry?
up vote
0
down vote
favorite
We have a Java Wildfly Swarm application and I'm trying to configure it to report Sentry events.
Referenced versions:
Wildfly BOM: org.wildfly.bom:wildfly-javaee7:10.1.0.Final
Swarm Plugin: org.wildfly.swarm:wildfly-swarm-plugin:2017.12.1
I added the following configurations:
<!-- pom.xml -->
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry</artifactId>
<version>1.7.13</version>
</dependency>
# project-defautls.yml
swarm:
logging:
pattern-formatters:
LOG_FORMATTER:
pattern: "%dyyyy-MM-dd HH:mm:ss,SSS %-5p (%t) [%c.%M()] %s%e%n"
console-handlers:
CONSOLE:
named-formatter: LOG_FORMATTER
level: INFO
custom-handlers:
SENTRY:
module: com.sentry.jul
attribute-class: io.sentry.jul.SentryHandler
named-formatter: LOG_FORMATTER
level: INFO
root-logger:
handlers:
- CONSOLE
- SENTRY
<!-- module.xml -->
<module xmlns="urn:jboss:module:1.3" name="com.sentry.jul">
<resources>
<artifact name="io.sentry:sentry:1.7.13" />
</resources>
</module>
# Environment variable
SENTRY_DSN=***********
The application starts normally, but the following code snippet is not generating Sentry events:
try
throw new Exception("Testing...");
catch(Exception e)
logger.log(Level.SEVERE, "ERROR 0", e.getMessage());
By other hand, it works fine when I configure Sentry by code and generate an event:
Sentry.init(System.getenv("SENTRY_DSN"));
SentryClient sentry = SentryClientFactory.sentryClient();
try
throw new Exception("Testing...");
catch(Exception e)
sentry.sendException(e);
What is going wrong?
java sentry wildfly-swarm
add a comment |
up vote
0
down vote
favorite
We have a Java Wildfly Swarm application and I'm trying to configure it to report Sentry events.
Referenced versions:
Wildfly BOM: org.wildfly.bom:wildfly-javaee7:10.1.0.Final
Swarm Plugin: org.wildfly.swarm:wildfly-swarm-plugin:2017.12.1
I added the following configurations:
<!-- pom.xml -->
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry</artifactId>
<version>1.7.13</version>
</dependency>
# project-defautls.yml
swarm:
logging:
pattern-formatters:
LOG_FORMATTER:
pattern: "%dyyyy-MM-dd HH:mm:ss,SSS %-5p (%t) [%c.%M()] %s%e%n"
console-handlers:
CONSOLE:
named-formatter: LOG_FORMATTER
level: INFO
custom-handlers:
SENTRY:
module: com.sentry.jul
attribute-class: io.sentry.jul.SentryHandler
named-formatter: LOG_FORMATTER
level: INFO
root-logger:
handlers:
- CONSOLE
- SENTRY
<!-- module.xml -->
<module xmlns="urn:jboss:module:1.3" name="com.sentry.jul">
<resources>
<artifact name="io.sentry:sentry:1.7.13" />
</resources>
</module>
# Environment variable
SENTRY_DSN=***********
The application starts normally, but the following code snippet is not generating Sentry events:
try
throw new Exception("Testing...");
catch(Exception e)
logger.log(Level.SEVERE, "ERROR 0", e.getMessage());
By other hand, it works fine when I configure Sentry by code and generate an event:
Sentry.init(System.getenv("SENTRY_DSN"));
SentryClient sentry = SentryClientFactory.sentryClient();
try
throw new Exception("Testing...");
catch(Exception e)
sentry.sendException(e);
What is going wrong?
java sentry wildfly-swarm
If you log at DEBUG level (not to Sentry but to your normal logger) does it say anything initializing Sentry, or about an appender not being located?
– Brett
Nov 6 at 1:07
I wonder where does thecom.sentry.jul
module come from. Theio.sentry:sentry:1.7.13
artifact certainly doesn't ship amodule.xml
.
– Ladicek
Nov 6 at 8:49
I addedcom.sentry.jul
as a jboss module insrc/main/resources
. If we don't provide a module, then application startup fails. I'm going to update this question to make it clear.
– Fernando Costa
Nov 6 at 9:19
No log debugging message is shown
– Fernando Costa
Nov 6 at 17:12
I'm trying to debug the code ofio.sentry.jul.SentryHandler
inside my Eclipse IDE to see what is going on. I set four breakpoints in the publish method at lines 98, 99, 105 and 107. The debugger reaches only the first one. It is weird.
– Fernando Costa
Nov 8 at 3:21
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
We have a Java Wildfly Swarm application and I'm trying to configure it to report Sentry events.
Referenced versions:
Wildfly BOM: org.wildfly.bom:wildfly-javaee7:10.1.0.Final
Swarm Plugin: org.wildfly.swarm:wildfly-swarm-plugin:2017.12.1
I added the following configurations:
<!-- pom.xml -->
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry</artifactId>
<version>1.7.13</version>
</dependency>
# project-defautls.yml
swarm:
logging:
pattern-formatters:
LOG_FORMATTER:
pattern: "%dyyyy-MM-dd HH:mm:ss,SSS %-5p (%t) [%c.%M()] %s%e%n"
console-handlers:
CONSOLE:
named-formatter: LOG_FORMATTER
level: INFO
custom-handlers:
SENTRY:
module: com.sentry.jul
attribute-class: io.sentry.jul.SentryHandler
named-formatter: LOG_FORMATTER
level: INFO
root-logger:
handlers:
- CONSOLE
- SENTRY
<!-- module.xml -->
<module xmlns="urn:jboss:module:1.3" name="com.sentry.jul">
<resources>
<artifact name="io.sentry:sentry:1.7.13" />
</resources>
</module>
# Environment variable
SENTRY_DSN=***********
The application starts normally, but the following code snippet is not generating Sentry events:
try
throw new Exception("Testing...");
catch(Exception e)
logger.log(Level.SEVERE, "ERROR 0", e.getMessage());
By other hand, it works fine when I configure Sentry by code and generate an event:
Sentry.init(System.getenv("SENTRY_DSN"));
SentryClient sentry = SentryClientFactory.sentryClient();
try
throw new Exception("Testing...");
catch(Exception e)
sentry.sendException(e);
What is going wrong?
java sentry wildfly-swarm
We have a Java Wildfly Swarm application and I'm trying to configure it to report Sentry events.
Referenced versions:
Wildfly BOM: org.wildfly.bom:wildfly-javaee7:10.1.0.Final
Swarm Plugin: org.wildfly.swarm:wildfly-swarm-plugin:2017.12.1
I added the following configurations:
<!-- pom.xml -->
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry</artifactId>
<version>1.7.13</version>
</dependency>
# project-defautls.yml
swarm:
logging:
pattern-formatters:
LOG_FORMATTER:
pattern: "%dyyyy-MM-dd HH:mm:ss,SSS %-5p (%t) [%c.%M()] %s%e%n"
console-handlers:
CONSOLE:
named-formatter: LOG_FORMATTER
level: INFO
custom-handlers:
SENTRY:
module: com.sentry.jul
attribute-class: io.sentry.jul.SentryHandler
named-formatter: LOG_FORMATTER
level: INFO
root-logger:
handlers:
- CONSOLE
- SENTRY
<!-- module.xml -->
<module xmlns="urn:jboss:module:1.3" name="com.sentry.jul">
<resources>
<artifact name="io.sentry:sentry:1.7.13" />
</resources>
</module>
# Environment variable
SENTRY_DSN=***********
The application starts normally, but the following code snippet is not generating Sentry events:
try
throw new Exception("Testing...");
catch(Exception e)
logger.log(Level.SEVERE, "ERROR 0", e.getMessage());
By other hand, it works fine when I configure Sentry by code and generate an event:
Sentry.init(System.getenv("SENTRY_DSN"));
SentryClient sentry = SentryClientFactory.sentryClient();
try
throw new Exception("Testing...");
catch(Exception e)
sentry.sendException(e);
What is going wrong?
java sentry wildfly-swarm
java sentry wildfly-swarm
edited Nov 9 at 19:11
asked Nov 5 at 21:17
Fernando Costa
347315
347315
If you log at DEBUG level (not to Sentry but to your normal logger) does it say anything initializing Sentry, or about an appender not being located?
– Brett
Nov 6 at 1:07
I wonder where does thecom.sentry.jul
module come from. Theio.sentry:sentry:1.7.13
artifact certainly doesn't ship amodule.xml
.
– Ladicek
Nov 6 at 8:49
I addedcom.sentry.jul
as a jboss module insrc/main/resources
. If we don't provide a module, then application startup fails. I'm going to update this question to make it clear.
– Fernando Costa
Nov 6 at 9:19
No log debugging message is shown
– Fernando Costa
Nov 6 at 17:12
I'm trying to debug the code ofio.sentry.jul.SentryHandler
inside my Eclipse IDE to see what is going on. I set four breakpoints in the publish method at lines 98, 99, 105 and 107. The debugger reaches only the first one. It is weird.
– Fernando Costa
Nov 8 at 3:21
add a comment |
If you log at DEBUG level (not to Sentry but to your normal logger) does it say anything initializing Sentry, or about an appender not being located?
– Brett
Nov 6 at 1:07
I wonder where does thecom.sentry.jul
module come from. Theio.sentry:sentry:1.7.13
artifact certainly doesn't ship amodule.xml
.
– Ladicek
Nov 6 at 8:49
I addedcom.sentry.jul
as a jboss module insrc/main/resources
. If we don't provide a module, then application startup fails. I'm going to update this question to make it clear.
– Fernando Costa
Nov 6 at 9:19
No log debugging message is shown
– Fernando Costa
Nov 6 at 17:12
I'm trying to debug the code ofio.sentry.jul.SentryHandler
inside my Eclipse IDE to see what is going on. I set four breakpoints in the publish method at lines 98, 99, 105 and 107. The debugger reaches only the first one. It is weird.
– Fernando Costa
Nov 8 at 3:21
If you log at DEBUG level (not to Sentry but to your normal logger) does it say anything initializing Sentry, or about an appender not being located?
– Brett
Nov 6 at 1:07
If you log at DEBUG level (not to Sentry but to your normal logger) does it say anything initializing Sentry, or about an appender not being located?
– Brett
Nov 6 at 1:07
I wonder where does the
com.sentry.jul
module come from. The io.sentry:sentry:1.7.13
artifact certainly doesn't ship a module.xml
.– Ladicek
Nov 6 at 8:49
I wonder where does the
com.sentry.jul
module come from. The io.sentry:sentry:1.7.13
artifact certainly doesn't ship a module.xml
.– Ladicek
Nov 6 at 8:49
I added
com.sentry.jul
as a jboss module in src/main/resources
. If we don't provide a module, then application startup fails. I'm going to update this question to make it clear.– Fernando Costa
Nov 6 at 9:19
I added
com.sentry.jul
as a jboss module in src/main/resources
. If we don't provide a module, then application startup fails. I'm going to update this question to make it clear.– Fernando Costa
Nov 6 at 9:19
No log debugging message is shown
– Fernando Costa
Nov 6 at 17:12
No log debugging message is shown
– Fernando Costa
Nov 6 at 17:12
I'm trying to debug the code of
io.sentry.jul.SentryHandler
inside my Eclipse IDE to see what is going on. I set four breakpoints in the publish method at lines 98, 99, 105 and 107. The debugger reaches only the first one. It is weird.– Fernando Costa
Nov 8 at 3:21
I'm trying to debug the code of
io.sentry.jul.SentryHandler
inside my Eclipse IDE to see what is going on. I set four breakpoints in the publish method at lines 98, 99, 105 and 107. The debugger reaches only the first one. It is weird.– Fernando Costa
Nov 8 at 3:21
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
After debugging the code I realized my module definition was incomplete. I had to add other artifacts and dependencies:
<module xmlns="urn:jboss:module:1.3" name="com.sentry.jul">
<resources>
<artifact name="io.sentry:sentry:1.7.13" />
<artifact name="com.fasterxml.jackson.core:jackson-core:2.8.7" />
</resources>
<dependencies>
<module name="javax.api" />
<module name="javax.servlet.api" />
<module name="org.slf4j"/>
</dependencies>
</module>
Also I noticed there is no need to keep a project dependency to Sentry.
That's all!
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
After debugging the code I realized my module definition was incomplete. I had to add other artifacts and dependencies:
<module xmlns="urn:jboss:module:1.3" name="com.sentry.jul">
<resources>
<artifact name="io.sentry:sentry:1.7.13" />
<artifact name="com.fasterxml.jackson.core:jackson-core:2.8.7" />
</resources>
<dependencies>
<module name="javax.api" />
<module name="javax.servlet.api" />
<module name="org.slf4j"/>
</dependencies>
</module>
Also I noticed there is no need to keep a project dependency to Sentry.
That's all!
add a comment |
up vote
0
down vote
accepted
After debugging the code I realized my module definition was incomplete. I had to add other artifacts and dependencies:
<module xmlns="urn:jboss:module:1.3" name="com.sentry.jul">
<resources>
<artifact name="io.sentry:sentry:1.7.13" />
<artifact name="com.fasterxml.jackson.core:jackson-core:2.8.7" />
</resources>
<dependencies>
<module name="javax.api" />
<module name="javax.servlet.api" />
<module name="org.slf4j"/>
</dependencies>
</module>
Also I noticed there is no need to keep a project dependency to Sentry.
That's all!
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
After debugging the code I realized my module definition was incomplete. I had to add other artifacts and dependencies:
<module xmlns="urn:jboss:module:1.3" name="com.sentry.jul">
<resources>
<artifact name="io.sentry:sentry:1.7.13" />
<artifact name="com.fasterxml.jackson.core:jackson-core:2.8.7" />
</resources>
<dependencies>
<module name="javax.api" />
<module name="javax.servlet.api" />
<module name="org.slf4j"/>
</dependencies>
</module>
Also I noticed there is no need to keep a project dependency to Sentry.
That's all!
After debugging the code I realized my module definition was incomplete. I had to add other artifacts and dependencies:
<module xmlns="urn:jboss:module:1.3" name="com.sentry.jul">
<resources>
<artifact name="io.sentry:sentry:1.7.13" />
<artifact name="com.fasterxml.jackson.core:jackson-core:2.8.7" />
</resources>
<dependencies>
<module name="javax.api" />
<module name="javax.servlet.api" />
<module name="org.slf4j"/>
</dependencies>
</module>
Also I noticed there is no need to keep a project dependency to Sentry.
That's all!
edited Nov 9 at 18:50
answered Nov 9 at 15:47
Fernando Costa
347315
347315
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53162360%2fhow-to-integrate-java-wildfly-swarm-applications-with-sentry%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
If you log at DEBUG level (not to Sentry but to your normal logger) does it say anything initializing Sentry, or about an appender not being located?
– Brett
Nov 6 at 1:07
I wonder where does the
com.sentry.jul
module come from. Theio.sentry:sentry:1.7.13
artifact certainly doesn't ship amodule.xml
.– Ladicek
Nov 6 at 8:49
I added
com.sentry.jul
as a jboss module insrc/main/resources
. If we don't provide a module, then application startup fails. I'm going to update this question to make it clear.– Fernando Costa
Nov 6 at 9:19
No log debugging message is shown
– Fernando Costa
Nov 6 at 17:12
I'm trying to debug the code of
io.sentry.jul.SentryHandler
inside my Eclipse IDE to see what is going on. I set four breakpoints in the publish method at lines 98, 99, 105 and 107. The debugger reaches only the first one. It is weird.– Fernando Costa
Nov 8 at 3:21