-
Notifications
You must be signed in to change notification settings - Fork 992
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
http_server_requests metrics missing with spring boot 2.7.0 in the cloud #3207
Comments
Current export:
|
Are you sending requests to the application before checking the metrics when deploying? The http server metrics won't show up until a request has been processed. The first time you request the prometheus endpoint, it won't have http server metrics for itself, because it is returning the metrics before the timing of the request to the prometheus endpoint completes. |
Same here, even after sending a request to the endpoints, the prometheus endpoint does not display any http server metrics. Not sure if it's related to the spring-cloud-starter-kubernetes-client-config |
Yes of course tested with requests on the API and on actuator itself... |
OK. So I see it works locally (and I was able to run the sample locally and see the metrics), but the metric is missing when packaged and deployed to CloudFoundry. Can you add in details of your CF setup? What buildpack/Java version is being used? Are you deploying as a WAR or JAR? Do you have the CF manifest or push command you are using? |
We use cf push with manifest. Java buildpack. |
Example manifest:
|
Example push command:
|
Can it happen that there is a config source that you have in CF but you don't have locally (env var, property/yml file, vault, config server, git, etc.)? Can you try to enable actuator and hit the Also, you can try to diff the |
I had a similar issue with not receiving http_server_request metrics using Spring Boot 2.7.0. As it turned out there is an issue in WebMvcMetricsFilter or, to be more precise, in its WebMvcMetricsAutoConfiguration introduced in 2.7.0 actuator. See the attached link for more information. Adding the recommended configuration solved the issue for me. Maybe this is related to your problem, too. |
@stefanharke thank you for sharing that. Could folks seeing the issue reported here try with Spring Boot 2.7.1-SNAPSHOT to see if that fixes it? |
I had this issue also, and it turned out to be an issue of Spring-boog 2.7.0 as @stefanharke mentioned here. |
I tried |
Thank you for checking the Spring Boot snapshots. I will close this issue as a duplicate of the issue in Spring Boot: spring-projects/spring-boot#31150 |
Describe the bug
If I deploy an application with spring boot 2.7.0 and micrometer prometheus exporter to cloud foundry, the http_server_requests* metrics are missing.
Environment
To Reproduce
How to reproduce the bug:
https://github.com/headfox23/spring-boot-micrometer-test reproduces this issue.
Expected behavior
I expect to see this:
Additional context
If i run the example locally it works fine...
The text was updated successfully, but these errors were encountered: