@Override
    public CasEvent saveInternal(final CasEvent event) {
        event.assignIdIfNecessary();
        influxDbConnectionFactory.write(MEASUREMENT,
            Map.of("value", event.getEventId()),
            Map.of(
                "serverIpAddress", event.getServerIpAddress(),
                "clientIpAddress", event.getClientIpAddress(),
                "principalId", event.getPrincipalId(),
                "geoLocation", Unchecked.supplier(() -> MAPPER.writeValueAsString(event.getGeoLocation())).get(),
                "creationTime", String.valueOf(event.getCreationTime().toEpochMilli()),
                "tenant", StringUtils.defaultIfBlank(event.getTenant(), "CAS"),
                "timestamp", String.valueOf(event.getTimestamp()),
                "type", event.getType()));
        return event;
    }
This is {@link InfluxDbCasEventRepository}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-events-influxdb/src/main/java/org/apereo/cas/support/events/dao/InfluxDbCasEventRepository.java