io.openlineage.client.metrics.StatsDMeterRegistryFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openlineage-java Show documentation
Show all versions of openlineage-java Show documentation
Java library for OpenLineage
/*
/* Copyright 2018-2024 contributors to the OpenLineage project
/* SPDX-License-Identifier: Apache-2.0
*/
package io.openlineage.client.metrics;
import io.micrometer.statsd.StatsdMeterRegistry;
import java.util.Map;
/**
* StatsDMetricsBuilder is a class that implements the {@link MeterRegistryFactory} interface
* specifically for {@link StatsdMeterRegistry}. It provides methods to check if the required {@link
* StatsdMeterRegistry} class is available and build a {@link StatsdMeterRegistry} instance based on
* a configuration map.
*
* @see StatsdConfig
* and StatsD micrometer interface docs
*/
public class StatsDMeterRegistryFactory implements MeterRegistryFactory {
@Override
public StatsdMeterRegistry registry(Map config) {
return StatsdMeterRegistry.builder(s -> (String) config.get(s)).build();
}
@Override
public String type() {
return "statsd";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy