将千分尺从罐子中获取到弹簧启动应用程序
我有一个弹簧启动应用程序,其中我使用罐子。 在那个JAR中,我集成了微米计时器以测量一些代码流, 现在,我希望将这些指标发送到数据犬。 有办法做到吗? 当我运行了Spring Boot(2.4.4)应用程序并击中Endpoint Localhost:/arectuator/Metrics时,我得到的
{"names":[]}
意味着Spring Boot应用程序无法拾取计时器。 任何人都可以帮助我使用此
P.SI添加了此配置。
management:
endpoints:
web:
exposure:
include: "*"
metrics:
enable:
all: true
I have a spring boot application in which I use the jar.
In that jar, I have integrated micrometre timers to measure some code flows,
now I want those metrics to be sent to data dog.
Is there a way to do that?
when I ran my spring boot (2.4.4) application and hit the endpoint localhost:/actuator/metrics, I got
{"names":[]}
which means the spring boot application cannot pick up the timers.
Can anyone please help me with this
P.S I have added this config too.
management:
endpoints:
web:
exposure:
include: "*"
metrics:
enable:
all: true
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的指标端点是空的,但不应开箱即用。
这意味着您做了一些破坏它的事情。
如果要手动创建仪表报告或使用全局,请尝试将启动创建的注册表注入组件中。
Your metrics endpoint is empty but it should not be out of the box.
This means that you did something that broke it.
If you are creating a MeterRegistry manually or use the global, try to inject the registry that Boot creates into your components instead.