code: public void sendEvent(Event event) {
          for (ShouldSendEventCallback shouldSendEventCallback : shouldSendEventCallbacks) {
              if (!shouldSendEventCallback.shouldSend(event)) {
                  logger.trace("Not sending Event because of ShouldSendEventCallback: {}", shouldSendEventCallback);
                  return;
              }
          }
  
          try {
              connection.send(event);
          } catch (LockedDownException | TooManyRequestsException e) {
              logger.debug("Dropping an Event due to lockdown: " + event);
          } catch (Exception e) {
              logger.error("An exception occurred while sending the event to Sentry.", e);
          } finally {
              getContext().setLastEventId(event.getId());
          }
      }
docs: Sends a built {@link Event} to the Sentry server.
  
  @param event event to send to Sentry.