erigon-pulse/metrics/json.go
2022-05-07 14:52:04 +07:00

12 lines
248 B
Go

package metrics
import (
"encoding/json"
)
// MarshalJSON returns a byte slice containing a JSON representation of all
// the metrics in the Registry.
func (r *StandardRegistry) MarshalJSON() ([]byte, error) {
return json.Marshal(r.GetAll())
}