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
Weird response getting in Spring boot when using @Timed #2930
Comments
Could you please check this issue, it seems to be related: #2399? If updating them does not help, could you please provide a minimal sample project to reproduce this issue so we can more easily investigate and ensure any fix is working properly for your use case? |
hi,
I don't think it's a cache issue it's related to Time. And i updated the
version but the issue is there
…On Thu, Jan 6, 2022 at 1:38 AM Jonatan Ivanov ***@***.***> wrote:
Could you please check this issue, it seems to be related: #2399
<#2399>?
Also, could you please try and update Spring Boot (and Micrometer)?
If updating them does not help, could you please provide a minimal sample
project to reproduce this issue so we can more easily investigate and
ensure any fix is working properly for your use case?
—
Reply to this email directly, view it on GitHub
<#2930 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOZOOKVC3T6QQS3663EDV7DUUSQKRANCNFSM5KSL2QBQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
*NIDHIN T M*
Senior Software Engineer
Techgentsia software pvt ltd
Mobile : +91 9633946831
|
Can you make and share a minimal sample project that reproduces the behavior? It will help us figure out what's happening. |
Actually it's just a controller with one API and @ Timed annotation
…On Thu, Jan 6, 2022 at 2:51 PM Tommy Ludwig ***@***.***> wrote:
Can you make and share a minimal sample project that reproduces the
behavior? It will help us figure out what's happening.
—
Reply to this email directly, view it on GitHub
<#2930 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOZOOKQ7MRPAPDTOPYVNFYDUUVNILANCNFSM5KSL2QBQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
*NIDHIN T M*
Senior Software Engineer
Techgentsia software pvt ltd
Mobile : +91 9633946831
|
Alright, well, I've now taken the time to create such a sample application at https://github.com/shakuzen/gh-2930 and I don't see the behavior you've described. I start the application, I make a request to You shouldn't be making a |
I've opened #4621 to improve our documentation around this issue as it has come up before. |
So you mean we don't need to use that aspect?
…On Thu, 6 Jan, 2022, 3:49 pm Tommy Ludwig, ***@***.***> wrote:
I've opened micrometer-metrics/micrometer#4621
<#4621> to
improve our documentation around this issue as it has come up before.
—
Reply to this email directly, view it on GitHub
<#2930 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOZOOKSAMSUH3FJIJVBZNVDUUVUEFANCNFSM5KSL2QBQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
When using @timed annotation in the controller in the response gets some weird return. And this function will call external calls ( using resttemplate).
Response getting -
{ "message": "okay" }{ "timestamp": "2021-12-22T11:43:40.386+00:00", "status": 200, "error": "OK", "message": "", "path": "/api/v1/request" }
Removing value from @timed annotation will fix this issue or removing the below Beans also fix the issue.
@Bean public TimedAspect timedAspect(MeterRegistry registry) { return new TimedAspect(registry); }
The exception getting is --
java.lang.IllegalArgumentException: Collector already registered that provides name: requestInsurekaRepresentative_driskaa_seconds_count at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:54) at io.prometheus.client.Collector.register(Collector.java:139) at io.micrometer.prometheus.PrometheusMeterRegistry.lambda$applyToCollector$16(PrometheusMeterRegistry.java:410) at java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1853) at io.micrometer.prometheus.PrometheusMeterRegistry.applyToCollector(PrometheusMeterRegistry.java:406) at io.micrometer.prometheus.PrometheusMeterRegistry.newTimer(PrometheusMeterRegistry.java:200) at io.micrometer.core.instrument.MeterRegistry.lambda$timer$2(MeterRegistry.java:310) at io.micrometer.core.instrument.MeterRegistry.getOrCreateMeter(MeterRegistry.java:614) at io.micrometer.core.instrument.MeterRegistry.registerMeterIfNecessary(MeterRegistry.java:568) at io.micrometer.core.instrument.MeterRegistry.timer(MeterRegistry.java:308) at io.micrometer.core.instrument.Timer$Builder.register(Timer.java:401) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.getTimer(WebMvcMetricsFilter.java:169) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.record(WebMvcMetricsFilter.java:135) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:109) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.keycloak.adapters.tomcat.AbstractAuthenticatedActionsValve.invoke(AbstractAuthenticatedActionsValve.java:67) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) at org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve.invoke(AbstractKeycloakAuthenticatorValve.java:181) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)
The text was updated successfully, but these errors were encountered: