-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom metrics/logging integration point #1681
Comments
I believe we can add additional ( |
Resolves spring-projects#1681 Also add `BatchInterceptor`.
Resolves spring-projects#1681 Also add `BatchInterceptor`.
Resolves #1681 Also add `BatchInterceptor`. * Fix LogAccessor Usage.
@artembilan @garyrussell BTW absence of this integration ruins migration to As I understand this one will be addressed in 2.7.0 which will be included only in spring boot 2.5.x. Does it possible to backport this change into 2.6.x to give us possibility to use it earlier than boot 2.5.x. We have tried multiple ways how to bypass that including AOP, but it's not possible to get information about topic (in case of wildcard subscription) if you are using plain POJO instead of |
Well, technically Spring Boot saying that I see @garyrussell has scheduled this for back-porting, but then remove that label. Perhaps there was a reason to consider this feature as a breaking change somehow... |
I don't remember why I decided not to back-port - I'll take a look to see how hard it might be. |
@artembilan @garyrussell we have big amount of services, that's why it might be hard to migrate anyway, moreover we use spring cloud which is not ready yet for 2.5 @garyrussell please, It will be fantastic. |
Resolves #1681 Also add `BatchInterceptor`. * Fix LogAccessor Usage.
Backported as ffa7e80 - 2.6.8 is currently scheduled for May 17th. |
I want to build custom metrics over handler execution time and result (success/unsuccess).
After exploring
spring-kafka
codebase I found kind of hook-based micrometer built-in implementation (org.springframework.kafka.listener.KafkaMessageListenerContainer.ListenerConsumer#doInvokeRecordListener). But end-user cannot customize it.Why it's so strict? I mean
spring-kafka
has various integration points: interceptor (before-execution), error handlers (in case of error) but no handler to connect them all together (even using ThreadLocal).I expect something like this:
And existing micrometer integration can work through this interface as well.
If there is any way how to handle all these events exists, please let me know.
P.S.: in our production, we can partially solve this problem by using aspects, but in case of multiple topics in
KafkaListener
we are not able to extract topic name because of using value injection.The text was updated successfully, but these errors were encountered: