diff --git a/app/platform/service.go b/app/platform/service.go index 6620b7f487..018dc9569a 100644 --- a/app/platform/service.go +++ b/app/platform/service.go @@ -173,7 +173,7 @@ func New(sc ServiceConfig, options ...Option) (*PlatformService, error) { ps.initEnterprise() // Step 5: Init Metrics - if metricsInterfaceFn != nil { + if metricsInterfaceFn != nil && ps.metricsIFace == nil { // if the metrics interface is set by options, do not override it ps.metricsIFace = metricsInterfaceFn(ps, *ps.configStore.Get().SqlSettings.DriverName, *ps.configStore.Get().SqlSettings.DataSource) }