Skip to content

Commit

Permalink
Merge pull request #20 from opencloud-eu/metrics-logs-and-supervisor
Browse files Browse the repository at this point in the history
metrics, log and supervisor
  • Loading branch information
butonic authored Jan 14, 2025
2 parents 04099bc + 318ca21 commit d6997b0
Show file tree
Hide file tree
Showing 35 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion opencloud/pkg/runtime/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func Start(ctx context.Context, o ...Option) error {
totalBackoff := 0

// Start creates its own supervisor. Running services under `ocis server` will create its own supervision tree.
s.Supervisor = suture.New("ocis", suture.Spec{
s.Supervisor = suture.New("opencloud", suture.Spec{
EventHook: func(e suture.Event) {
if e.Type() == suture.EventTypeBackoff {
totalBackoff++
Expand Down
2 changes: 1 addition & 1 deletion pkg/crypto/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var acmeTemplate = x509.Certificate{
SerialNumber: serialNumber,
Subject: pkix.Name{
Organization: []string{"Acme Corp"},
CommonName: "OCIS",
CommonName: "OpenCloud",
},
NotBefore: time.Now(),
NotAfter: time.Now().Add(24 * time.Hour * 365),
Expand Down
2 changes: 1 addition & 1 deletion pkg/log/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Options struct {
// newOptions initializes the available default options.
func newOptions(opts ...Option) Options {
opt := Options{
Name: "ocis",
Name: "opencloud",
Level: "info",
Pretty: true,
Color: true,
Expand Down
2 changes: 1 addition & 1 deletion services/activitylog/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "activitylog"
Expand Down
2 changes: 1 addition & 1 deletion services/app-provider/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func AppProviderConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "app_provider",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/app-registry/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func AppRegistryConfigFromStruct(cfg *config.Config, logger log.Logger) map[stri
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "app_registry",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/auth-app/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func AuthAppConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "auth_app",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/auth-basic/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func AuthBasicConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "auth_basic",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/auth-bearer/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func AuthBearerConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "auth_bearer",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/auth-machine/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func AuthMachineConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "auth_machine",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/auth-service/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func AuthMachineConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "auth_service",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/clientlog/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "clientlog"
Expand Down
2 changes: 1 addition & 1 deletion services/eventhistory/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "eventhistory"
Expand Down
2 changes: 1 addition & 1 deletion services/frontend/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
"credentials_by_user_agent": cfg.Middleware.Auth.CredentialsByUserAgent,
},
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "frontend",
},
"requestid": map[string]interface{}{},
Expand Down
2 changes: 1 addition & 1 deletion services/gateway/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]i
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "gateway",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/graph/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "graph"
Expand Down
2 changes: 1 addition & 1 deletion services/groups/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func GroupsConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "groups",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/idp/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "idp"
Expand Down
2 changes: 1 addition & 1 deletion services/invitations/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "invitations"
Expand Down
2 changes: 1 addition & 1 deletion services/ocdav/pkg/command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func Server(cfg *config.Config) *cli.Command {
// ocdav.LockSystem(), // will default to the CS3 lock system
// ocdav.TLSConfig() // tls config for the http server
ocdav.MetricsEnabled(true),
ocdav.MetricsNamespace("ocis"),
ocdav.MetricsNamespace("opencloud"),
ocdav.Tracing("Adding these strings is a workaround for ->", "https://github.com/cs3org/reva/issues/4131"),
ocdav.WithTraceProvider(traceProvider),
ocdav.RegisterTTL(registry.GetRegisterTTL()),
Expand Down
2 changes: 1 addition & 1 deletion services/ocm/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "ocm"
Expand Down
4 changes: 2 additions & 2 deletions services/ocm/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
"credentials_by_user_agent": cfg.Middleware.Auth.CredentialsByUserAgent,
},
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "ocm",
},
"requestid": map[string]interface{}{},
Expand All @@ -61,7 +61,7 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
"ocmprovider": map[string]interface{}{
"ocm_prefix": cfg.OCMD.Prefix,
"endpoint": cfg.Commons.OcisURL,
"provider": "oCIS",
"provider": "OpenCloud",
"webdav_root": "/dav/ocm",
"webapp_root": cfg.ScienceMesh.Prefix,
"enable_webapp": false,
Expand Down
2 changes: 1 addition & 1 deletion services/proxy/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "proxy"
Expand Down
2 changes: 1 addition & 1 deletion services/search/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "search"
Expand Down
2 changes: 1 addition & 1 deletion services/settings/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "settings"
Expand Down
2 changes: 1 addition & 1 deletion services/sharing/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func SharingConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string]
"password": cfg.Events.AuthPassword,
},
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "sharing",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/storage-publiclink/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func StoragePublicLinkConfigFromStruct(cfg *config.Config) map[string]interface{
"interceptors": map[string]interface{}{
"log": map[string]interface{}{},
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "storage_publiclink",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/storage-shares/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func StorageSharesConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "storage_shares",
},
},
Expand Down
4 changes: 2 additions & 2 deletions services/storage-system/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func StorageSystemFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "storage_system",
},
},
Expand Down Expand Up @@ -138,7 +138,7 @@ func StorageSystemFromStruct(cfg *config.Config) map[string]interface{} {
},
"middlewares": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "storage_system",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/storage-users/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func StorageUsersConfigFromStruct(cfg *config.Config) map[string]interface{} {
"password": cfg.Events.AuthPassword,
},
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "storage_users",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/thumbnails/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "thumbnails"
Expand Down
2 changes: 1 addition & 1 deletion services/userlog/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "userlog"
Expand Down
2 changes: 1 addition & 1 deletion services/users/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func UsersConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "users",
},
},
Expand Down
2 changes: 1 addition & 1 deletion services/webdav/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "webdav"
Expand Down
2 changes: 1 addition & 1 deletion services/webfinger/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"

var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"

// Subsystem defines the subsystem for the defines metrics.
Subsystem = "webfinger"
Expand Down

0 comments on commit d6997b0

Please sign in to comment.