Example usage for com.amazonaws.metrics AwsSdkMetrics setMetricCollector

List of usage examples for com.amazonaws.metrics AwsSdkMetrics setMetricCollector

Introduction

In this page you can find the example usage for com.amazonaws.metrics AwsSdkMetrics setMetricCollector.

Prototype

public static synchronized void setMetricCollector(MetricCollector mc) 

Source Link

Document

Sets the metric collector to be used by the AWS SDK, and stop the previously running collector used by the AWS SDK, if any.

Usage

From source file:com.netflix.spinnaker.kork.aws.AwsComponents.java

License:Apache License

@Bean
@ConditionalOnProperty(value = "aws.metrics.enabled", matchIfMissing = true)
SpectatorMetricCollector spectatorMetricsCollector(Registry registry) {
    SpectatorMetricCollector collector = new SpectatorMetricCollector(registry);
    AwsSdkMetrics.setMetricCollector(collector);
    return collector;
}