@Override
    public void putEvents(final List<InternalStatisticEvent> statisticEvents) {
        try {
            final InternalStatisticsConfig internalStatisticsConfig = internalStatisticsConfigProvider.get();
            // Group the events by service and docref
            Map<InternalStatisticsService, Map<DocRef, List<InternalStatisticEvent>>> serviceToEventsMapMap =
                    statisticEvents.stream()
                            .flatMap(event ->
                                    internalStatisticsConfig.getEnabledDocRefs(event.getKey())
                                            .stream()
                                            .map(docRef ->
                                                    Tuple.of(getServiceForType(docRef.getType()),
                                                            docRef,
                                                            event))
                                            .filter(serviceDocRefEventTuple3 ->
                                                    serviceDocRefEventTuple3._1() != null)) // ignore ones with no svc
                            .collect(Collectors.groupingBy(
                                    Tuple3::_1, //service
                                    Collectors.groupingBy(
                                            Tuple3::_2, //docRef
                                            Collectors.mapping(
                                                    Tuple3::_3, //event
                                                    Collectors.toList()))));

            if (LOGGER.isTraceEnabled()) {
                LOGGER.trace("Putting {} events to {} services",
                        statisticEvents.size(),
                        serviceToEventsMapMap.size());
            }
            //An exception with one service will be logged and swallowed
            serviceToEventsMapMap.forEach(this::putEvents);

        } catch (final RuntimeException e) {
            LOGGER.error("Error sending internal stats", e);
        }
    }
Passes the internal statistic events to zero-many {@link InternalStatisticsService} instances
as defined by the docRefTypeToServiceMap
stroom-statistics/stroom-statistics-impl/src/main/java/stroom/statistics/impl/MultiServiceInternalStatisticsReceiver.java