Tempo: Embed flame graph in span details (#77537)

* Embed flame graph

* Update test

* Update test

* Use toggle

* Update test

* Add tests

* Use const

* Cleanup

* Update profile tag

* Move flame graph out of tags, remove request and other cleanup + tests

* Update test

* Set flame graph by profile id and simplify logic

* Cleanup and redrawListView

* Create/use feature toggle
This commit is contained in:
Joey
2023-11-23 13:36:53 +00:00
committed by GitHub
parent be157399d0
commit 4f46fb412c
30 changed files with 375 additions and 65 deletions

View File

@@ -8,11 +8,9 @@ import { TraceToProfilesData, TraceToProfilesSettings } from './TraceToProfilesS
const defaultOption: DataSourceSettings<TraceToProfilesData> = {
jsonData: {
tracesToProfilesV2: {
tracesToProfiles: {
datasourceUid: 'profiling1_uid',
tags: [{ key: 'someTag', value: 'newName' }],
spanStartTimeShift: '1m',
spanEndTimeShift: '1m',
customQuery: true,
query: '{${__tags}}',
},
@@ -48,7 +46,6 @@ describe('TraceToProfilesSettings', () => {
it('should render all options', () => {
render(<TraceToProfilesSettings options={defaultOption} onOptionsChange={() => {}} />);
expect(screen.getByText('Select data source')).toBeInTheDocument();
expect(screen.getByText('Tags')).toBeInTheDocument();
expect(screen.getByText('Profile type')).toBeInTheDocument();
expect(screen.getByText('Use custom query')).toBeInTheDocument();

View File

@@ -78,7 +78,6 @@ export function TraceToProfilesSettings({ options, onOptionsChange }: Props) {
noDefault={true}
width={40}
onChange={(ds: DataSourceInstanceSettings) => {
console.log(options.jsonData.tracesToProfiles, ds);
updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToProfiles', {
...options.jsonData.tracesToProfiles,
datasourceUid: ds.uid,