【问题标题】:integrating prometheus with play + spring application将prometheus与play+spring应用集成
【发布时间】:2021-12-01 19:33:01
【问题描述】:

我是 prometheus + spring 的新手。我的应用程序在 play + spring 上运行。为了使用千分尺进行监控,我添加了:

"org.springframework.boot" % "spring-boot-starter-actuator" % "2.2.4.RELEASE",

"io.micrometer" % "micrometer-registry-prometheus" % "1.2.0"

management.endpoints.web.exposure.include="prometheus" 在 application.conf 中。 尝试在 spring 应用程序中使用 spring boot 执行器时。

当我在本地启动我的服务并尝试点击时:

http://localhost:/actuator/prometheus

它给出 404。

任何人都可以在这方面提供任何线索吗?

【问题讨论】:

  • 你能让其他执行器工作吗?我不熟悉在 Spring 中使用 Play 框架。
  • No /actuator api 本身给出 404

标签: spring playframework prometheus micrometer


【解决方案1】:

Prometheus 端点由 Spring Actuators 提供。这些是自动创建的端点。我不相信 Play Framework 和那些执行器有任何支持。

您可以使用play prometheus filters 创建播放等效端点。您需要确保 Play 和 Micrometer 指标之间的 CollectorRegistry 相同。

【讨论】:

    猜你喜欢
    • 2021-01-19
    • 2015-05-22
    • 2023-03-19
    • 2021-03-06
    • 2020-08-26
    • 2018-07-14
    • 2019-12-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多