656ece06e5
Some components like go-ds-measure, go-ipfs-blockstore and go-bitswap expose metrics via ipfs/go-metrics-interface, but Lotus never injects the Prometheus exporter (ipfs/go-metrics-prometheus). Therefore, those metrics never surface in instrumentation. Instead, Lotus uses OpenCensus directly. This commit injects the Prometheus exporter for go-metrics-interface, and instructs the OpenCensus Prometheus exporter to use the DefaultRegistry. This has the effect of exposing blending the metrics of both metrics libraries. With this patch, the datastore, cache utilisation, and bitswap metrics are now exported via the /debug/metrics endpoint. This commit also fixes an issue where the metrics scope was empty, making go-metrics-interface default to "<no-scope>". Angle brackets are inadmissible characters for Prometheus, so it was refusing to export the affected metrics. (These were the ARC cache metrics.) |
||
---|---|---|
.. | ||
backup.go | ||
daemon_nodaemon.go | ||
daemon.go | ||
debug_advance.go | ||
main.go | ||
rpc.go |