Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

chore(statsreporter): adds statscollector for config (#9407)

Nageshbansal64e379c413fa
diff --git a/pkg/signoz/config.go b/pkg/signoz/config.go
index d3d43be1b3..2b4222eafe 100644
--- a/pkg/signoz/config.go
+++ b/pkg/signoz/config.go
@@ -30,6 +30,7 @@ import (
"github.com/SigNoz/signoz/pkg/statsreporter"
"github.com/SigNoz/signoz/pkg/telemetrystore"
"github.com/SigNoz/signoz/pkg/tokenizer"
+ "github.com/SigNoz/signoz/pkg/valuer"
"github.com/SigNoz/signoz/pkg/version"
"github.com/SigNoz/signoz/pkg/web"
"github.com/spf13/cobra"
@@ -334,3 +335,18 @@ func mergeAndEnsureBackwardCompatibility(ctx context.Context, logger *slog.Logge
config.Tokenizer.JWT.Secret = os.Getenv("SIGNOZ_JWT_SECRET")
}
}
+
+func (config Config)Collect(_ context.Context, _ valuer.UUID) (map[string]any, error){
+ stats := make(map[string]any)
+
+ // SQL Store Config Stats
+ stats["config.sqlstore.provider"] = config.SQLStore.Provider
+
+ // Tokenizer Config Stats
+ stats["config.tokenizer.provider"] = config.Tokenizer.Provider
+
+ // Cache Config Stats
+ stats["config.cache.provider"] = config.Cache.Provider
+
+ return stats, nil
+}
diff --git a/pkg/signoz/signoz.go b/pkg/signoz/signoz.go
index 46f411ca15..2635e2a24f 100644
--- a/pkg/signoz/signoz.go
+++ b/pkg/signoz/signoz.go
@@ -314,6 +314,7 @@ func New(
modules.User,
licensing,
tokenizer,
+ config,
}
// Initialize stats reporter from the available stats reporter provider factories