From 9ca01cc070e8b060aaef4bb1d322dd6bb0417575 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Tue, 21 Mar 2023 09:35:21 +0000 Subject: [PATCH] Notifications: Enable display of trace ID by default (#64884) enable tracing by default --- .../configure-grafana/feature-toggles/index.md | 1 - packages/grafana-data/src/types/featureToggles.gen.ts | 1 - pkg/services/featuremgmt/registry.go | 7 ------- pkg/services/featuremgmt/toggles_gen.csv | 1 - pkg/services/featuremgmt/toggles_gen.go | 4 ---- .../components/AppNotifications/AppNotificationItem.tsx | 5 +---- .../components/AppNotifications/StoredNotificationItem.tsx | 4 +--- 7 files changed, 2 insertions(+), 21 deletions(-) diff --git a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md index 332f15ca52f..881c1617099 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -64,7 +64,6 @@ Alpha features might be changed or removed without prior notice. | `lokiDataframeApi` | Use experimental loki api for WebSocket streaming (early prototype) | | `storage` | Configurable storage for dashboards, datasources, and resources | | `exploreMixedDatasource` | Enable mixed datasource in Explore | -| `tracing` | Adds trace ID to error notifications | | `newTraceView` | Shows the new trace view design | | `correlations` | Correlations page | | `datasourceQueryMultiStatus` | Introduce HTTP 207 Multi Status for api/ds/query | diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 2d05363b4ea..5032c1963b7 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -37,7 +37,6 @@ export interface FeatureToggles { storage?: boolean; k8s?: boolean; exploreMixedDatasource?: boolean; - tracing?: boolean; newTraceView?: boolean; correlations?: boolean; cloudWatchDynamicLabels?: boolean; diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index d04d8904abb..5d382a6004a 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -128,13 +128,6 @@ var ( FrontendOnly: true, Owner: grafanaExploreSquad, }, - { - Name: "tracing", - Description: "Adds trace ID to error notifications", - State: FeatureStateAlpha, - FrontendOnly: true, - Owner: grafanaUserEssentialsSquad, - }, { Name: "newTraceView", Description: "Shows the new trace view design", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index ccb495f672c..53f71e13a04 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -18,7 +18,6 @@ migrationLocking,beta,@grafana/backend-platform,false,false,false,false storage,alpha,@grafana/grafana-app-platform-squad,false,false,false,false k8s,alpha,@grafana/grafana-app-platform-squad,true,false,false,false exploreMixedDatasource,alpha,@grafana/explore-squad,false,false,false,true -tracing,alpha,@grafana/user-essentials,false,false,false,true newTraceView,alpha,@grafana/observability-traces-and-profiling,false,false,false,true correlations,alpha,@grafana/explore-squad,false,false,false,false cloudWatchDynamicLabels,stable,@grafana/aws-plugins,false,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 13353e43d82..e87054e5ead 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -83,10 +83,6 @@ const ( // Enable mixed datasource in Explore FlagExploreMixedDatasource = "exploreMixedDatasource" - // FlagTracing - // Adds trace ID to error notifications - FlagTracing = "tracing" - // FlagNewTraceView // Shows the new trace view design FlagNewTraceView = "newTraceView" diff --git a/public/app/core/components/AppNotifications/AppNotificationItem.tsx b/public/app/core/components/AppNotifications/AppNotificationItem.tsx index a02b1e2edb6..3ec1a2b59a2 100644 --- a/public/app/core/components/AppNotifications/AppNotificationItem.tsx +++ b/public/app/core/components/AppNotifications/AppNotificationItem.tsx @@ -3,7 +3,6 @@ import React from 'react'; import { useEffectOnce } from 'react-use'; import { GrafanaTheme2 } from '@grafana/data'; -import { config } from '@grafana/runtime'; import { Alert, useStyles2 } from '@grafana/ui'; import { AppNotification, timeoutMap } from 'app/types'; @@ -21,8 +20,6 @@ export default function AppNotificationItem({ appNotification, onClearNotificati }, timeoutMap[appNotification.severity]); }); - const showTraceId = config.featureToggles.tracing && appNotification.traceId; - return (
{appNotification.component || appNotification.text} - {showTraceId && Trace ID: {appNotification.traceId}} + {appNotification.traceId && Trace ID: {appNotification.traceId}}
); diff --git a/public/app/core/components/AppNotifications/StoredNotificationItem.tsx b/public/app/core/components/AppNotifications/StoredNotificationItem.tsx index 4817cdab242..3fa7325e27c 100644 --- a/public/app/core/components/AppNotifications/StoredNotificationItem.tsx +++ b/public/app/core/components/AppNotifications/StoredNotificationItem.tsx @@ -3,7 +3,6 @@ import { formatDistanceToNow } from 'date-fns'; import React, { ReactNode } from 'react'; import { GrafanaTheme2 } from '@grafana/data'; -import { config } from '@grafana/runtime'; import { Card, Checkbox, useTheme2 } from '@grafana/ui'; export type AlertVariant = 'success' | 'warning' | 'error' | 'info'; @@ -31,7 +30,6 @@ export const StoredNotificationItem = ({ }: Props) => { const theme = useTheme2(); const styles = getStyles(theme); - const showTraceId = config.featureToggles.tracing && traceId; return ( @@ -41,7 +39,7 @@ export const StoredNotificationItem = ({ - {showTraceId && {`Trace ID: ${traceId}`}} + {traceId && {`Trace ID: ${traceId}`}} {timestamp && formatDistanceToNow(timestamp, { addSuffix: true })}