signoz/pkg/query-service/model/featureSet.go
Amol Umbark 2bf534b56f
feat: add ms teams channels (#2689)
* feat: api machinery to support enterprise plan channels

* feat: backend for handling ms teams

* feat: frontend for ms teams

* fix: fixed some minor issues wiht ms teams

* fix: resolved issue with feature gate

* chore: add missing span metrics

* chore: some minor changes are updated

* feat: added the oss flag is updated

---------

Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
Co-authored-by: Palash Gupta <palashgdev@gmail.com>
2023-08-15 21:19:05 +05:30

103 lines
2.1 KiB
Go

package model
type FeatureSet []Feature
type Feature struct {
Name string `db:"name" json:"name"`
Active bool `db:"active" json:"active"`
Usage int64 `db:"usage" json:"usage"`
UsageLimit int64 `db:"usage_limit" json:"usage_limit"`
Route string `db:"route" json:"route"`
}
const SmartTraceDetail = "SMART_TRACE_DETAIL"
const CustomMetricsFunction = "CUSTOM_METRICS_FUNCTION"
const DisableUpsell = "DISABLE_UPSELL"
const OSS = "OSS"
const QueryBuilderPanels = "QUERY_BUILDER_PANELS"
const QueryBuilderAlerts = "QUERY_BUILDER_ALERTS"
const UseSpanMetrics = "USE_SPAN_METRICS"
const AlertChannelSlack = "ALERT_CHANNEL_SLACK"
const AlertChannelWebhook = "ALERT_CHANNEL_WEBHOOK"
const AlertChannelPagerduty = "ALERT_CHANNEL_PAGERDUTY"
const AlertChannelMsTeams = "ALERT_CHANNEL_MSTEAMS"
var BasicPlan = FeatureSet{
Feature{
Name: OSS,
Active: true,
Usage: 0,
UsageLimit: -1,
Route: "",
},
Feature{
Name: DisableUpsell,
Active: false,
Usage: 0,
UsageLimit: -1,
Route: "",
},
Feature{
Name: SmartTraceDetail,
Active: false,
Usage: 0,
UsageLimit: -1,
Route: "",
},
Feature{
Name: CustomMetricsFunction,
Active: false,
Usage: 0,
UsageLimit: -1,
Route: "",
},
Feature{
Name: QueryBuilderPanels,
Active: true,
Usage: 0,
UsageLimit: 5,
Route: "",
},
Feature{
Name: QueryBuilderAlerts,
Active: true,
Usage: 0,
UsageLimit: 5,
Route: "",
},
Feature{
Name: UseSpanMetrics,
Active: false,
Usage: 0,
UsageLimit: -1,
Route: "",
},
Feature{
Name: AlertChannelSlack,
Active: true,
Usage: 0,
UsageLimit: -1,
Route: "",
},
Feature{
Name: AlertChannelWebhook,
Active: true,
Usage: 0,
UsageLimit: -1,
Route: "",
},
Feature{
Name: AlertChannelPagerduty,
Active: true,
Usage: 0,
UsageLimit: -1,
Route: "",
},
Feature{
Name: AlertChannelMsTeams,
Active: false,
Usage: 0,
UsageLimit: -1,
Route: "",
},
}