push milestones

This commit is contained in:
Elio Bischof
2023-06-19 12:15:30 +02:00
parent 084c6fa3a7
commit 4d5a6bb288
16 changed files with 385 additions and 14 deletions

View File

@@ -15,7 +15,9 @@ Tracing:
MetricPrefix: zitadel
Telemetry:
# As long as Enabled is true, usage data is marked to be sent to the configured Telemetry.Endpoints
# As long as Enabled is true, usage data that is marked as due is also tried to be sent to the configured Telemetry.Endpoints.
# Data is marked as due, even if Enabled is false.
# This means that switching this to true makes ZITADEL try to send past data that was marked to send.
Enabled: false
# Push telemetry data to all these endpoints at least once.
# If one endpoint returns an unsuccessful response code or times out,

View File

@@ -3,6 +3,8 @@ package start
import (
"time"
"github.com/zitadel/zitadel/internal/notification/handlers"
"github.com/mitchellh/mapstructure"
"github.com/spf13/viper"
"github.com/zitadel/logging"
@@ -65,6 +67,7 @@ type Config struct {
Eventstore *eventstore.Config
LogStore *logstore.Configs
Quotas *QuotasConfig
Telemetry *handlers.TelemetryPusherConfig
}
type QuotasConfig struct {

View File

@@ -201,14 +201,14 @@ func startZitadel(config *Config, masterKey string, server chan<- *Server) error
return err
}
usageReporter := logstore.UsageReporterFunc(commands.ReportUsage)
usageReporter := logstore.UsageReporterFunc(commands.ReportQuotaUsage)
actionsLogstoreSvc := logstore.New(queries, usageReporter, actionsExecutionDBEmitter, actionsExecutionStdoutEmitter)
if actionsLogstoreSvc.Enabled() {
logging.Warn("execution logs are currently in beta")
}
actions.SetLogstoreService(actionsLogstoreSvc)
notification.Start(ctx, config.Projections.Customizations["notifications"], config.Projections.Customizations["notificationsquotas"], config.ExternalPort, config.ExternalSecure, commands, queries, eventstoreClient, assets.AssetAPIFromDomain(config.ExternalSecure, config.ExternalPort), config.SystemDefaults.Notifications.FileSystemPath, keys.User, keys.SMTP, keys.SMS)
notification.Start(ctx, config.Projections.Customizations["notifications"], config.Projections.Customizations["notificationsquotas"], config.Projections.Customizations["telemetry"], *config.Telemetry, config.ExternalPort, config.ExternalSecure, commands, queries, eventstoreClient, assets.AssetAPIFromDomain(config.ExternalSecure, config.ExternalPort), config.SystemDefaults.Notifications.FileSystemPath, keys.User, keys.SMTP, keys.SMS)
router := mux.NewRouter()
tlsConfig, err := config.TLS.Config()