moby / buildkit

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
https://github.com/moby/moby/issues/34227
Apache License 2.0
8.15k stars 1.15k forks source link

Add metrics endpoint for buildkitd #1544

Open jsravn opened 4 years ago

jsravn commented 4 years ago

It would be great if buildkitd exposed metrics that can be used to monitor it and debug issues.

Some useful metrics:

jsravn commented 4 years ago

For per client statistics, it could use the client name in the client TLS certificate if used. Otherwise, maybe some metadata could be passed with the build request.

jsravn commented 4 years ago

I was thinking about this more in the context of a Kubernetes cluster. A problem for registering metrics is buildkit does not know about the context (who is doing the build), so the metrics will have to be quite general. Would be acceptable to add Kubernetes support, such that buildkitd could determine the calling pod information from the peer IP on the gRPC request?

alsterg commented 1 year ago

+1

errordeveloper commented 1 year ago

@jsravn is it correct to assume that you are implying Prometheus exposition format?

jsravn commented 1 year ago

@jsravn is it correct to assume that you are implying Prometheus exposition format?

Yes, or I suppose openmetrics these days.

halvorstein commented 4 months ago

@jsravn Hi. Have you managed to find a workaround for this issue?