@@ -0,0 +1,986 @@
+package org.cbioportal.logging;%0A%0Aimport io.sentry.*;%0Aimport io.sentry.dsn.Dsn;%0Aimport io.sentry.event.helper.ContextBuilderHelper;%0Aimport io.sentry.event.helper.ForwardedAddressResolver;%0Aimport io.sentry.event.helper.HttpEventBuilderHelper;%0A%0Apublic class SentryClientFactory extends DefaultSentryClientFactory %7B%0A    @Override%0A    public SentryClient createSentryClient(Dsn dsn) %7B%0A        SentryClient sentryClient = new SentryClient(createConnection(dsn), getContextManager(dsn));%0A%0A        /*%0A         Create and use the ForwardedAddressResolver, which will use the%0A         X-FORWARDED-FOR header for the remote address if it exists.%0A          */%0A        ForwardedAddressResolver forwardedAddressResolver = new ForwardedAddressResolver();%0A        %0A        sentryClient.addBuilderHelper(new HttpEventBuilderHelper(forwardedAddressResolver));%0A%0A        sentryClient.addBuilderHelper(new ContextBuilderHelper(sentryClient));%0A        return configureSentryClient(sentryClient, dsn);%0A    %7D%0A%7D

Customize Sentry client to send x-forwarded for ip address as user address instead of ip address of load balancer