Metrics example and micrometer

214 views
Skip to first unread message

Danny Kruitbosch

unread,
Jul 4, 2018, 3:42:33 AM7/4/18
to Axon Framework Users
Hi,

We're running Axon 3.2.2 on SpringBoot 2.0.2 and it's running fine.

Now we are starting to add metrics into the mix. But, since SpringBoot 2.x uses micrometer for the metrics, I'm stuck.

I cannot find any good examples on Axon Metrics (the codehale/dropwizard one on SpringBoot 1.x) and next to that, I'd like to add this to my micrometer metrics as well.

Does anyone have any experience with this already.

A working example of the metrics (codehale/dropwizard) would be nice, and if someone has figured out how to add this in SpringBoot 2.x, that would be great.


Kind regards,

Danny

Allard Buijze

unread,
Jul 11, 2018, 2:55:51 AM7/11/18
to axonfr...@googlegroups.com
Hi Danny,

I'm not sure how much has changed in this respect between Boot 1 and 2, but if Spring Boot Actuator is enabled, you only need to add the metrics module and leave everything to defaults. You'll get a lot of metrics reported in your actuator endpoints.
Alternatively, you can expose the MetricRegistry on an endpoint of your choice. This bean will be automatically provided if not already present in the application context.

Let me know if these pointers helped.
Cheers,

Allard

Vondellaan 30, 3521 GH Utrecht




Read our blog!


--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Allard Buijze
CTO

E: allard...@axoniq.io
T: +31 6 34 73 99 89

Danny Kruitbosch

unread,
Jul 13, 2018, 10:35:10 AM7/13/18
to Axon Framework Users
Hi Allard,

When starting the application, I get this error/message

2018-07-13 16:31:20.422 [main] WARN  o.s.c.a.ConfigurationClassPostProcessor - Cannot enhance @Configuration bean definition 'org.axonframework.boot.autoconfig.MetricsAutoConfiguration' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'.

I have spring-actuator enabled, and we have some mircometer settings in application.yml. My pom.xml contains dependencies for micrometer, micrometer-prometheus and axon-metrics.

Kind regards,

Danny

Op woensdag 11 juli 2018 08:55:51 UTC+2 schreef Allard Buijze:

Allard Buijze

unread,
Jul 14, 2018, 3:29:22 AM7/14/18
to axonfr...@googlegroups.com
That warning doesn’t matter to much, I believe, but it has been resolved in Axon 3.3(.2).

Someone in the team pointer out that Spring Boot 2 doesn’t provide the same support for metrics anymore. It might be that you need to explicly expose certain metrics to actuator. We’ll look into this for upcoming versions.

Cheers,

Allard
SPRONQ GAAT VERHUIZEN!

PER 1 SEPTEMBER 2018 IS ONS NIEUWE ADRES: 


--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages