Springdoc和Prometheus

发布于 2025-02-04 07:50:10 字数 241 浏览 4 评论 0原文

是否可以通过Sprindoc收集有关Prometheus终点的信息?

我们最近从Springfox图书馆搬到了Springdoc。 SpringFox能够收集有关服务器上运行的所有端点的信息。 SpringDoc仅显示在代码级别上配置为@RestController的终点。 有一个SpringDoc配置属性,允许定义软件包扫描。 但是,这无济 Management.Endpoints.web.exposure.include = Prometheus

Is it possible to gather information on prometheus end point by sprindoc?

We've recently moved from springfox library to springdoc.
Springfox was able to gather information on all end points running on the server.
Springdoc is only showing now end points configured as @RestController on code level.
There is a springdoc config property allowing to define packages to scan.
However this doesn't help, because prometheus end point is configured in springboot properties
management.endpoints.web.exposure.include= prometheus

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暗藏城府 2025-02-11 07:50:10

找到了解决方案。以下属性正在将所有spring-boot-actuator端点添加到Swagger:

springdoc.show-actuator=true

执行器终点点本身是通过属性配置的:

management.endpoints.web.exposure.include= prometheus

等等。

Found a solution. Following property is adding all spring-boot-actuator endpoints to swagger:

springdoc.show-actuator=true

Actuator end points themselves are configured via the property:

management.endpoints.web.exposure.include= prometheus

etc..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文