@Test void createCommandBusMonitorWithTags() { MessageMonitor<? super CommandMessage<?>> monitor = subject.registerCommandBus("commandBus", message -> Tags .of(TagsUtil.PAYLOAD_TYPE_TAG, message.getPayloadType() .getSimpleName())); monitor.onMessageIngested(new GenericCommandMessage<>("test")).reportSuccess(); ByteArrayOutputStream out = new ByteArrayOutputStream(); ConsoleReporter.forRegistry(dropWizardRegistry).outputTo(new PrintStream(out)).build().report(); String output = new String(out.toByteArray()); assertTrue(output.contains("commandBus")); }
public MessageMonitor<? super CommandMessage<?>> registerCommandBus(String commandBusName) { return registerDefaultHandlerMessageMonitor(commandBusName); }
GlobalMetricRegistry { public MessageMonitor<? super CommandMessage<?>> registerCommandBus(String commandBusName) { return registerDefaultHandlerMessageMonitor(commandBusName); } }
GlobalMetricRegistry { public MessageMonitor<? super CommandMessage<?>> registerCommandBus(String commandBusName) { return registerDefaultHandlerMessageMonitor(commandBusName); } GlobalMetricRegistry();  GlobalMetricRegistry(MeterRegistry meterRegistry); }
GlobalMetricRegistry { public MessageMonitor<? super CommandMessage<?>> registerCommandBus(String commandBusName) { return registerDefaultHandlerMessageMonitor(commandBusName); } GlobalMetricRegistry();  GlobalMetricRegistry(MeterRegistry meterRegistry); @SuppressWarnings("unchecked") Configurer registerWithConfigurer(Configurer configurer); @SuppressWarnings("unchecked") Configurer registerWithConfigurerWithDefaultTags(Configurer configurer); MessageMonitor<? extends Message<?>> registerComponent(Class<?> componentType, String componentName); MessageMonitor<? super EventMessage<?>> registerEventProcessor(String eventProcessorName); MessageMonitor<? super CommandMessage<?>> registerCommandBus(String commandBusName); MessageMonitor<? super EventMessage<?>> registerEventBus(String eventBusName); MessageMonitor<? super QueryMessage<?, ?>> registerQueryBus(String queryBusName); MessageMonitor<? extends Message<?>> registerComponentWithDefaultTags(Class<?> componentType,
                                                                                 String componentName); MessageMonitor<? super EventMessage<?>> registerEventProcessor(String eventProcessorName,
                                                                          Function<Message<?>, Iterable<Tag>> tagsBuilder); MessageMonitor<? super CommandMessage<?>> registerCommandBus(String commandBusName,
                                                                        Function<Message<?>, Iterable<Tag>> tagsBuilder); MessageMonitor<? super EventMessage<?>> registerEventBus(String eventBusName,
                                                                    Function<Message<?>, Iterable<Tag>> tagsBuilder); MessageMonitor<? super QueryMessage<?, ?>> registerQueryBus(String queryBusName,
                                                                       Function<Message<?>, Iterable<Tag>> tagsBuilder); MeterRegistry getRegistry(); }
GlobalMetricRegistry { public MessageMonitor<? super CommandMessage<?>> registerCommandBus(String commandBusName) { return registerDefaultHandlerMessageMonitor(commandBusName); } GlobalMetricRegistry();  GlobalMetricRegistry(MeterRegistry meterRegistry); @SuppressWarnings("unchecked") Configurer registerWithConfigurer(Configurer configurer); @SuppressWarnings("unchecked") Configurer registerWithConfigurerWithDefaultTags(Configurer configurer); MessageMonitor<? extends Message<?>> registerComponent(Class<?> componentType, String componentName); MessageMonitor<? super EventMessage<?>> registerEventProcessor(String eventProcessorName); MessageMonitor<? super CommandMessage<?>> registerCommandBus(String commandBusName); MessageMonitor<? super EventMessage<?>> registerEventBus(String eventBusName); MessageMonitor<? super QueryMessage<?, ?>> registerQueryBus(String queryBusName); MessageMonitor<? extends Message<?>> registerComponentWithDefaultTags(Class<?> componentType,
                                                                                 String componentName); MessageMonitor<? super EventMessage<?>> registerEventProcessor(String eventProcessorName,
                                                                          Function<Message<?>, Iterable<Tag>> tagsBuilder); MessageMonitor<? super CommandMessage<?>> registerCommandBus(String commandBusName,
                                                                        Function<Message<?>, Iterable<Tag>> tagsBuilder); MessageMonitor<? super EventMessage<?>> registerEventBus(String eventBusName,
                                                                    Function<Message<?>, Iterable<Tag>> tagsBuilder); MessageMonitor<? super QueryMessage<?, ?>> registerQueryBus(String queryBusName,
                                                                       Function<Message<?>, Iterable<Tag>> tagsBuilder); MeterRegistry getRegistry();  }