From 2c82a6b6c4aab200ba561e702d4f77f9c14ff97a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Farkas?= Date: Thu, 20 Jul 2023 07:59:38 +0200 Subject: [PATCH] Traces: Enable showing trace ids (#71950) * traces: enable showing trace ids by default * removed unused imports --- .../configure-grafana/feature-toggles/index.md | 1 - packages/grafana-data/src/types/featureToggles.gen.ts | 1 - pkg/services/featuremgmt/registry.go | 6 ------ pkg/services/featuremgmt/toggles_gen.csv | 1 - pkg/services/featuremgmt/toggles_gen.go | 4 ---- public/app/features/inspector/InspectErrorTab.tsx | 3 +-- public/app/features/inspector/InspectStatsTab.tsx | 5 +---- public/app/features/query/components/QueryErrorAlert.tsx | 3 +-- 8 files changed, 3 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 b30d3b8826c..2357921caee 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -88,7 +88,6 @@ Experimental features might be changed or removed without prior notice. | `showDashboardValidationWarnings` | Show warnings when dashboards do not validate against the schema | | `mysqlAnsiQuotes` | Use double quotes to escape keyword in a MySQL query | | `nestedFolderPicker` | Enables the still in-development new folder picker to support nested folders | -| `showTraceId` | Show trace ids for requests | | `alertingBacktesting` | Rule backtesting API for alerting | | `editPanelCSVDragAndDrop` | Enables drag and drop for CSV and Excel files | | `lokiQuerySplitting` | Split large interval queries into subqueries with smaller time intervals | diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 6b45a31235e..3bff251e63a 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -55,7 +55,6 @@ export interface FeatureToggles { nestedFolders?: boolean; nestedFolderPicker?: boolean; accessTokenExpirationCheck?: boolean; - showTraceId?: boolean; emptyDashboardPage?: boolean; disablePrometheusExemplarSampling?: boolean; alertingBacktesting?: boolean; diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index 3ba9c130c30..fbc62f6fa21 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -251,12 +251,6 @@ var ( Stage: FeatureStageGeneralAvailability, Owner: grafanaAuthnzSquad, }, - { - Name: "showTraceId", - Description: "Show trace ids for requests", - Stage: FeatureStageExperimental, - Owner: grafanaObservabilityLogsSquad, - }, { Name: "emptyDashboardPage", Description: "Enable the redesigned user interface of a dashboard page that includes no panels", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 35378d04333..a4acd694438 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -36,7 +36,6 @@ accessControlOnCall,preview,@grafana/grafana-authnz-team,false,false,false,false nestedFolders,preview,@grafana/backend-platform,false,false,false,false nestedFolderPicker,experimental,@grafana/grafana-frontend-platform,false,false,false,false accessTokenExpirationCheck,GA,@grafana/grafana-authnz-team,false,false,false,false -showTraceId,experimental,@grafana/observability-logs,false,false,false,false emptyDashboardPage,GA,@grafana/dashboards-squad,false,false,false,true disablePrometheusExemplarSampling,GA,@grafana/observability-metrics,false,false,false,false alertingBacktesting,experimental,@grafana/alerting-squad,false,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 116d4fdc321..199ad9d50cb 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -155,10 +155,6 @@ const ( // Enable OAuth access_token expiration check and token refresh using the refresh_token FlagAccessTokenExpirationCheck = "accessTokenExpirationCheck" - // FlagShowTraceId - // Show trace ids for requests - FlagShowTraceId = "showTraceId" - // FlagEmptyDashboardPage // Enable the redesigned user interface of a dashboard page that includes no panels FlagEmptyDashboardPage = "emptyDashboardPage" diff --git a/public/app/features/inspector/InspectErrorTab.tsx b/public/app/features/inspector/InspectErrorTab.tsx index a93d1338b62..97d516aad9b 100644 --- a/public/app/features/inspector/InspectErrorTab.tsx +++ b/public/app/features/inspector/InspectErrorTab.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { DataQueryError } from '@grafana/data'; -import { config } from '@grafana/runtime'; import { Alert, JSONFormatter } from '@grafana/ui'; interface InspectErrorTabProps { @@ -37,7 +36,7 @@ function renderError(error: DataQueryError) { <> {error.status && <>Status: {error.status}. Message: } {msg} - {config.featureToggles.showTraceId && error.traceId != null && ( + {error.traceId != null && ( <>
(Trace ID: {error.traceId}) diff --git a/public/app/features/inspector/InspectStatsTab.tsx b/public/app/features/inspector/InspectStatsTab.tsx index c46bc2c8dbf..0e282d75335 100644 --- a/public/app/features/inspector/InspectStatsTab.tsx +++ b/public/app/features/inspector/InspectStatsTab.tsx @@ -3,7 +3,6 @@ import React from 'react'; import { PanelData, QueryResultMetaStat, TimeZone } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; -import { config } from '@grafana/runtime'; import { t } from 'app/core/internationalization'; import { InspectStatsTable } from './InspectStatsTable'; @@ -67,9 +66,7 @@ export const InspectStatsTab = ({ data, timeZone }: InspectStatsTabProps) => {
- {config.featureToggles.showTraceId && ( - - )} +
); }; diff --git a/public/app/features/query/components/QueryErrorAlert.tsx b/public/app/features/query/components/QueryErrorAlert.tsx index efe60c58312..2f08a794314 100644 --- a/public/app/features/query/components/QueryErrorAlert.tsx +++ b/public/app/features/query/components/QueryErrorAlert.tsx @@ -2,7 +2,6 @@ import { css } from '@emotion/css'; import React from 'react'; import { DataQueryError, GrafanaTheme2 } from '@grafana/data'; -import { config } from '@grafana/runtime'; import { Icon, useStyles2 } from '@grafana/ui'; export interface Props { @@ -21,7 +20,7 @@ export function QueryErrorAlert({ error }: Props) {
{message} - {config.featureToggles.showTraceId && error.traceId != null && ( + {error.traceId != null && ( <>
(Trace ID: {error.traceId})