title: Spring RestController response mixed with PrometheusMeterRegistry error message
body: <p>Env: Springboot-2.0.7.RELEASE (embedded tomcat-8.5.35), JDK-1.8.0_181, micrometer-registry-prometheus-1.0.8</p>
  
  <p>Desc: using <code>@Timed</code> on controller method and <code>WebMvcMetricsFilter</code> with custom <code>WebMvcTagsProvider</code>.</p>
  
  <p>Demo project: <a href="https://github.com/kenix/resp-mix" rel="nofollow noreferrer">https://github.com/kenix/resp-mix</a></p>
  
  <p>If <code>PrometheusMeterRegistry</code> already created a meter with a set of tags, it won't create another meter with same name and a set of different tags. It throws <code>IllegalArgumentException</code> with the aforementioned reason. This happens after the normal processing of request, which is successful (response now has the converted JSON). The exception isn't caught in spring's <code>WebMvcMetricsFilter</code> (i.e. catch the exception in its <code>catch</code>-clause. BTW, <code>ControllerAdvice</code> doesn't help), but is caught by tomcat's <code>StandardHostValve</code>, which renders his own error message (it cannot know where this exception is from) into response too. This leads to an illegal JSON as the rendered result.</p>
  
  <p>Question 1: should <code>WebMvcMetricsFilter</code> catch and handle this Exception thrown by <code>PrometheusMeterRegistry</code> and not throw it further up?</p>
  
  <p>Question 2: have seen that exception in filter chain before hitting the actual processing is handled as expected. What about exception after a successful actual processing? Any references?</p>
  
  <p>To trigger this case:</p>
  
  <ol>
  <li><code>curl -i localhost:8080/hi/foo/there</code></li>
  <li><code>curl -i localhost:8080/hi/blah/there</code></li>
  </ol>