Can not receive events in Sentry Console

I’m using Smartfox Server with Java language and trying to integrate Sentry Error Tracker into our system. I followed the document: https://docs.sentry.io/clients/java/usage/
and tried to send first event to Sentry.
This is some relate functions in main class

private static Raven raven;

public void init() {
setRavenLogger();
setRaygunLogger();

logException();

}

public void setRavenLogger() {
String dsn = “https://xxx:xxx@sentry.io/xxx”;
raven = RavenFactory.ravenInstance(dsn);
}

public void logException() {
try {
unsafeMethod();
} catch (Exception e) {
raven.sendException(e);
}
}

public void unsafeMethod() {
throw new UnsupportedOperationException(“You shouldn’t call this!”);
}

I try to send some message to Sentry server to test by call logException function each time I restart my service. But unfortunately, i can not receive any events in Sentry Console. Can anyone help me to fix this issue?

Hi there,

Your code seems fine to me at a glance, though it would be helpful to see all of it if possible.

I have a few questions:

  • What version of Raven are you using?
  • Are you using a dependency manager like Maven or Gradle to manage your builds, or are you just dropping the Raven jar manually onto the Classpath? If the latter, are you including Raven’s dependencies (slf4j, jackson)?
  • Do you have any slf4j loggers configured (jul, log4j, logback, etc)? Is Raven logging any warnings or errors when you try to send the exception? If an error occurs, it should be logging something at least at the WARN level…

Brett