mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-13 06:49:38 -05:00
enable request tracking prometheus middleware in reva (#4571)
* enable request tracking prometheus middleware in reva Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * enable metrics for ocdav Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
committed by
GitHub
parent
99d71971d7
commit
2197489c26
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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{}{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -44,6 +44,12 @@ func GroupsConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
},
|
||||
},
|
||||
},
|
||||
"interceptors": map[string]interface{}{
|
||||
"prometheus": map[string]interface{}{
|
||||
"namespace": "ocis",
|
||||
"subsystem": "groups",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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{}{
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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{}{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user