Exception Metrics cause IllegalArgumentException when using custom ErrorDecoders
See original GitHub issueSeems like the MeteredInvocationHandleFactory in feign-micrometer 11.5 tries to create both a timer and counter with the same name when using a custom error decoder that does not return a subclass of FeignException. This results in the following exception:
Caused by: java.lang.IllegalArgumentException: There is already a registered meter of a different type with the same name
at io.micrometer.core.instrument.MeterRegistry.registerMeterIfNecessary(MeterRegistry.java:571)
at io.micrometer.core.instrument.MeterRegistry.registerMeterIfNecessary(MeterRegistry.java:561)
at io.micrometer.core.instrument.MeterRegistry.counter(MeterRegistry.java:284)
at io.micrometer.core.instrument.Counter$Builder.register(Counter.java:128)
at io.micrometer.core.instrument.MeterRegistry.counter(MeterRegistry.java:391)
at feign.micrometer.MeteredInvocationHandleFactory.createExceptionCounter(MeteredInvocationHandleFactory.java:108)
at feign.micrometer.MeteredInvocationHandleFactory.lambda$create$0(MeteredInvocationHandleFactory.java:85)
at com.sun.proxy.$Proxy128.getById(Unknown Source)
I have created this repo to demonstrate the issue (refer to the tests).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
OpenFeign custom error decoder not catching ...
I created a custom error decoder which handles response errors as intended but connection refused errors seem to bypass my custom decoder. P.S. ......
Read more >Spring Cloud OpenFeign
This project provides OpenFeign integrations for Spring Boot apps through ... related exceptions, and any RetryableException thrown from an ErrorDecoder.
Read more >Error decoding percent encoded characters - Java Bug System
This one fails with: Caused by: java.lang.IllegalArgumentException: Error decoding percent encoded characters at java.base/sun.net.www.
Read more >AWS Lambda function errors in Java
This page describes how to view Lambda function invocation errors for the Java runtime using the Lambda console and the AWS CLI.
Read more >Lettuce Reference Guide
Synchronous methods will throw a RedisCommandExecutionException in case Redis responds with an error. Asynchronous connections do not throw ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Fixed on 11.6
If both express the same information, probably is safe to just eliminate one