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(flagger): remove get_meters_from_zeus feature flag (#12766)

Vikrant Gupta8680361c6888
diff --git a/.github/workflows/build-enterprise.yaml b/.github/workflows/build-enterprise.yaml
index db792d1829..aec350ed59 100644
--- a/.github/workflows/build-enterprise.yaml
+++ b/.github/workflows/build-enterprise.yaml
@@ -103,7 +103,6 @@ jobs:
-X github.com/SigNoz/signoz/pkg/version.branch=${{ needs.prepare.outputs.branch }}
-X github.com/SigNoz/signoz/ee/zeus.url=https://api.signoz.cloud
-X github.com/SigNoz/signoz/ee/zeus.deprecatedURL=https://license.signoz.io
- -X github.com/SigNoz/signoz/ee/query-service/constants.LicenseSignozIo=https://license.signoz.io/api/v1
-X github.com/SigNoz/signoz/pkg/analytics.key=9kRrJ7oPCGPEJLF6QjMPLt5bljFhRQBr'
DOCKER_BASE_IMAGES: '{"alpine": "alpine:3.20.3"}'
DOCKER_DOCKERFILE_PATH: ./cmd/enterprise/Dockerfile.multi-arch
diff --git a/.github/workflows/build-staging.yaml b/.github/workflows/build-staging.yaml
index 3bf70a428e..8ba9833830 100644
--- a/.github/workflows/build-staging.yaml
+++ b/.github/workflows/build-staging.yaml
@@ -109,7 +109,6 @@ jobs:
-X github.com/SigNoz/signoz/pkg/version.branch=${{ needs.prepare.outputs.branch }}
-X github.com/SigNoz/signoz/ee/zeus.url=https://api.staging.signoz.cloud
-X github.com/SigNoz/signoz/ee/zeus.deprecatedURL=https://license.staging.signoz.cloud
- -X github.com/SigNoz/signoz/ee/query-service/constants.LicenseSignozIo=https://license.staging.signoz.cloud/api/v1
-X github.com/SigNoz/signoz/pkg/analytics.key=9kRrJ7oPCGPEJLF6QjMPLt5bljFhRQBr'
DOCKER_BASE_IMAGES: '{"alpine": "alpine:3.20.3"}'
DOCKER_DOCKERFILE_PATH: ./cmd/enterprise/Dockerfile.multi-arch
diff --git a/cmd/enterprise/.goreleaser.yaml b/cmd/enterprise/.goreleaser.yaml
index d8d3691321..50da6634ae 100644
--- a/cmd/enterprise/.goreleaser.yaml
+++ b/cmd/enterprise/.goreleaser.yaml
@@ -31,7 +31,6 @@ builds:
- -X github.com/SigNoz/signoz/pkg/version.branch={{ .Branch }}
- -X github.com/SigNoz/signoz/ee/zeus.url=https://api.signoz.cloud
- -X github.com/SigNoz/signoz/ee/zeus.deprecatedURL=https://license.signoz.io
- - -X github.com/SigNoz/signoz/ee/query-service/constants.LicenseSignozIo=https://license.signoz.io/api/v1
- -X github.com/SigNoz/signoz/pkg/analytics.key=9kRrJ7oPCGPEJLF6QjMPLt5bljFhRQBr
mod_timestamp: "{{ .CommitTimestamp }}"
tags:
diff --git a/ee/query-service/app/api/license.go b/ee/query-service/app/api/license.go
index 6749b24857..50c657d0aa 100644
--- a/ee/query-service/app/api/license.go
+++ b/ee/query-service/app/api/license.go
@@ -5,12 +5,7 @@ import (
"fmt"
"net/http"
- "github.com/SigNoz/signoz/ee/query-service/constants"
"github.com/SigNoz/signoz/ee/query-service/model"
- "github.com/SigNoz/signoz/pkg/flagger"
- "github.com/SigNoz/signoz/pkg/types/authtypes"
- "github.com/SigNoz/signoz/pkg/types/featuretypes"
- "github.com/SigNoz/signoz/pkg/valuer"
)
type DayWiseBreakdown struct {
@@ -57,11 +52,6 @@ type billingData struct {
SubscriptionStatus string `json:"subscriptionStatus"`
}
-type billingDetails struct {
- Status string `json:"status"`
- Data billingData `json:"data"`
-}
-
func (ah *APIHandler) getBilling(w http.ResponseWriter, r *http.Request) {
licenseKey := r.URL.Query().Get("licenseKey")
@@ -70,53 +60,17 @@ func (ah *APIHandler) getBilling(w http.ResponseWriter, r *http.Request) {
return
}
- claims, err := authtypes.ClaimsFromContext(r.Context())
- if err != nil {
- RespondError(w, model.InternalError(err), nil)
- return
- }
-
- orgID := valuer.MustNewUUID(claims.OrgID)
- evalCtx := featuretypes.NewFlaggerEvaluationContext(orgID)
- useZeus := ah.Signoz.Flagger.BooleanOrEmpty(r.Context(), flagger.FeatureGetMetersFromZeus, evalCtx)
-
- if useZeus {
- data, err := ah.Signoz.Zeus.GetMeters(r.Context(), licenseKey)
- if err != nil {
- RespondError(w, model.InternalError(err), nil)
- return
- }
-
- var billing billingData
- if err := json.Unmarshal(data, &billing); err != nil {
- RespondError(w, model.InternalError(err), nil)
- return
- }
-
- ah.Respond(w, billing)
- return
- }
-
- billingURL := fmt.Sprintf("%s/usage?licenseKey=%s", constants.LicenseSignozIo, licenseKey)
-
- hClient := &http.Client{}
- req, err := http.NewRequest("GET", billingURL, nil)
- if err != nil {
- RespondError(w, model.InternalError(err), nil)
- return
- }
- req.Header.Add("X-SigNoz-SecretKey", constants.LicenseAPIKey)
- billingResp, err := hClient.Do(req)
+ data, err := ah.Signoz.Zeus.GetMeters(r.Context(), licenseKey)
if err != nil {
RespondError(w, model.InternalError(err), nil)
return
}
- var billingResponse billingDetails
- if err := json.NewDecoder(billingResp.Body).Decode(&billingResponse); err != nil {
+ var billing billingData
+ if err := json.Unmarshal(data, &billing); err != nil {
RespondError(w, model.InternalError(err), nil)
return
}
- ah.Respond(w, billingResponse.Data)
+ ah.Respond(w, billing)
}
diff --git a/ee/query-service/constants/constants.go b/ee/query-service/constants/constants.go
index ed7126ce0e..c17072d547 100644
--- a/ee/query-service/constants/constants.go
+++ b/ee/query-service/constants/constants.go
@@ -4,8 +4,6 @@ import (
"os"
)
-var LicenseSignozIo = "https://license.signoz.io/api/v1"
-var LicenseAPIKey = GetOrDefaultEnv("SIGNOZ_LICENSE_API_KEY", "")
var SaasSegmentKey = GetOrDefaultEnv("SIGNOZ_SAAS_SEGMENT_KEY", "")
var FetchFeatures = GetOrDefaultEnv("FETCH_FEATURES", "false")
var ZeusFeaturesURL = GetOrDefaultEnv("ZEUS_FEATURES_URL", "ZeusFeaturesURL")
diff --git a/pkg/flagger/registry.go b/pkg/flagger/registry.go
index caa25c12c6..97ea2481dd 100644
--- a/pkg/flagger/registry.go
+++ b/pkg/flagger/registry.go
@@ -6,7 +6,6 @@ var (
FeatureUseSpanMetrics = featuretypes.MustNewName("use_span_metrics")
FeatureKafkaSpanEval = featuretypes.MustNewName("kafka_span_eval")
FeatureHideRootUser = featuretypes.MustNewName("hide_root_user")
- FeatureGetMetersFromZeus = featuretypes.MustNewName("get_meters_from_zeus")
FeaturePutMetersInZeus = featuretypes.MustNewName("put_meters_in_zeus")
FeatureUseMeterReporter = featuretypes.MustNewName("use_meter_reporter")
FeatureUseJSONBody = featuretypes.MustNewName("use_json_body")
@@ -42,14 +41,6 @@ func MustNewRegistry() featuretypes.Registry {
DefaultVariant: featuretypes.MustNewName("disabled"),
Variants: featuretypes.NewBooleanVariants(),
},
- &featuretypes.Feature{
- Name: FeatureGetMetersFromZeus,
- Kind: featuretypes.KindBoolean,
- Stage: featuretypes.StageExperimental,
- Description: "Controls whether billing details are fetched from Zeus instead of the legacy subscriptions service",
- DefaultVariant: featuretypes.MustNewName("disabled"),
- Variants: featuretypes.NewBooleanVariants(),
- },
&featuretypes.Feature{
Name: FeaturePutMetersInZeus,
Kind: featuretypes.KindBoolean,