mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
instrumentation: these features have been enabled for a while (#81617)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
@@ -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 |
|
| `permissionsFilterRemoveSubquery` | Alternative permission filter implementation that does not use subqueries for fetching the dashboard folder |
|
||||||
| `angularDeprecationUI` | Display new Angular deprecation-related UI features |
|
| `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. |
|
| `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 |
|
| `libraryPanelRBAC` | Enables RBAC support for library panels |
|
||||||
| `wargamesTesting` | Placeholder feature flag for internal testing |
|
| `wargamesTesting` | Placeholder feature flag for internal testing |
|
||||||
| `externalCorePlugins` | Allow core plugins to be loaded as external |
|
| `externalCorePlugins` | Allow core plugins to be loaded as external |
|
||||||
| `pluginsAPIMetrics` | Sends metrics of public grafana packages usage by plugins |
|
| `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 |
|
| `idForwarding` | Generate signed id token for identity that can be forwarded to plugins and external services |
|
||||||
| `panelMonitoring` | Enables panel monitoring through logs and measurements |
|
| `panelMonitoring` | Enables panel monitoring through logs and measurements |
|
||||||
| `enableNativeHTTPHistogram` | Enables native HTTP Histograms |
|
| `enableNativeHTTPHistogram` | Enables native HTTP Histograms |
|
||||||
|
@@ -114,14 +114,12 @@ export interface FeatureToggles {
|
|||||||
dashgpt?: boolean;
|
dashgpt?: boolean;
|
||||||
reportingRetries?: boolean;
|
reportingRetries?: boolean;
|
||||||
sseGroupByDatasource?: boolean;
|
sseGroupByDatasource?: boolean;
|
||||||
requestInstrumentationStatusSource?: boolean;
|
|
||||||
libraryPanelRBAC?: boolean;
|
libraryPanelRBAC?: boolean;
|
||||||
lokiRunQueriesInParallel?: boolean;
|
lokiRunQueriesInParallel?: boolean;
|
||||||
wargamesTesting?: boolean;
|
wargamesTesting?: boolean;
|
||||||
alertingInsights?: boolean;
|
alertingInsights?: boolean;
|
||||||
externalCorePlugins?: boolean;
|
externalCorePlugins?: boolean;
|
||||||
pluginsAPIMetrics?: boolean;
|
pluginsAPIMetrics?: boolean;
|
||||||
httpSLOLevels?: boolean;
|
|
||||||
idForwarding?: boolean;
|
idForwarding?: boolean;
|
||||||
cloudWatchWildCardDimensionValues?: boolean;
|
cloudWatchWildCardDimensionValues?: boolean;
|
||||||
externalServiceAccounts?: boolean;
|
externalServiceAccounts?: boolean;
|
||||||
|
@@ -128,10 +128,8 @@ func (l *loggerImpl) prepareLogParams(c *contextmodel.ReqContext, duration time.
|
|||||||
logParams = append(logParams, "handler", handler)
|
logParams = append(logParams, "handler", handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
if l.flags.IsEnabled(r.Context(), featuremgmt.FlagRequestInstrumentationStatusSource) {
|
|
||||||
rmd := requestmeta.GetRequestMetaData(c.Req.Context())
|
rmd := requestmeta.GetRequestMetaData(c.Req.Context())
|
||||||
logParams = append(logParams, "status_source", rmd.StatusSource)
|
logParams = append(logParams, "status_source", rmd.StatusSource)
|
||||||
}
|
|
||||||
|
|
||||||
logParams = append(logParams, errorLogParams(c.Error)...)
|
logParams = append(logParams, errorLogParams(c.Error)...)
|
||||||
|
|
||||||
|
@@ -35,20 +35,12 @@ func RequestMetrics(features featuremgmt.FeatureToggles, cfg *setting.Cfg, promR
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
histogramLabels := []string{"handler", "status_code", "method"}
|
histogramLabels := []string{"handler", "status_code", "method", "status_source", "slo_group"}
|
||||||
|
|
||||||
if features.IsEnabledGlobally(featuremgmt.FlagRequestInstrumentationStatusSource) {
|
|
||||||
histogramLabels = append(histogramLabels, "status_source")
|
|
||||||
}
|
|
||||||
|
|
||||||
if cfg.MetricsIncludeTeamLabel {
|
if cfg.MetricsIncludeTeamLabel {
|
||||||
histogramLabels = append(histogramLabels, "grafana_team")
|
histogramLabels = append(histogramLabels, "grafana_team")
|
||||||
}
|
}
|
||||||
|
|
||||||
if features.IsEnabledGlobally(featuremgmt.FlagHttpSLOLevels) {
|
|
||||||
histogramLabels = append(histogramLabels, "slo_group")
|
|
||||||
}
|
|
||||||
|
|
||||||
histogramOptions := prometheus.HistogramOpts{
|
histogramOptions := prometheus.HistogramOpts{
|
||||||
Namespace: "grafana",
|
Namespace: "grafana",
|
||||||
Name: "http_request_duration_seconds",
|
Name: "http_request_duration_seconds",
|
||||||
@@ -104,18 +96,12 @@ func RequestMetrics(features featuremgmt.FeatureToggles, cfg *setting.Cfg, promR
|
|||||||
labelValues := []string{handler, code, r.Method}
|
labelValues := []string{handler, code, r.Method}
|
||||||
rmd := requestmeta.GetRequestMetaData(r.Context())
|
rmd := requestmeta.GetRequestMetaData(r.Context())
|
||||||
|
|
||||||
if features.IsEnabled(r.Context(), featuremgmt.FlagRequestInstrumentationStatusSource) {
|
labelValues = append(labelValues, string(rmd.StatusSource), string(rmd.SLOGroup))
|
||||||
labelValues = append(labelValues, string(rmd.StatusSource))
|
|
||||||
}
|
|
||||||
|
|
||||||
if cfg.MetricsIncludeTeamLabel {
|
if cfg.MetricsIncludeTeamLabel {
|
||||||
labelValues = append(labelValues, rmd.Team)
|
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
|
// avoiding the sanitize functions for in the new instrumentation
|
||||||
// since they dont make much sense. We should remove them later.
|
// since they dont make much sense. We should remove them later.
|
||||||
histogram := httpRequestDurationHistogram.
|
histogram := httpRequestDurationHistogram.
|
||||||
|
@@ -818,14 +818,6 @@ var (
|
|||||||
Owner: grafanaObservabilityMetricsSquad,
|
Owner: grafanaObservabilityMetricsSquad,
|
||||||
Created: time.Date(2023, time.September, 7, 12, 0, 0, 0, time.UTC),
|
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",
|
Name: "libraryPanelRBAC",
|
||||||
Description: "Enables RBAC support for library panels",
|
Description: "Enables RBAC support for library panels",
|
||||||
@@ -877,15 +869,6 @@ var (
|
|||||||
Owner: grafanaPluginsPlatformSquad,
|
Owner: grafanaPluginsPlatformSquad,
|
||||||
Created: time.Date(2023, time.September, 21, 12, 0, 0, 0, time.UTC),
|
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",
|
Name: "idForwarding",
|
||||||
Description: "Generate signed id token for identity that can be forwarded to plugins and external services",
|
Description: "Generate signed id token for identity that can be forwarded to plugins and external services",
|
||||||
|
@@ -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
|
dashgpt,preview,@grafana/dashboards-squad,2023-11-17,false,false,true
|
||||||
reportingRetries,preview,@grafana/sharing-squad,2023-08-31,false,true,false
|
reportingRetries,preview,@grafana/sharing-squad,2023-08-31,false,true,false
|
||||||
sseGroupByDatasource,experimental,@grafana/observability-metrics,2023-09-07,false,false,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
|
libraryPanelRBAC,experimental,@grafana/dashboards-squad,2023-10-11,false,true,false
|
||||||
lokiRunQueriesInParallel,privatePreview,@grafana/observability-logs,2023-09-19,false,false,false
|
lokiRunQueriesInParallel,privatePreview,@grafana/observability-logs,2023-09-19,false,false,false
|
||||||
wargamesTesting,experimental,@grafana/hosted-grafana-team,2023-09-13,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
|
alertingInsights,GA,@grafana/alerting-squad,2023-09-14,false,false,true
|
||||||
externalCorePlugins,experimental,@grafana/plugins-platform-backend,2023-09-22,false,false,false
|
externalCorePlugins,experimental,@grafana/plugins-platform-backend,2023-09-22,false,false,false
|
||||||
pluginsAPIMetrics,experimental,@grafana/plugins-platform-backend,2023-09-21,false,false,true
|
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
|
idForwarding,experimental,@grafana/identity-access-team,2023-09-25,false,false,false
|
||||||
cloudWatchWildCardDimensionValues,GA,@grafana/aws-datasources,2023-09-27,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
|
externalServiceAccounts,preview,@grafana/identity-access-team,2023-09-28,false,false,false
|
||||||
|
|
@@ -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.
|
// 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"
|
FlagSseGroupByDatasource = "sseGroupByDatasource"
|
||||||
|
|
||||||
// FlagRequestInstrumentationStatusSource
|
|
||||||
// Include a status source label for request metrics and logs
|
|
||||||
FlagRequestInstrumentationStatusSource = "requestInstrumentationStatusSource"
|
|
||||||
|
|
||||||
// FlagLibraryPanelRBAC
|
// FlagLibraryPanelRBAC
|
||||||
// Enables RBAC support for library panels
|
// Enables RBAC support for library panels
|
||||||
FlagLibraryPanelRBAC = "libraryPanelRBAC"
|
FlagLibraryPanelRBAC = "libraryPanelRBAC"
|
||||||
@@ -419,10 +415,6 @@ const (
|
|||||||
// Sends metrics of public grafana packages usage by plugins
|
// Sends metrics of public grafana packages usage by plugins
|
||||||
FlagPluginsAPIMetrics = "pluginsAPIMetrics"
|
FlagPluginsAPIMetrics = "pluginsAPIMetrics"
|
||||||
|
|
||||||
// FlagHttpSLOLevels
|
|
||||||
// Adds SLO level to http request metrics
|
|
||||||
FlagHttpSLOLevels = "httpSLOLevels"
|
|
||||||
|
|
||||||
// FlagIdForwarding
|
// FlagIdForwarding
|
||||||
// Generate signed id token for identity that can be forwarded to plugins and external services
|
// Generate signed id token for identity that can be forwarded to plugins and external services
|
||||||
FlagIdForwarding = "idForwarding"
|
FlagIdForwarding = "idForwarding"
|
||||||
|
Reference in New Issue
Block a user