Netty Prometheus Integration
See original GitHub issueFollowing the Metrics Reporting Guide the server sets up a metric reporter using GrpcServer.default
. When I attempt to use GrpcServer.netty
I get the following error when pointing prometheus at the service:
INFO: Transport failed
io.netty.handler.codec.http2.Http2Exception: Unexpected HTTP/1.x request: GET /metrics my_server
at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:85)
at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.readClientPrefaceString(Http2ConnectionHandler.java:314)
at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:251)
....
Is it possible to use this metric reporter with the netty server version?
Hopefully relevant code bits:
object CombinedServerMain extends IOApp with CommonRuntime {
...
override def run(args: List[String]): IO[ExitCode] = {
for {
metricsOps <- PrometheusMetrics.build[IO](CollectorRegistry.defaultRegistry)
interceptor = MetricsServerInterceptor(metricsOps)
accountService <- AccountService.bindService[IO].map(_.interceptWith(interceptor)).map(AddService)
server <- GrpcServer.netty[IO](10123, accountService :: Nil)
runServer <- GrpcServer.server[IO](server).as(ExitCode.Success)
} yield runServer
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Reactor Netty Reference Guide
The TCP server supports built-in integration with Micrometer . It exposes all metrics with a prefix of reactor.netty.tcp.server .
Read more >Spring Webflux - Actuator - Netty thread metrics?
In my app, I expose the endpoints from the /actuator/prometheus route. Meaning I should build a uriMappingFunction mapping to my prometheus ...
Read more >Monitoring Secure Coroutines and WebFlux Reactive ...
In this article, we will look at one of the many ways to keep an application's behavior closely under watch and use Prometheus...
Read more >Metrics → Prometheus→ Grafana - Medium
This is a simple example that can get an idea about how to use Metrics and visualize them in Grafana dashboard. Step 1...
Read more >Dependents | io.netty:netty-codec-http | Maven | Open Source Insights
com.azure.spring:azure-spring-integration-core, Version, 2.1.0, Relation, Indirect ... io.micrometer.prometheus:prometheus-rsocket-proxy-server, Version ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
When using
GrpcServer.default[IO]
instead of netty; I get the following exception:Is prometheus integration in a known good state and I’m doing something wrong? Is there updated documentation on how to use it? I’m dependening on the following targets:
Glad it worked. I’ve created an issue #677