mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-10 07:37:33 +02:00
telmetry: add databroker storage metrics and tracing (#1161)
* telmetry: add databroker storage metrics and tracing
This commit is contained in:
parent
29fb96a955
commit
3c4513a91e
12 changed files with 255 additions and 15 deletions
|
@ -17,6 +17,7 @@ import (
|
|||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
|
||||
"github.com/pomerium/pomerium/config"
|
||||
"github.com/pomerium/pomerium/internal/log"
|
||||
"github.com/pomerium/pomerium/internal/signal"
|
||||
"github.com/pomerium/pomerium/internal/telemetry/trace"
|
||||
|
@ -348,9 +349,9 @@ func (srv *Server) getDB(recordType string) (storage.Backend, error) {
|
|||
|
||||
func (srv *Server) newDB(recordType string) (db storage.Backend, err error) {
|
||||
switch srv.cfg.storageType {
|
||||
case inmemory.Name:
|
||||
case config.StorageInMemoryName:
|
||||
db = inmemory.NewDB(recordType, srv.cfg.btreeDegree)
|
||||
case redis.Name:
|
||||
case config.StorageRedisName:
|
||||
db, err = redis.New(srv.cfg.storageConnectionString, recordType, int64(srv.cfg.deletePermanentlyAfter.Seconds()))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create new redis storage: %w", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue