Notifications: Enable display of trace ID by default (#64884)

enable tracing by default
This commit is contained in:
Ashley Harrison 2023-03-21 09:35:21 +00:00 committed by GitHub
parent 41b0c17aae
commit 9ca01cc070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 2 additions and 21 deletions

View File

@ -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 |

View File

@ -37,7 +37,6 @@ export interface FeatureToggles {
storage?: boolean;
k8s?: boolean;
exploreMixedDatasource?: boolean;
tracing?: boolean;
newTraceView?: boolean;
correlations?: boolean;
cloudWatchDynamicLabels?: boolean;

View File

@ -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",

View File

@ -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

1 Name State Owner requiresDevMode RequiresLicense RequiresRestart FrontendOnly
18 storage alpha @grafana/grafana-app-platform-squad false false false false
19 k8s alpha @grafana/grafana-app-platform-squad true false false false
20 exploreMixedDatasource alpha @grafana/explore-squad false false false true
tracing alpha @grafana/user-essentials false false false true
21 newTraceView alpha @grafana/observability-traces-and-profiling false false false true
22 correlations alpha @grafana/explore-squad false false false false
23 cloudWatchDynamicLabels stable @grafana/aws-plugins false false false false

View File

@ -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"

View File

@ -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 (
<Alert
severity={appNotification.severity}
@ -32,7 +29,7 @@ export default function AppNotificationItem({ appNotification, onClearNotificati
>
<div className={styles.wrapper}>
<span>{appNotification.component || appNotification.text}</span>
{showTraceId && <span className={styles.trace}>Trace ID: {appNotification.traceId}</span>}
{appNotification.traceId && <span className={styles.trace}>Trace ID: {appNotification.traceId}</span>}
</div>
</Alert>
);

View File

@ -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 (
<Card className={className} onClick={onClick}>
@ -41,7 +39,7 @@ export const StoredNotificationItem = ({
<Checkbox onChange={onClick} tabIndex={-1} value={isSelected} />
</Card.Figure>
<Card.Tags className={styles.trace}>
{showTraceId && <span>{`Trace ID: ${traceId}`}</span>}
{traceId && <span>{`Trace ID: ${traceId}`}</span>}
{timestamp && formatDistanceToNow(timestamp, { addSuffix: true })}
</Card.Tags>
</Card>