-
Notifications
You must be signed in to change notification settings - Fork 164
A complete example to expose /metrics #4
Comments
For a more comprehensive guide on how to use golang Prometheus library, see: |
Can you provide a better example? How does gRPC and http /metrics get served? The example doesn't make sense when you are serving like this:
|
I have exactly the same question here. Any good practice to serve on both gRPC and http? @mwitkow |
@prestonvanloon, I think the thing you're lacking here is a separate goroutine with @HTChang in terms of best practices of serving both gRPC and HTTP.. that's a little bit beyond the scope of this repo in particular. Maybe worthwhile bringing it up in upstream? https://github.com/grpc/grpc-go |
@mwitkow It looks like they have a method to serveHTTP but it has very poor performance and is mostly undocumented. One approach is to have the http on a separate goroutine and port, like you suggested, but I'm not sure how that would impact discovery or reporting. |
@prestonvanloon Can you share the code? How to use |
Can you provide a complete example to expose /metrics in grpc server? Can't find any in the codebase.
The text was updated successfully, but these errors were encountered: