Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<!-- main Start -->
# main (xx/xx/2024)

- **[FEATURE]**: add links from snapshots to traces [#31](https://github.com/intergral/deep/pull/31) [@Umaaz](https://github.com/Umaaz)

<!-- main END -->

<!-- 1.0.2 Start -->
# 1.0.2 (10/11/2023)

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"dependencies": {
"@emotion/css": "^11.11.2",
"@grafana/data": "10.2.2",
"@grafana/experimental": "^1.7.10",
"@grafana/runtime": "10.2.2",
"@grafana/ui": "10.2.2",
"prismjs": "^1.29.0",
Expand Down
28 changes: 25 additions & 3 deletions src/components/config/ExperimentalConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
import { InlineField, InlineFieldRow, InlineSwitch } from '@grafana/ui';
import React from 'react';
import { Props } from '../ConfigEditor';
import { updateDatasourcePluginJsonDataOption } from '@grafana/data';
import { DataSourceInstanceSettings, updateDatasourcePluginJsonDataOption } from '@grafana/data';
import { ConfigSection } from '@grafana/experimental';
import { DataSourcePicker } from '@grafana/runtime';

export function ExperimentalSettings({ onOptionsChange, options }: Props) {
return (
<>
<div>
<ConfigSection title={'Experimental Settings'}>
<InlineFieldRow>
<InlineField tooltip="deepQL" label="Enable the deepQL search." labelWidth={26}>
<InlineSwitch
Expand All @@ -37,7 +39,27 @@ export function ExperimentalSettings({ onOptionsChange, options }: Props) {
/>
</InlineField>
</InlineFieldRow>
</div>
<InlineFieldRow>
<InlineField tooltip="The Trace source for deep to check." label="Data source" labelWidth={26}>
<DataSourcePicker
inputId="deep-to-trace"
filter={(ds) => ds.type === 'tempo'}
current={options.jsonData.experimental?.tempo?.datasource}
noDefault={true}
width={40}
onChange={(ds: DataSourceInstanceSettings) =>
updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'experimental', {
...options.jsonData.experimental,
tempo: {
...options.jsonData.experimental.tempo,
datasource: ds.uid,
},
})
}
/>
</InlineField>
</InlineFieldRow>
</ConfigSection>
</>
);
}
6 changes: 5 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ export const DEFAULT_QUERY: Partial<DeepQuery> = {};
* These are options configured for each DataSource instance
*/
export interface DeepDatasourceOptions extends DataSourceJsonData {
experimental: { deepql: boolean };
experimental: { deepql: boolean; tempo?: TempoSettings };
}

export interface TempoSettings {
datasource: string;
}

/**
Expand Down