class EidasConnectorMetrics {

    public static void increment(String entityId, Direction direction, Status status) {
        try {
            String country = getCountryCode(Objects.requireNonNull(entityId));
            CONNECTOR_COUNTER.labels(
                    country.toLowerCase(),
                    Objects.requireNonNull(direction.name()),
                    Objects.requireNonNull(status.name()))
                    .inc();
        } catch (IllegalArgumentException | NullPointerException e) {
            LOG.warn("Could not set counter for entityId '{}', direction '{}', status '{}'",
                    entityId,
                    direction,
                    status,
                    e);
        }
    }

}