use of io.sentry.event.helper.HttpEventBuilderHelper in project zhcet-web by zhcet-amu.
the class SentryFactory method createSentryClient.
@Override
public SentryClient createSentryClient(Dsn dsn) {
SentryClient sentryClient = new SentryClient(createConnection(dsn), getContextManager(dsn));
/* Create and use the ForwardedAddressResolver, which will use the
X-FORWARDED-FOR header for the remote address if it exists. */
ForwardedAddressResolver forwardedAddressResolver = new ForwardedAddressResolver();
sentryClient.addBuilderHelper(new HttpEventBuilderHelper(forwardedAddressResolver));
sentryClient.addBuilderHelper(new ContextBuilderHelper(sentryClient));
return configureSentryClient(sentryClient, dsn);
}
Aggregations