Library elements: Remove ability to set as "library variable" (#106594)

This commit is contained in:
Stephanie Hingtgen
2025-06-12 08:41:18 -05:00
committed by GitHub
parent a1f2693fd8
commit f4e4ba6f19
15 changed files with 22 additions and 233 deletions
-10
View File
@@ -205,9 +205,6 @@ var (
// StatsTotalLibraryPanels is a metric of total number of library panels stored in Grafana.
StatsTotalLibraryPanels prometheus.Gauge
// StatsTotalLibraryVariables is a metric of total number of library variables stored in Grafana.
StatsTotalLibraryVariables prometheus.Gauge
// StatsTotalDataKeys is a metric of total number of data keys stored in Grafana.
StatsTotalDataKeys *prometheus.GaugeVec
@@ -644,12 +641,6 @@ func init() {
Namespace: ExporterName,
})
StatsTotalLibraryVariables = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "stat_totals_library_variables",
Help: "total amount of library variables in the database",
Namespace: ExporterName,
})
StatsTotalDataKeys = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: "stat_totals_data_keys",
Help: "total amount of data keys in the database",
@@ -782,7 +773,6 @@ func initMetricVars(reg prometheus.Registerer) {
StatsTotalAlertRules,
StatsTotalRuleGroups,
StatsTotalLibraryPanels,
StatsTotalLibraryVariables,
StatsTotalDataKeys,
MStatTotalPublicDashboards,
MPublicDashboardRequestCount,
@@ -343,7 +343,6 @@ func (s *Service) updateTotalStats(ctx context.Context) bool {
metrics.StatsTotalAlertRules.Set(float64(statsResult.AlertRules))
metrics.StatsTotalRuleGroups.Set(float64(statsResult.RuleGroups))
metrics.StatsTotalLibraryPanels.Set(float64(statsResult.LibraryPanels))
metrics.StatsTotalLibraryVariables.Set(float64(statsResult.LibraryVariables))
metrics.StatsTotalDataKeys.With(prometheus.Labels{"active": "true"}).Set(float64(statsResult.ActiveDataKeys))
inactiveDataKeys := statsResult.DataKeys - statsResult.ActiveDataKeys