Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: metric identify (#1358)

ecmadao1083f3a708a8
diff --git a/bin/server/cmd/profile_dev.go b/bin/server/cmd/profile_dev.go
index 69cf6d4b1a..2a89f3abd2 100644
--- a/bin/server/cmd/profile_dev.go
+++ b/bin/server/cmd/profile_dev.go
@@ -30,7 +30,7 @@ func activeProfile(dataDir string) server.Profile {
BackupRunnerInterval: 10 * time.Second,
Version: version,
PgURL: flags.pgURL,
- MetricConnectionKey: "Q4krM9MitLvUSlty7TAt9kAcThp2GfMH",
+ MetricConnectionKey: "3zcZLeX3ahvlueEJqNyJysGfVAErsjjT",
}
}
diff --git a/server/metric_reporter.go b/server/metric_reporter.go
index 8781574e8e..c4b76c5f39 100644
--- a/server/metric_reporter.go
+++ b/server/metric_reporter.go
@@ -55,9 +55,6 @@ func (m *MetricReporter) Run(ctx context.Context, wg *sync.WaitGroup) {
m.l.Debug(fmt.Sprintf("Metrics reporter started and will run every %v", metricSchedulerInterval))
for {
- // identify will be triggered in every schedule loop so that we can update the latest workspace profile like subscription plan.
- m.identify()
-
select {
case <-ticker.C:
func() {
@@ -71,6 +68,9 @@ func (m *MetricReporter) Run(ctx context.Context, wg *sync.WaitGroup) {
}
}()
+ // identify will be triggered in every schedule loop so that we can update the latest workspace profile like subscription plan.
+ m.identify()
+
ctx := context.Background()
for name, collector := range m.collectors {
m.l.Debug("Run metric collector", zap.String("collector", name))