英文:
Is it possible to push metrics to a grafana agent from a java application with OpenTelemetry agent instrumentation?
问题
当我设置Grafana代理时,我只看到“抓取”选项,因此代理本身需要轮询我的Java应用(例如,/actuator/metrics
端点)。我想知道是否可以改用“推送”方法。
基本上,我希望能够像我们收集跟踪数据一样:将otlp Java代理添加到我们的应用程序中,在代理端设置gRPC/HTTP接收器,就这样。但似乎您不能为“度量”部分(在“跟踪”部分存在)添加“receivers”块。
我正在使用Grafana代理版本0.31,如果有关系的话。
英文:
When I'm setting up my Grafana Agent, I see only the "scraping" option, so the agent itself needs to poll my java app (e.g. /actuator/metrics
endpoint). I'm wondering if it's possible to have the "push" approach instead.
Basically, I want the same as we could do to collect traces: add otlp java agent to our application, set a grpc/http receiver on the agent side and that's it. But it seems that you cannot have receivers
block for metrics
section (which exists in traces
section).
I'm using Grafana Agent v0.31 if it matters.
答案1
得分: 2
根据我的研究,使用“标准” Grafana 代理配置目前似乎不可能。
但是,在 OpenTelemetry Collector 中可以配置指标接收器。
Grafana 已经推出了 Grafana-Agent-Flow,它提供了 OTelCollector 组件。
看起来它可能满足您的需求,不过由于目前仍在积极开发中,上述组件仍处于 BETA 版本,我不建议将其用于生产维护。
英文:
From my research it seems it is not currently possible with "standard" Grafana Agent configuration.
It is possible to configure metrics receiver in OpenTelemetry Collector though.
Grafana has introduced Grafana-Agent-Flow, which provides OTelCollector components.
It seems like it would meet your requirements, however, as it is currently under heavy development and mentioned components are in BETA, I am not comfortable recommending it for production maintenance.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论