'How to add multiple Interface to events in Sentry?

I have an event in sentry and I want to attach multiple interfaces to it in the latest Sentry version(5.6.1).

Earlier(Sentry 1.7.3) I used to do like this

EventBuilder builder = new EventBuilder();         
builder.withSentryInterface(new ExceptionInterface(ex));                               
builder.withSentryInterface(new UserInterface(user, null, remoteAddr, null, null));

but on updating the sentry version this method is not working and I can't find anything on the docs either.

Any help or suggestions would be a great help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source