Spring boot Springboot网关普罗米修斯收集大量数据

Spring boot Springboot网关普罗米修斯收集大量数据,spring-boot,prometheus,spring-boot-actuator,spring-cloud-gateway,prometheus-java,Spring Boot,Prometheus,Spring Boot Actuator,Spring Cloud Gateway,Prometheus Java,我正在使用springboot作为微服务 我的k8s群集中大约有20个微服务 我正在使用promethues收集数据,以显示在grafana中 在该应用程序中,有一些url使用路径变量,如下所示 /v1/contacts/{id} /v1/users/{id} p>几乎没有更多的URL,如果我考虑所有的微服务中的所有URL,那么它可能在 60到70个URL < /强>,它使用路径变量。 问题: 现在,无论何时请求任何url,例如 /v1/contacts/10 /v1/1/111 /v1/1/

我正在使用springboot作为微服务

我的k8s群集中大约有20个微服务

我正在使用promethues收集数据,以显示在grafana中

在该应用程序中,有一些url使用路径变量,如下所示

  • /v1/contacts/{id}
  • /v1/users/{id}
  • <> p>几乎没有更多的URL,如果我考虑所有的微服务中的所有URL,那么它可能在<强> 60到70个URL < /强>,它使用路径变量。 问题:

    现在,无论何时请求任何url,例如

  • /v1/contacts/10
  • /v1/1/111
  • /v1/1/51
  • /v1/users/91
  • 等等

    普罗米修斯正在收集所有这些url的指标。一段时间后,它有了巨大的指标,最后我的响应时间增加了,以便从普罗米修斯那里收集数据

    因此,基本上,我想在springboot应用程序的一段时间后清除prometheus日志

    我不确定这是否可能

    有人能帮我解决这个问题吗


    谢谢

    你有没有考虑从Spring启动这样的HTTP POST请求?或者更好的解决方案是在prometheus刮取时间过滤不需要的指标?@Felipe这就像从prometheus服务器删除prometheus数据一样,我的问题是/actuator/promethes endpoint进入sprintboot应用程序。Prometheus数据存储在springboot应用程序中,因此会影响性能。