-
Notifications
You must be signed in to change notification settings - Fork 226
Do not fail completely when re-registering metrics with the same name #54
base: master
Are you sure you want to change the base?
Conversation
Conflicts: pom.xml src/main/java/com/ryantenney/metrics/spring/config/MetricsNamespaceHandler.java src/main/java/com/ryantenney/metrics/spring/reporter/GraphiteReporterElementParser.java src/main/resources/com/ryantenney/metrics/spring/config/metrics-3.0.xsd
Would it be alright to simply not register the metrics the second time? |
In theory yes. The real problem seems to be that the metrics registry is
|
So the metric registry mostly likely isn't being recreated because of the |
I figured out some more, it only happens when I register the registry with a name like you say: But only when I have these added:
|
Due to the way one of our legacy webapps integrates with spring, the spring context file is loaded 2 times instead of one. On the second time, it fails due to an IllegalArgumentException. This bug may be related to the other spring life cycle bug. This fix allows the reload to occur properly. This also handles more graceful accidental double registration of the same metrics.
My apologies for the long list of commits. I'm not sure how to reset my fork to your base