Search in sources :

Example 1 with DefaultTaggedMetricRegistry

use of com.palantir.tritium.metrics.registry.DefaultTaggedMetricRegistry in project atlasdb by palantir.

the class TimeLockServerLauncher method initialize.

@Override
public void initialize(Bootstrap<TimeLockServerConfiguration> bootstrap) {
    MetricRegistry metricRegistry = SharedMetricRegistries.getOrCreate("AtlasDbTest" + UUID.randomUUID().toString());
    TaggedMetricRegistry taggedMetricRegistry = new DefaultTaggedMetricRegistry();
    AtlasDbMetrics.setMetricRegistries(metricRegistry, taggedMetricRegistry);
    bootstrap.setMetricRegistry(metricRegistry);
    bootstrap.getObjectMapper().registerSubtypes(NonBlockingFileAppenderFactory.class);
    bootstrap.getObjectMapper().registerModule(new Jdk8Module());
    super.initialize(bootstrap);
}
Also used : Jdk8Module(com.fasterxml.jackson.datatype.jdk8.Jdk8Module) MetricRegistry(com.codahale.metrics.MetricRegistry) DefaultTaggedMetricRegistry(com.palantir.tritium.metrics.registry.DefaultTaggedMetricRegistry) TaggedMetricRegistry(com.palantir.tritium.metrics.registry.TaggedMetricRegistry) DefaultTaggedMetricRegistry(com.palantir.tritium.metrics.registry.DefaultTaggedMetricRegistry) TaggedMetricRegistry(com.palantir.tritium.metrics.registry.TaggedMetricRegistry) DefaultTaggedMetricRegistry(com.palantir.tritium.metrics.registry.DefaultTaggedMetricRegistry)

Example 2 with DefaultTaggedMetricRegistry

use of com.palantir.tritium.metrics.registry.DefaultTaggedMetricRegistry in project atlasdb by palantir.

the class CassandraClientPoolTest method setup.

@Before
public void setup() {
    AtlasDbMetrics.setMetricRegistries(new MetricRegistry(), new DefaultTaggedMetricRegistry());
    this.metricRegistry = AtlasDbMetrics.getMetricRegistry();
    config = mock(CassandraKeyValueServiceConfig.class);
    when(config.poolRefreshIntervalSeconds()).thenReturn(POOL_REFRESH_INTERVAL_SECONDS);
    when(config.timeBetweenConnectionEvictionRunsSeconds()).thenReturn(TIME_BETWEEN_EVICTION_RUNS_SECONDS);
    when(config.unresponsiveHostBackoffTimeSeconds()).thenReturn(UNRESPONSIVE_HOST_BACKOFF_SECONDS);
    blacklist = new Blacklist(config);
}
Also used : MetricRegistry(com.codahale.metrics.MetricRegistry) DefaultTaggedMetricRegistry(com.palantir.tritium.metrics.registry.DefaultTaggedMetricRegistry) DefaultTaggedMetricRegistry(com.palantir.tritium.metrics.registry.DefaultTaggedMetricRegistry) CassandraKeyValueServiceConfig(com.palantir.atlasdb.cassandra.CassandraKeyValueServiceConfig) Before(org.junit.Before)

Example 3 with DefaultTaggedMetricRegistry

use of com.palantir.tritium.metrics.registry.DefaultTaggedMetricRegistry in project atlasdb by palantir.

the class MetricsRule method before.

@Override
protected void before() throws Throwable {
    super.before();
    AtlasDbMetrics.setMetricRegistries(SharedMetricRegistries.getOrCreate("AtlasDbTest"), new DefaultTaggedMetricRegistry());
}
Also used : DefaultTaggedMetricRegistry(com.palantir.tritium.metrics.registry.DefaultTaggedMetricRegistry)

Aggregations

DefaultTaggedMetricRegistry (com.palantir.tritium.metrics.registry.DefaultTaggedMetricRegistry)3 MetricRegistry (com.codahale.metrics.MetricRegistry)2 Jdk8Module (com.fasterxml.jackson.datatype.jdk8.Jdk8Module)1 CassandraKeyValueServiceConfig (com.palantir.atlasdb.cassandra.CassandraKeyValueServiceConfig)1 TaggedMetricRegistry (com.palantir.tritium.metrics.registry.TaggedMetricRegistry)1 Before (org.junit.Before)1