class HubEventLogger {

    public void logIdpRequesterErrorEvent(SessionId sessionId, String transactionEntityId, DateTime sessionExpiryTimestamp, String requestId, Optional<String> errorMessage, String principalIpAddressSeenByHub, String analyticsSessionId, String journeyType,
  String idpEntityId) {
        EnumMap<EventDetailsKey, String> details = new EnumMap<>(EventDetailsKey.class);
        if (errorMessage.isPresent()) {
            details.put(message, errorMessage.get());
        }
        details.put(principal_ip_address_as_seen_by_hub, principalIpAddressSeenByHub);
        details.put(analytics_session_id, analyticsSessionId);
        details.put(idp_entity_id, idpEntityId);
        details.put(journey_type, journeyType);
        logSessionEvent(sessionId, transactionEntityId, sessionExpiryTimestamp, requestId, REQUESTER_ERROR, details);
    }

    @Inject public  HubEventLogger(ServiceInfoConfiguration serviceInfo,
                          EventSinkProxy eventSinkProxy,
                          EventEmitter eventEmitter);

}