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.

2.1 KB
Raw Blame
package licensetypes

import (
	"github.com/SigNoz/signoz/pkg/valuer"
)

var (
	// Feature Key.
	SSO            = valuer.NewString("sso")
	Onboarding     = valuer.NewString("onboarding")
	ChatSupport    = valuer.NewString("chat_support")
	Gateway        = valuer.NewString("gateway")
	PremiumSupport = valuer.NewString("premium_support")

	AnomalyDetection = valuer.NewString("anomaly_detection")

	// License State.
	LicenseStatusInvalid = valuer.NewString("invalid")

	// License Platform.
	LicensePlatformCloud      = valuer.NewString("cloud")
	LicensePlatformSelfHosted = valuer.NewString("self_hosted")

	// Plan.
	PlanNameEnterprise = valuer.NewString("enterprise")
	PlanNameBasic      = valuer.NewString("basic")
)

type Feature struct {
	Name       valuer.String `json:"name"`
	Active     bool          `json:"active"`
	Usage      int64         `json:"usage"`
	UsageLimit int64         `json:"usage_limit"`
	Route      string        `json:"route"`
}

var BasicPlan = []*Feature{
	{
		Name:       SSO,
		Active:     false,
		Usage:      0,
		UsageLimit: -1,
		Route:      "",
	},
	{
		Name:       Gateway,
		Active:     false,
		Usage:      0,
		UsageLimit: -1,
		Route:      "",
	},
	{
		Name:       PremiumSupport,
		Active:     false,
		Usage:      0,
		UsageLimit: -1,
		Route:      "",
	},
	{
		Name:       AnomalyDetection,
		Active:     false,
		Usage:      0,
		UsageLimit: -1,
		Route:      "",
	},
}

var EnterprisePlan = []*Feature{
	{
		Name:       SSO,
		Active:     true,
		Usage:      0,
		UsageLimit: -1,
		Route:      "",
	},
	{
		Name:       Onboarding,
		Active:     true,
		Usage:      0,
		UsageLimit: -1,
		Route:      "",
	},
	{
		Name:       ChatSupport,
		Active:     true,
		Usage:      0,
		UsageLimit: -1,
		Route:      "",
	},
	{
		Name:       Gateway,
		Active:     true,
		Usage:      0,
		UsageLimit: -1,
		Route:      "",
	},
	{
		Name:       PremiumSupport,
		Active:     true,
		Usage:      0,
		UsageLimit: -1,
		Route:      "",
	},
	{
		Name:       AnomalyDetection,
		Active:     true,
		Usage:      0,
		UsageLimit: -1,
		Route:      "",
	},
}

var DefaultFeatureSet = []*Feature{}