Search in sources :

Example 1 with RabbitMetrics

use of org.springframework.boot.actuate.metrics.amqp.RabbitMetrics in project spring-boot by spring-projects.

the class RabbitConnectionFactoryMetricsPostProcessor method bindConnectionFactoryToRegistry.

private void bindConnectionFactoryToRegistry(MeterRegistry registry, String beanName, AbstractConnectionFactory connectionFactory) {
    ConnectionFactory rabbitConnectionFactory = connectionFactory.getRabbitConnectionFactory();
    String connectionFactoryName = getConnectionFactoryName(beanName);
    new RabbitMetrics(rabbitConnectionFactory, Tags.of("name", connectionFactoryName)).bindTo(registry);
}
Also used : ConnectionFactory(com.rabbitmq.client.ConnectionFactory) AbstractConnectionFactory(org.springframework.amqp.rabbit.connection.AbstractConnectionFactory) RabbitMetrics(org.springframework.boot.actuate.metrics.amqp.RabbitMetrics)

Aggregations

ConnectionFactory (com.rabbitmq.client.ConnectionFactory)1 AbstractConnectionFactory (org.springframework.amqp.rabbit.connection.AbstractConnectionFactory)1 RabbitMetrics (org.springframework.boot.actuate.metrics.amqp.RabbitMetrics)1