mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Tempo: Remove profiling toggles (#80792)
* Remove traceToProfiles toggle * Remove tracesEmbeddedFlameGraph toggle * Remove superfluous import * Update ConfigDescriptionLink * Update getting of profiles from standalone build PR
This commit is contained in:
parent
0df63e7375
commit
f3c64a7337
@ -117,8 +117,6 @@ You can navigate from a span in a trace view directly to metrics relevant for th
|
||||
|
||||
### Trace to profiles
|
||||
|
||||
{{< docs/experimental product="Trace to profiles" featureFlag="traceToProfiles" >}}
|
||||
|
||||
Using Trace to profiles, you can use Grafana’s ability to correlate different signals by adding the functionality to link between traces and profiles.
|
||||
Refer to the [relevant documentation](/docs/grafana/latest/datasources/tempo/configure-tempo-data-source#trace-to-profiles) for configuration instructions.
|
||||
|
||||
|
@ -137,8 +137,6 @@ Experimental features might be changed or removed without prior notice.
|
||||
| `traceQLStreaming` | Enables response streaming of TraceQL queries of the Tempo data source |
|
||||
| `metricsSummary` | Enables metrics summary queries in the Tempo data source |
|
||||
| `featureToggleAdminPage` | Enable admin page for managing feature toggles from the Grafana front-end |
|
||||
| `traceToProfiles` | Enables linking between traces and profiles |
|
||||
| `tracesEmbeddedFlameGraph` | Enables embedding a flame graph in traces |
|
||||
| `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. |
|
||||
|
@ -16,8 +16,6 @@ labels:
|
||||
|
||||
<!-- # Trace to profiles -->
|
||||
|
||||
{{< docs/experimental product="Trace to profiles" featureFlag="traceToProfiles" >}}
|
||||
|
||||
Using Trace to profiles, you can use Grafana’s ability to correlate different signals by adding the functionality to link between traces and profiles.
|
||||
|
||||
**Trace to profiles** lets you link your Grafana Pyroscope data source to tracing data.
|
||||
|
@ -108,8 +108,6 @@ export interface FeatureToggles {
|
||||
featureToggleAdminPage?: boolean;
|
||||
awsAsyncQueryCaching?: boolean;
|
||||
splitScopes?: boolean;
|
||||
traceToProfiles?: boolean;
|
||||
tracesEmbeddedFlameGraph?: boolean;
|
||||
permissionsFilterRemoveSubquery?: boolean;
|
||||
prometheusConfigOverhaulAuth?: boolean;
|
||||
configurableSchedulerTick?: boolean;
|
||||
|
@ -769,22 +769,6 @@ var (
|
||||
HideFromAdminPage: true, // This is internal work to speed up dashboard search, and is not ready for wider use
|
||||
Created: time.Date(2023, time.July, 21, 12, 0, 0, 0, time.UTC),
|
||||
},
|
||||
{
|
||||
Name: "traceToProfiles",
|
||||
Description: "Enables linking between traces and profiles",
|
||||
Stage: FeatureStageExperimental,
|
||||
FrontendOnly: true,
|
||||
Owner: grafanaObservabilityTracesAndProfilingSquad,
|
||||
Created: time.Date(2023, time.November, 1, 12, 0, 0, 0, time.UTC),
|
||||
},
|
||||
{
|
||||
Name: "tracesEmbeddedFlameGraph",
|
||||
Description: "Enables embedding a flame graph in traces",
|
||||
Stage: FeatureStageExperimental,
|
||||
FrontendOnly: true,
|
||||
Owner: grafanaObservabilityTracesAndProfilingSquad,
|
||||
Created: time.Date(2023, time.November, 2, 12, 0, 0, 0, time.UTC),
|
||||
},
|
||||
{
|
||||
Name: "permissionsFilterRemoveSubquery",
|
||||
Description: "Alternative permission filter implementation that does not use subqueries for fetching the dashboard folder",
|
||||
|
@ -89,8 +89,6 @@ grafanaAPIServerEnsureKubectlAccess,experimental,@grafana/grafana-app-platform-s
|
||||
featureToggleAdminPage,experimental,@grafana/grafana-operator-experience-squad,2023-07-18,false,false,true,false
|
||||
awsAsyncQueryCaching,GA,@grafana/aws-datasources,2023-07-21,false,false,false,false
|
||||
splitScopes,GA,@grafana/identity-access-team,2023-07-21,false,false,true,false
|
||||
traceToProfiles,experimental,@grafana/observability-traces-and-profiling,2023-11-01,false,false,false,true
|
||||
tracesEmbeddedFlameGraph,experimental,@grafana/observability-traces-and-profiling,2023-11-02,false,false,false,true
|
||||
permissionsFilterRemoveSubquery,experimental,@grafana/backend-platform,2023-08-02,false,false,false,false
|
||||
prometheusConfigOverhaulAuth,GA,@grafana/observability-metrics,2023-07-21,false,false,false,false
|
||||
configurableSchedulerTick,experimental,@grafana/alerting-squad,2023-07-26,false,false,true,false
|
||||
|
|
@ -367,14 +367,6 @@ const (
|
||||
// Support faster dashboard and folder search by splitting permission scopes into parts
|
||||
FlagSplitScopes = "splitScopes"
|
||||
|
||||
// FlagTraceToProfiles
|
||||
// Enables linking between traces and profiles
|
||||
FlagTraceToProfiles = "traceToProfiles"
|
||||
|
||||
// FlagTracesEmbeddedFlameGraph
|
||||
// Enables embedding a flame graph in traces
|
||||
FlagTracesEmbeddedFlameGraph = "tracesEmbeddedFlameGraph"
|
||||
|
||||
// FlagPermissionsFilterRemoveSubquery
|
||||
// Alternative permission filter implementation that does not use subqueries for fetching the dashboard folder
|
||||
FlagPermissionsFilterRemoveSubquery = "permissionsFilterRemoveSubquery"
|
||||
|
@ -145,7 +145,7 @@ export default function SpanFlameGraph(props: SpanFlameGraphProps) {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (config.featureToggles.traceToProfiles && !Object.keys(traceFlameGraphs).includes(profileTagValue)) {
|
||||
if (!Object.keys(traceFlameGraphs).includes(profileTagValue)) {
|
||||
let profilesDataSourceSettings: DataSourceInstanceSettings<DataSourceJsonData> | undefined;
|
||||
if (traceToProfilesOptions && traceToProfilesOptions?.datasourceUid) {
|
||||
profilesDataSourceSettings = getDatasourceSrv().getInstanceSettings(traceToProfilesOptions.datasourceUid);
|
||||
|
@ -20,7 +20,7 @@ import React from 'react';
|
||||
|
||||
import { createDataFrame, DataSourceInstanceSettings } from '@grafana/data';
|
||||
import { data } from '@grafana/flamegraph';
|
||||
import { config, DataSourceSrv, setDataSourceSrv } from '@grafana/runtime';
|
||||
import { DataSourceSrv, setDataSourceSrv } from '@grafana/runtime';
|
||||
|
||||
import { pyroscopeProfileIdTagKey } from '../../../createSpanLink';
|
||||
import traceGenerator from '../../demo/trace-generators';
|
||||
@ -242,8 +242,6 @@ describe('<SpanDetail>', () => {
|
||||
});
|
||||
|
||||
it('renders the flame graph', async () => {
|
||||
config.featureToggles.tracesEmbeddedFlameGraph = true;
|
||||
|
||||
render(<SpanDetail {...(props as unknown as SpanDetailProps)} />);
|
||||
await act(async () => {
|
||||
expect(screen.getByText(/16.5 Bil/)).toBeInTheDocument();
|
||||
|
@ -397,19 +397,18 @@ export default function SpanDetail(props: SpanDetailProps) {
|
||||
createFocusSpanLink={createFocusSpanLink}
|
||||
/>
|
||||
)}
|
||||
{config.featureToggles.tracesEmbeddedFlameGraph &&
|
||||
span.tags.some((tag) => tag.key === pyroscopeProfileIdTagKey) && (
|
||||
<SpanFlameGraph
|
||||
span={span}
|
||||
timeZone={timeZone}
|
||||
traceFlameGraphs={traceFlameGraphs}
|
||||
setTraceFlameGraphs={setTraceFlameGraphs}
|
||||
traceToProfilesOptions={traceToProfilesOptions}
|
||||
setRedrawListView={setRedrawListView}
|
||||
traceDuration={traceDuration}
|
||||
traceName={traceName}
|
||||
/>
|
||||
)}
|
||||
{span.tags.some((tag) => tag.key === pyroscopeProfileIdTagKey) && (
|
||||
<SpanFlameGraph
|
||||
span={span}
|
||||
timeZone={timeZone}
|
||||
traceFlameGraphs={traceFlameGraphs}
|
||||
setTraceFlameGraphs={setTraceFlameGraphs}
|
||||
traceToProfilesOptions={traceToProfilesOptions}
|
||||
setRedrawListView={setRedrawListView}
|
||||
traceDuration={traceDuration}
|
||||
traceName={traceName}
|
||||
/>
|
||||
)}
|
||||
<small className={styles.debugInfo}>
|
||||
{/* TODO: fix keyboard a11y */}
|
||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
|
||||
|
@ -8,7 +8,7 @@ import {
|
||||
DataFrame,
|
||||
} from '@grafana/data';
|
||||
import { TraceToLogsOptionsV2, TraceToMetricsOptions } from '@grafana/o11y-ds-frontend';
|
||||
import { config, DataSourceSrv, setDataSourceSrv, setTemplateSrv } from '@grafana/runtime';
|
||||
import { DataSourceSrv, setDataSourceSrv, setTemplateSrv } from '@grafana/runtime';
|
||||
import { DatasourceSrv } from 'app/features/plugins/datasource_srv';
|
||||
|
||||
import { LinkSrv, setLinkSrv } from '../../panel/panellinks/link_srv';
|
||||
@ -1280,7 +1280,6 @@ describe('createSpanLinkFactory', () => {
|
||||
|
||||
setLinkSrv(new LinkSrv());
|
||||
setTemplateSrv(new TemplateSrv());
|
||||
config.featureToggles.traceToProfiles = true;
|
||||
});
|
||||
|
||||
it('with default keys when tags not configured', () => {
|
||||
|
@ -2,7 +2,6 @@ import { css } from '@emotion/css';
|
||||
import React from 'react';
|
||||
|
||||
import { CoreApp, GrafanaTheme2, SelectableValue } from '@grafana/data';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { useStyles2, RadioButtonGroup, MultiSelect, Input } from '@grafana/ui';
|
||||
|
||||
import { Query } from '../types';
|
||||
@ -87,21 +86,19 @@ export function QueryOptions({ query, onQueryChange, app, labels }: Props) {
|
||||
}}
|
||||
/>
|
||||
</EditorField>
|
||||
{config.featureToggles.traceToProfiles && (
|
||||
<EditorField label={'Span ID'} tooltip={<>Sets the span ID from which to search for profiles.</>}>
|
||||
<Input
|
||||
value={query.spanSelector || ['']}
|
||||
type="string"
|
||||
placeholder="64f170a95f537095"
|
||||
onChange={(event: React.SyntheticEvent<HTMLInputElement>) => {
|
||||
onQueryChange({
|
||||
...query,
|
||||
spanSelector: event.currentTarget.value !== '' ? [event.currentTarget.value] : [],
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</EditorField>
|
||||
)}
|
||||
<EditorField label={'Span ID'} tooltip={<>Sets the span ID from which to search for profiles.</>}>
|
||||
<Input
|
||||
value={query.spanSelector || ['']}
|
||||
type="string"
|
||||
placeholder="64f170a95f537095"
|
||||
onChange={(event: React.SyntheticEvent<HTMLInputElement>) => {
|
||||
onQueryChange({
|
||||
...query,
|
||||
spanSelector: event.currentTarget.value !== '' ? [event.currentTarget.value] : [],
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</EditorField>
|
||||
<EditorField label={'Max Nodes'} tooltip={<>Sets the maximum number of nodes to return in the flamegraph.</>}>
|
||||
<Input
|
||||
value={query.maxNodes || ''}
|
||||
|
@ -59,12 +59,9 @@ export const ConfigEditor = ({ options, onOptionsChange }: Props) => {
|
||||
</>
|
||||
) : null}
|
||||
|
||||
{config.featureToggles.traceToProfiles && (
|
||||
<>
|
||||
<TraceToProfilesSection options={options} onOptionsChange={onOptionsChange} />
|
||||
<Divider spacing={4} />
|
||||
</>
|
||||
)}
|
||||
<TraceToProfilesSection options={options} onOptionsChange={onOptionsChange} />
|
||||
<Divider spacing={4} />
|
||||
|
||||
<ConfigSection
|
||||
title="Additional settings"
|
||||
description="Additional settings are optional settings that can be configured for more control over your data source."
|
||||
|
@ -24,7 +24,7 @@ import {
|
||||
DataLinkConfigOrigin,
|
||||
} from '@grafana/data';
|
||||
import { TraceToProfilesData } from '@grafana/o11y-ds-frontend';
|
||||
import { config, getDataSourceSrv } from '@grafana/runtime';
|
||||
import { getDataSourceSrv } from '@grafana/runtime';
|
||||
|
||||
import { SearchTableType } from './dataquery.gen';
|
||||
import { createGraphFrames } from './graphTransform';
|
||||
@ -511,40 +511,38 @@ export function transformTrace(
|
||||
}
|
||||
|
||||
// Get profiles links
|
||||
if (config.featureToggles.traceToProfiles) {
|
||||
const traceToProfilesData: TraceToProfilesData | undefined = instanceSettings?.jsonData;
|
||||
const traceToProfilesOptions = traceToProfilesData?.tracesToProfiles;
|
||||
let profilesDataSourceSettings: DataSourceInstanceSettings<DataSourceJsonData> | undefined;
|
||||
if (traceToProfilesOptions?.datasourceUid) {
|
||||
profilesDataSourceSettings = getDataSourceSrv().getInstanceSettings(traceToProfilesOptions.datasourceUid);
|
||||
}
|
||||
const traceToProfilesData: TraceToProfilesData | undefined = instanceSettings?.jsonData;
|
||||
const traceToProfilesOptions = traceToProfilesData?.tracesToProfiles;
|
||||
let profilesDataSourceSettings: DataSourceInstanceSettings<DataSourceJsonData> | undefined;
|
||||
if (traceToProfilesOptions?.datasourceUid) {
|
||||
profilesDataSourceSettings = getDataSourceSrv().getInstanceSettings(traceToProfilesOptions.datasourceUid);
|
||||
}
|
||||
|
||||
if (traceToProfilesOptions && profilesDataSourceSettings) {
|
||||
const customQuery = traceToProfilesOptions.customQuery ? traceToProfilesOptions.query : undefined;
|
||||
const dataLink: DataLink = {
|
||||
title: RelatedProfilesTitle,
|
||||
url: '',
|
||||
internal: {
|
||||
datasourceUid: profilesDataSourceSettings.uid,
|
||||
datasourceName: profilesDataSourceSettings.name,
|
||||
query: {
|
||||
labelSelector: customQuery ? customQuery : '{${__tags}}',
|
||||
groupBy: [],
|
||||
profileTypeId: traceToProfilesOptions.profileTypeId ?? '',
|
||||
queryType: 'profile',
|
||||
spanSelector: ['${__span.tags["pyroscope.profile.id"]}'],
|
||||
refId: 'profile',
|
||||
},
|
||||
if (traceToProfilesOptions && profilesDataSourceSettings) {
|
||||
const customQuery = traceToProfilesOptions.customQuery ? traceToProfilesOptions.query : undefined;
|
||||
const dataLink: DataLink = {
|
||||
title: RelatedProfilesTitle,
|
||||
url: '',
|
||||
internal: {
|
||||
datasourceUid: profilesDataSourceSettings.uid,
|
||||
datasourceName: profilesDataSourceSettings.name,
|
||||
query: {
|
||||
labelSelector: customQuery ? customQuery : '{${__tags}}',
|
||||
groupBy: [],
|
||||
profileTypeId: traceToProfilesOptions.profileTypeId ?? '',
|
||||
queryType: 'profile',
|
||||
spanSelector: ['${__span.tags["pyroscope.profile.id"]}'],
|
||||
refId: 'profile',
|
||||
},
|
||||
origin: DataLinkConfigOrigin.Datasource,
|
||||
};
|
||||
},
|
||||
origin: DataLinkConfigOrigin.Datasource,
|
||||
};
|
||||
|
||||
frame.fields.forEach((field: Field) => {
|
||||
if (field.name === 'tags') {
|
||||
field.config.links = [dataLink];
|
||||
}
|
||||
});
|
||||
}
|
||||
frame.fields.forEach((field: Field) => {
|
||||
if (field.name === 'tags') {
|
||||
field.config.links = [dataLink];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let data = [...response.data];
|
||||
|
Loading…
Reference in New Issue
Block a user