Skip to content

Commit

Permalink
feat: 监控trace datasource插件开发
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 25664
  • Loading branch information
liangling0628 committed Dec 3, 2024
1 parent 411571a commit f8d4200
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/trace/src/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ import {
MutableDataFrame,
type ScopedVars,
} from '@grafana/data';
import type { NodeGraphOptions, SpanBarOptions } from '@grafana/o11y-ds-frontend';
import { type BackendSrvRequest, getBackendSrv, getTemplateSrv } from '@grafana/runtime';
import { identity, pick, pickBy } from 'lodash';
import { lastValueFrom, type Observable, of } from 'rxjs';
import { catchError, map } from 'rxjs/operators';

import type { TraceIdTimeParamsOptions } from './configuration/TraceIdTimeParams';
import { createGraphFrames } from './graphTransform';
import { createTableFrame, createTraceFrame } from './responseTransform';
import type { TraceQuery } from './types';
import { convertTagsFilters } from './util';
Expand All @@ -30,11 +27,6 @@ export enum QueryUrl {
}

export default class TraceDatasource extends DataSourceApi<TraceQuery, QueryOption> {
uploadedJson: ArrayBuffer | null | string = null;
nodeGraph?: NodeGraphOptions;
traceIdTimeParams?: TraceIdTimeParamsOptions;
spanBar?: SpanBarOptions;

public baseUrl: string;
public bizId?: number | string;
public configData: QueryOption;
Expand Down Expand Up @@ -122,9 +114,6 @@ export default class TraceDatasource extends DataSourceApi<TraceQuery, QueryOpti
return { data: [emptyTraceDataFrame] };
}
const data = [createTraceFrame(traceData)];
if (this.nodeGraph?.enabled) {
data.push(...createGraphFrames(traceData));
}
return {
data,
};
Expand Down

0 comments on commit f8d4200

Please sign in to comment.