diff --git a/services/app-provider/pkg/revaconfig/config.go b/services/app-provider/pkg/revaconfig/config.go index 96a8abbdf..8b33d14a2 100644 --- a/services/app-provider/pkg/revaconfig/config.go +++ b/services/app-provider/pkg/revaconfig/config.go @@ -43,6 +43,12 @@ func AppProviderConfigFromStruct(cfg *config.Config) map[string]interface{} { }, }, }, + "interceptors": map[string]interface{}{ + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "app_provider", + }, + }, }, } return rcfg diff --git a/services/app-registry/pkg/revaconfig/config.go b/services/app-registry/pkg/revaconfig/config.go index 3f1b27cae..20b754348 100644 --- a/services/app-registry/pkg/revaconfig/config.go +++ b/services/app-registry/pkg/revaconfig/config.go @@ -33,6 +33,12 @@ func AppRegistryConfigFromStruct(cfg *config.Config, logger log.Logger) map[stri }, }, }, + "interceptors": map[string]interface{}{ + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "app_registry", + }, + }, }, } return rcfg diff --git a/services/auth-basic/pkg/revaconfig/config.go b/services/auth-basic/pkg/revaconfig/config.go index 32833a1aa..57cf6a80a 100644 --- a/services/auth-basic/pkg/revaconfig/config.go +++ b/services/auth-basic/pkg/revaconfig/config.go @@ -42,6 +42,12 @@ func AuthBasicConfigFromStruct(cfg *config.Config) map[string]interface{} { }, }, }, + "interceptors": map[string]interface{}{ + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "auth_basic", + }, + }, }, } return rcfg diff --git a/services/auth-bearer/pkg/revaconfig/config.go b/services/auth-bearer/pkg/revaconfig/config.go index cf51a02dc..b24f11e82 100644 --- a/services/auth-bearer/pkg/revaconfig/config.go +++ b/services/auth-bearer/pkg/revaconfig/config.go @@ -33,6 +33,12 @@ func AuthBearerConfigFromStruct(cfg *config.Config) map[string]interface{} { }, }, }, + "interceptors": map[string]interface{}{ + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "auth_bearer", + }, + }, }, } } diff --git a/services/auth-machine/pkg/revaconfig/config.go b/services/auth-machine/pkg/revaconfig/config.go index 637488da0..bc2422156 100644 --- a/services/auth-machine/pkg/revaconfig/config.go +++ b/services/auth-machine/pkg/revaconfig/config.go @@ -32,6 +32,12 @@ func AuthMachineConfigFromStruct(cfg *config.Config) map[string]interface{} { }, }, }, + "interceptors": map[string]interface{}{ + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "auth_machine", + }, + }, }, } } diff --git a/services/frontend/pkg/revaconfig/config.go b/services/frontend/pkg/revaconfig/config.go index 9d4a1f87f..5bd573bef 100644 --- a/services/frontend/pkg/revaconfig/config.go +++ b/services/frontend/pkg/revaconfig/config.go @@ -85,6 +85,10 @@ func FrontendConfigFromStruct(cfg *config.Config) (map[string]interface{}, error "credentials_by_user_agent": cfg.Middleware.Auth.CredentialsByUserAgent, "credential_chain": []string{"bearer"}, }, + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "frontend", + }, }, // TODO build services dynamically "services": map[string]interface{}{ diff --git a/services/gateway/pkg/revaconfig/config.go b/services/gateway/pkg/revaconfig/config.go index 4f9f03785..d8deec31d 100644 --- a/services/gateway/pkg/revaconfig/config.go +++ b/services/gateway/pkg/revaconfig/config.go @@ -80,6 +80,12 @@ func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]i }, }, }, + "interceptors": map[string]interface{}{ + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "gateway", + }, + }, }, } return rcfg diff --git a/services/groups/pkg/revaconfig/config.go b/services/groups/pkg/revaconfig/config.go index e5d048abf..6e899c1a7 100644 --- a/services/groups/pkg/revaconfig/config.go +++ b/services/groups/pkg/revaconfig/config.go @@ -44,6 +44,12 @@ func GroupsConfigFromStruct(cfg *config.Config) map[string]interface{} { }, }, }, + "interceptors": map[string]interface{}{ + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "groups", + }, + }, }, } } diff --git a/services/ocdav/pkg/command/server.go b/services/ocdav/pkg/command/server.go index f300810c0..afd3a06c1 100644 --- a/services/ocdav/pkg/command/server.go +++ b/services/ocdav/pkg/command/server.go @@ -65,6 +65,8 @@ func Server(cfg *config.Config) *cli.Command { // ocdav.FavoriteManager() // FIXME needs a proper persistence implementation https://github.com/owncloud/ocis/issues/1228 // ocdav.LockSystem(), // will default to the CS3 lock system // ocdav.TLSConfig() // tls config for the http server + ocdav.MetricsEnabled(true), + ocdav.MetricsNamespace("ocis"), } if cfg.Tracing.Enabled { diff --git a/services/sharing/pkg/revaconfig/config.go b/services/sharing/pkg/revaconfig/config.go index fc4f675b8..49761b8ae 100644 --- a/services/sharing/pkg/revaconfig/config.go +++ b/services/sharing/pkg/revaconfig/config.go @@ -109,6 +109,10 @@ func SharingConfigFromStruct(cfg *config.Config) map[string]interface{} { "tls-insecure": cfg.Events.TLSInsecure, "tls-root-ca-cert": cfg.Events.TLSRootCaCertPath, }, + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "sharing", + }, }, }, } diff --git a/services/storage-publiclink/pkg/revaconfig/config.go b/services/storage-publiclink/pkg/revaconfig/config.go index 2c2cfd9c0..ab335219d 100644 --- a/services/storage-publiclink/pkg/revaconfig/config.go +++ b/services/storage-publiclink/pkg/revaconfig/config.go @@ -23,6 +23,10 @@ func StoragePublicLinkConfigFromStruct(cfg *config.Config) map[string]interface{ "address": cfg.GRPC.Addr, "interceptors": map[string]interface{}{ "log": map[string]interface{}{}, + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "storage_publiclink", + }, }, "services": map[string]interface{}{ "publicstorageprovider": map[string]interface{}{ diff --git a/services/storage-shares/pkg/revaconfig/config.go b/services/storage-shares/pkg/revaconfig/config.go index d6d29ba0e..320681317 100644 --- a/services/storage-shares/pkg/revaconfig/config.go +++ b/services/storage-shares/pkg/revaconfig/config.go @@ -27,6 +27,12 @@ func StorageSharesConfigFromStruct(cfg *config.Config) map[string]interface{} { "mount_id": cfg.MountID, }, }, + "interceptors": map[string]interface{}{ + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "storage_shares", + }, + }, }, } if cfg.ReadOnly { diff --git a/services/storage-system/pkg/revaconfig/config.go b/services/storage-system/pkg/revaconfig/config.go index b7026b180..aa7e64cfe 100644 --- a/services/storage-system/pkg/revaconfig/config.go +++ b/services/storage-system/pkg/revaconfig/config.go @@ -98,6 +98,12 @@ func StorageSystemFromStruct(cfg *config.Config) map[string]interface{} { "data_server_url": cfg.DataServerURL, }, }, + "interceptors": map[string]interface{}{ + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "storage_system", + }, + }, }, "http": map[string]interface{}{ "network": cfg.HTTP.Protocol, @@ -127,6 +133,12 @@ func StorageSystemFromStruct(cfg *config.Config) map[string]interface{} { }, }, }, + "middlewares": map[string]interface{}{ + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "storage_system", + }, + }, }, } return rcfg diff --git a/services/storage-users/pkg/revaconfig/config.go b/services/storage-users/pkg/revaconfig/config.go index e6642cac9..332f8a5ef 100644 --- a/services/storage-users/pkg/revaconfig/config.go +++ b/services/storage-users/pkg/revaconfig/config.go @@ -41,6 +41,10 @@ func StorageUsersConfigFromStruct(cfg *config.Config) map[string]interface{} { "tls-insecure": cfg.Events.TLSInsecure, "tls-root-ca-cert": cfg.Events.TLSRootCaCertPath, }, + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "storage_users", + }, }, }, "http": map[string]interface{}{ diff --git a/services/users/pkg/revaconfig/config.go b/services/users/pkg/revaconfig/config.go index 187381c02..c00b31506 100644 --- a/services/users/pkg/revaconfig/config.go +++ b/services/users/pkg/revaconfig/config.go @@ -45,6 +45,12 @@ func UsersConfigFromStruct(cfg *config.Config) map[string]interface{} { }, }, }, + "interceptors": map[string]interface{}{ + "prometheus": map[string]interface{}{ + "namespace": "ocis", + "subsystem": "users", + }, + }, }, } return rcfg