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): fix vultr platform detection in statsreporter (#9326)

Nageshbansaldcc902fb2753
diff --git a/pkg/version/deployment.go b/pkg/version/deployment.go
index 4b4458ffd0..8240e4da93 100644
--- a/pkg/version/deployment.go
+++ b/pkg/version/deployment.go
@@ -119,6 +119,16 @@ func detectPlatform() string {
// Try to detect cloud provider through metadata endpoints
client := &http.Client{Timeout: 1 * gotime.Second}
+ // Vultr metadata, Must come before AWS Detection — Vultr exposes the AWS IMDS endpoint, causing false AWS detection.
+ if req, err := http.NewRequest(http.MethodGet, "http://169.254.169.254/v1/hostname", nil); err == nil {
+ if resp, err := client.Do(req); err == nil {
+ resp.Body.Close()
+ if resp.StatusCode == 200 {
+ return "vultr"
+ }
+ }
+ }
+
// AWS metadata
if req, err := http.NewRequest(http.MethodGet, "http://169.254.169.254/latest/meta-data/", nil); err == nil {
if resp, err := client.Do(req); err == nil {
@@ -161,16 +171,6 @@ func detectPlatform() string {
}
}
- // Vultr metadata
- if req, err := http.NewRequest(http.MethodGet, "http://169.254.169.254/v1/hostname", nil); err == nil {
- if resp, err := client.Do(req); err == nil {
- resp.Body.Close()
- if resp.StatusCode == 200 {
- return "vultr"
- }
- }
- }
-
// Hetzner metadata
if req, err := http.NewRequest(http.MethodGet, "http://169.254.169.254/hetzner/v1/metadata", nil); err == nil {
if resp, err := client.Do(req); err == nil {