Raven seems to send data but nothing in Sentry

Hi everybody,

I need some help to finish my raven/sentry configuration.

I am currently working with JBoss, and I need to send log to Sentry.

Here is the part for sentry in my standalone.xml :

<custom-handler name="Sentry" class="com.getsentry.raven.jul.SentryHandler" module="xx.xxx.loggers">
    <formatter>
        <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n"/>
    </formatter>
    <properties>
        <property name="dsn" value="https://[private]:[public]@sentry.io/[id-project]?raven.async=false"/>
        <property name="release" value="1.0.0"/>
        <property name="environment" value="dev"/>
        <property name="serverName" value="xxx"/>
        <property name="tags" value="tag1:test"/>
    </properties>
</custom-handler>
.....
        <root-logger>
            <level name="INFO"/>
            <handlers>
                <handler name="CONSOLE"/>
                <handler name="FILE"/>
                <handler name="Sentry"/>
            </handlers>
        </root-logger>

I create all modules with dependencies and my project is starting.

so for each INFO log, I can see that log in my console :

13:11:22,865 INFO [com.getsentry.raven.DefaultRavenFactory][createConnection: 218] Using an HTTP connection to Sentry.

but sentry didn’t received anything.
I also tried to change the dsn to see if I can get errors, but still the same.

Does anyone have any clue to find where my log are lost ?

Regards,

Cyril

Is this to your own sentry installation or sentry.io?

It’s using sentry.io.

Are you asking because usage are different in both cases ?

No, usage should be the same. I think he wanted to maybe verify the server was operating correctly.

No exceptions are thrown from com.getsentry.*? If not, have you tried running at DEBUG level logging to see if there is anything else coming form com.getsentry.*?

The odd thing to me is that “Using an HTTP connection to Sentry.” is logged when the Raven instance is created, and should only happen once when your application starts up and logs for the first time. It shouldn’t happen repeatedly… if I’m reading correctly it seems like it’s trying to create a SentryHandler over and over and over…?

Thank you for your answer.

Indeed, it was stange to me too that each time, it’s try to create a new connection.
I tried to log at DEBUG level, and I got 2 more output :wink:

09:02:57,181 DEBUG [com.getsentry.raven.RavenFactory][ravenInstance: 85] Attempting to find a working RavenFactory
09:02:57,182 DEBUG [com.getsentry.raven.RavenFactory][ravenInstance: 100] Attempting to use 'RavenFactory{name='com.getsentry.raven.DefaultRavenFactory'}' as a RavenFactory.
09:02:57,183 INFO  [com.getsentry.raven.DefaultRavenFactory][createConnection: 218] Using an HTTP connection to Sentry.

Thank to RavenFactory.java (https://github.com/getsentry/raven-java/blob/912798754279e491ebb74f42965cef1bcbc40349/raven/src/main/java/com/getsentry/raven/RavenFactory.java)

  • line 100, I found that raven try to reuse a factory

logger.debug("Attempting to use '{}' as a Raven factory.", ravenFactory);

but did not go deeper ('cause none of line 104 or 108 are logged… :frowning: )

Does anyone has new ideas ?

regards,

Cyril

Hi,

In order to better understanding of raven/sentry,
I tried to create my own SentryHandler.
I created a Jar from it, and then a Module(.xml)

I found then that I had a jar for javax.net.ssl that didn’t contain few classes needed by raven.
So my own SentryHandler is now working, and then the orignal SentryHandler too.

Thanks for you help.

Regards,

Cyril

PS : how to mark this post as Resolved ?

May i know have you get it working with new sentry JUL ? if so please share how