Java Add Custom Tag


#1

I’m using Sentry using JUL (java.util.logging) and I’d like to add tags to log messages this way:

// This command goes inside a jaxrs
// ContainerRequestFilter
Sentry.getContext().addTag("uuid", UUID.random ().toString());

// This goes inside a REST service
try {
  throw new Exception("Test");
} catch(Exception e) {
  logger.log(Level.ERROR, e.getMessage(), e);
}

After running the above code I see a new event in Sentry, but no uuid tag.

Did I make any mistake?