instrumentation: these features have been enabled for a while (#81617)

Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
Carl Bergquist 2024-02-06 09:29:41 +01:00 committed by GitHub
parent bd48c06f95
commit c9de794d7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 4 additions and 51 deletions

View File

@ -140,12 +140,10 @@ Experimental features might be changed or removed without prior notice.
| `permissionsFilterRemoveSubquery` | Alternative permission filter implementation that does not use subqueries for fetching the dashboard folder |
| `angularDeprecationUI` | Display new Angular deprecation-related UI features |
| `sseGroupByDatasource` | Send query to the same datasource in a single request when using server side expressions. The `cloudWatchBatchQueries` feature toggle should be enabled if this used with CloudWatch. |
| `requestInstrumentationStatusSource` | Include a status source label for request metrics and logs |
| `libraryPanelRBAC` | Enables RBAC support for library panels |
| `wargamesTesting` | Placeholder feature flag for internal testing |
| `externalCorePlugins` | Allow core plugins to be loaded as external |
| `pluginsAPIMetrics` | Sends metrics of public grafana packages usage by plugins |
| `httpSLOLevels` | Adds SLO level to http request metrics |
| `idForwarding` | Generate signed id token for identity that can be forwarded to plugins and external services |
| `panelMonitoring` | Enables panel monitoring through logs and measurements |
| `enableNativeHTTPHistogram` | Enables native HTTP Histograms |

View File

@ -114,14 +114,12 @@ export interface FeatureToggles {
dashgpt?: boolean;
reportingRetries?: boolean;
sseGroupByDatasource?: boolean;
requestInstrumentationStatusSource?: boolean;
libraryPanelRBAC?: boolean;
lokiRunQueriesInParallel?: boolean;
wargamesTesting?: boolean;
alertingInsights?: boolean;
externalCorePlugins?: boolean;
pluginsAPIMetrics?: boolean;
httpSLOLevels?: boolean;
idForwarding?: boolean;
cloudWatchWildCardDimensionValues?: boolean;
externalServiceAccounts?: boolean;

View File

@ -128,10 +128,8 @@ func (l *loggerImpl) prepareLogParams(c *contextmodel.ReqContext, duration time.
logParams = append(logParams, "handler", handler)
}
if l.flags.IsEnabled(r.Context(), featuremgmt.FlagRequestInstrumentationStatusSource) {
rmd := requestmeta.GetRequestMetaData(c.Req.Context())
logParams = append(logParams, "status_source", rmd.StatusSource)
}
rmd := requestmeta.GetRequestMetaData(c.Req.Context())
logParams = append(logParams, "status_source", rmd.StatusSource)
logParams = append(logParams, errorLogParams(c.Error)...)

View File

@ -35,20 +35,12 @@ func RequestMetrics(features featuremgmt.FeatureToggles, cfg *setting.Cfg, promR
},
)
histogramLabels := []string{"handler", "status_code", "method"}
if features.IsEnabledGlobally(featuremgmt.FlagRequestInstrumentationStatusSource) {
histogramLabels = append(histogramLabels, "status_source")
}
histogramLabels := []string{"handler", "status_code", "method", "status_source", "slo_group"}
if cfg.MetricsIncludeTeamLabel {
histogramLabels = append(histogramLabels, "grafana_team")
}
if features.IsEnabledGlobally(featuremgmt.FlagHttpSLOLevels) {
histogramLabels = append(histogramLabels, "slo_group")
}
histogramOptions := prometheus.HistogramOpts{
Namespace: "grafana",
Name: "http_request_duration_seconds",
@ -104,18 +96,12 @@ func RequestMetrics(features featuremgmt.FeatureToggles, cfg *setting.Cfg, promR
labelValues := []string{handler, code, r.Method}
rmd := requestmeta.GetRequestMetaData(r.Context())
if features.IsEnabled(r.Context(), featuremgmt.FlagRequestInstrumentationStatusSource) {
labelValues = append(labelValues, string(rmd.StatusSource))
}
labelValues = append(labelValues, string(rmd.StatusSource), string(rmd.SLOGroup))
if cfg.MetricsIncludeTeamLabel {
labelValues = append(labelValues, rmd.Team)
}
if features.IsEnabled(r.Context(), featuremgmt.FlagHttpSLOLevels) {
labelValues = append(labelValues, string(rmd.SLOGroup))
}
// avoiding the sanitize functions for in the new instrumentation
// since they dont make much sense. We should remove them later.
histogram := httpRequestDurationHistogram.

View File

@ -818,14 +818,6 @@ var (
Owner: grafanaObservabilityMetricsSquad,
Created: time.Date(2023, time.September, 7, 12, 0, 0, 0, time.UTC),
},
{
Name: "requestInstrumentationStatusSource",
Description: "Include a status source label for request metrics and logs",
Stage: FeatureStageExperimental,
FrontendOnly: false,
Owner: grafanaPluginsPlatformSquad,
Created: time.Date(2023, time.September, 11, 12, 0, 0, 0, time.UTC),
},
{
Name: "libraryPanelRBAC",
Description: "Enables RBAC support for library panels",
@ -877,15 +869,6 @@ var (
Owner: grafanaPluginsPlatformSquad,
Created: time.Date(2023, time.September, 21, 12, 0, 0, 0, time.UTC),
},
{
Name: "httpSLOLevels",
Description: "Adds SLO level to http request metrics",
Stage: FeatureStageExperimental,
FrontendOnly: false,
Owner: hostedGrafanaTeam,
RequiresRestart: true,
Created: time.Date(2023, time.September, 22, 12, 0, 0, 0, time.UTC),
},
{
Name: "idForwarding",
Description: "Generate signed id token for identity that can be forwarded to plugins and external services",

View File

@ -95,14 +95,12 @@ angularDeprecationUI,experimental,@grafana/plugins-platform-backend,2023-08-29,f
dashgpt,preview,@grafana/dashboards-squad,2023-11-17,false,false,true
reportingRetries,preview,@grafana/sharing-squad,2023-08-31,false,true,false
sseGroupByDatasource,experimental,@grafana/observability-metrics,2023-09-07,false,false,false
requestInstrumentationStatusSource,experimental,@grafana/plugins-platform-backend,2023-09-11,false,false,false
libraryPanelRBAC,experimental,@grafana/dashboards-squad,2023-10-11,false,true,false
lokiRunQueriesInParallel,privatePreview,@grafana/observability-logs,2023-09-19,false,false,false
wargamesTesting,experimental,@grafana/hosted-grafana-team,2023-09-13,false,false,false
alertingInsights,GA,@grafana/alerting-squad,2023-09-14,false,false,true
externalCorePlugins,experimental,@grafana/plugins-platform-backend,2023-09-22,false,false,false
pluginsAPIMetrics,experimental,@grafana/plugins-platform-backend,2023-09-21,false,false,true
httpSLOLevels,experimental,@grafana/hosted-grafana-team,2023-09-22,false,true,false
idForwarding,experimental,@grafana/identity-access-team,2023-09-25,false,false,false
cloudWatchWildCardDimensionValues,GA,@grafana/aws-datasources,2023-09-27,false,false,false
externalServiceAccounts,preview,@grafana/identity-access-team,2023-09-28,false,false,false

1 Name Stage Owner Created requiresDevMode RequiresRestart FrontendOnly
95 dashgpt preview @grafana/dashboards-squad 2023-11-17 false false true
96 reportingRetries preview @grafana/sharing-squad 2023-08-31 false true false
97 sseGroupByDatasource experimental @grafana/observability-metrics 2023-09-07 false false false
requestInstrumentationStatusSource experimental @grafana/plugins-platform-backend 2023-09-11 false false false
98 libraryPanelRBAC experimental @grafana/dashboards-squad 2023-10-11 false true false
99 lokiRunQueriesInParallel privatePreview @grafana/observability-logs 2023-09-19 false false false
100 wargamesTesting experimental @grafana/hosted-grafana-team 2023-09-13 false false false
101 alertingInsights GA @grafana/alerting-squad 2023-09-14 false false true
102 externalCorePlugins experimental @grafana/plugins-platform-backend 2023-09-22 false false false
103 pluginsAPIMetrics experimental @grafana/plugins-platform-backend 2023-09-21 false false true
httpSLOLevels experimental @grafana/hosted-grafana-team 2023-09-22 false true false
104 idForwarding experimental @grafana/identity-access-team 2023-09-25 false false false
105 cloudWatchWildCardDimensionValues GA @grafana/aws-datasources 2023-09-27 false false false
106 externalServiceAccounts preview @grafana/identity-access-team 2023-09-28 false false false

View File

@ -391,10 +391,6 @@ const (
// Send query to the same datasource in a single request when using server side expressions. The `cloudWatchBatchQueries` feature toggle should be enabled if this used with CloudWatch.
FlagSseGroupByDatasource = "sseGroupByDatasource"
// FlagRequestInstrumentationStatusSource
// Include a status source label for request metrics and logs
FlagRequestInstrumentationStatusSource = "requestInstrumentationStatusSource"
// FlagLibraryPanelRBAC
// Enables RBAC support for library panels
FlagLibraryPanelRBAC = "libraryPanelRBAC"
@ -419,10 +415,6 @@ const (
// Sends metrics of public grafana packages usage by plugins
FlagPluginsAPIMetrics = "pluginsAPIMetrics"
// FlagHttpSLOLevels
// Adds SLO level to http request metrics
FlagHttpSLOLevels = "httpSLOLevels"
// FlagIdForwarding
// Generate signed id token for identity that can be forwarded to plugins and external services
FlagIdForwarding = "idForwarding"