From 3ecb344878ba38ed964ac4ddb3591dee09fe5778 Mon Sep 17 00:00:00 2001 From: Brian Kassouf Date: Tue, 14 Mar 2017 13:12:47 -0700 Subject: [PATCH] wrap plugin database type with metrics middleware --- builtin/logical/database/dbs/db.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/builtin/logical/database/dbs/db.go b/builtin/logical/database/dbs/db.go index 2cc42a731..3b10db464 100644 --- a/builtin/logical/database/dbs/db.go +++ b/builtin/logical/database/dbs/db.go @@ -90,6 +90,12 @@ func PluginFactory(conf *DatabaseConfig) (DatabaseType, error) { return nil, err } + // Wrap with metrics middleware + db = &databaseMetricsMiddleware{ + next: db, + typeStr: db.Type(), + } + return db, nil }