1

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.

amseager
  • 5,795
  • 4
  • 24
  • 47
  • Try to enable trace receiver and push it there. It should work from the OTEL perspective. Question is how it is implemenet in the Grafana agent. You can switch to OTEL collector in the worst case. – Jan Garaj Feb 18 '23 at 06:51

1 Answers1

2

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.

Maciej Nawrocki
  • 149
  • 1
  • 5
  • Exactly. I also got [an answer](https://github.com/grafana/agent/issues/3015#issuecomment-1435061975) from one of grafana agent developers with the sample flow configuration – amseager Mar 17 '23 at 14:42