package org.xcolab.view.config.sentry;

import io.sentry.event.EventBuilder;
import io.sentry.event.helper.BasicRemoteAddressResolver;
import io.sentry.event.helper.EventBuilderHelper;
import io.sentry.event.helper.RemoteAddressResolver;
import io.sentry.servlet.SentryServletRequestListener;

import org.xcolab.view.auth.AuthenticationContext;

import javax.servlet.http.HttpServletRequest;

public class CustomHttpEventBuilderHelper implements EventBuilderHelper {

    @Override
    public void helpBuildingEvent(EventBuilder eventBuilder) {
        HttpServletRequest servletRequest = SentryServletRequestListener.getServletRequest();
        if (servletRequest == null) {
            return;
        }

        addHttpInterface(eventBuilder, servletRequest);
    }

    private void addHttpInterface(EventBuilder eventBuilder, HttpServletRequest servletRequest) {
        eventBuilder.withSentryInterface(new CustomSentryHttpInterface(servletRequest), false);
    }
}

@@ -104,244 +104,81 @@
 per.
-BasicRemoteAddressResolver;%0Aimport io.sentry.event.helper.EventBuilderHelper;%0Aimport io.sentry.event.helper.RemoteAddressResolver;%0Aimport io.sentry.servlet.SentryServletRequestListener;%0A%0Aimport org.xcolab.view.auth.AuthenticationContext
+EventBuilderHelper;%0Aimport io.sentry.servlet.SentryServletRequestListener
 ;%0A%0Ai

Remove unused imports