wrap plugin database type with metrics middleware

This commit is contained in:
Brian Kassouf 2017-03-14 13:12:47 -07:00
parent 822a3eb20a
commit 3ecb344878

View file

@ -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
}