You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
738 B

  1. package weed_server
  2. import "github.com/prometheus/client_golang/prometheus"
  3. var (
  4. filerRequestCounter = prometheus.NewCounterVec(
  5. prometheus.CounterOpts{
  6. Namespace: "SeaweedFS",
  7. Subsystem: "filer",
  8. Name: "request_total",
  9. Help: "Counter of filer requests.",
  10. }, []string{"type"})
  11. filerRequestHistogram = prometheus.NewHistogramVec(
  12. prometheus.HistogramOpts{
  13. Namespace: "SeaweedFS",
  14. Subsystem: "filer",
  15. Name: "request_seconds",
  16. Help: "Bucketed histogram of filer request processing time.",
  17. Buckets: prometheus.ExponentialBuckets(0.0005, 2, 18),
  18. }, []string{"type"})
  19. )
  20. func init() {
  21. prometheus.MustRegister(filerRequestCounter)
  22. prometheus.MustRegister(filerRequestHistogram)
  23. }