Add storage metrics (#554)

* Add cache storage metrics

- autocache client metrics
- autocache server metrics
- boltdb metrics
- redis client metrics
- refactor metrics registry to be general purpose
This commit is contained in:
Travis Groth 2020-03-23 22:07:48 -04:00 committed by GitHub
parent acfc880421
commit cc504362e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 400 additions and 108 deletions

View file

@ -5,9 +5,10 @@ package bolt
import (
"context"
"github.com/pomerium/pomerium/internal/kv"
bolt "go.etcd.io/bbolt"
"github.com/pomerium/pomerium/internal/kv"
"github.com/pomerium/pomerium/internal/telemetry/metrics"
)
var _ kv.Store = &Store{}
@ -64,6 +65,7 @@ func New(o *Options) (*Store, error) {
return nil, err
}
metrics.AddBoltDBMetrics(db.Stats)
return &Store{db: db, bucket: o.Bucket}, nil
}