Skip to content

Commit

Permalink
Remove tracking.ts.
Browse files Browse the repository at this point in the history
  • Loading branch information
fmassot committed Jul 14, 2023
1 parent c807b39 commit 5f779d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 184 deletions.
22 changes: 10 additions & 12 deletions src/datasource.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { cloneDeep, first as _first, map as _map, groupBy } from 'lodash';
import { Observable, lastValueFrom, from, isObservable, of } from 'rxjs';
import { catchError, mergeMap, map, tap } from 'rxjs/operators';
import { catchError, mergeMap, map } from 'rxjs/operators';

import {
AbstractQuery,
Expand All @@ -25,7 +25,6 @@ import {
SupplementaryQueryType,
TimeRange,
} from '@grafana/data';
import { trackQuery } from 'tracking';
import { BucketAggregation, DataLinkConfig, ElasticsearchQuery, Field, FieldMapping, IndexMetadata, TermsQuery } from './types';
import {
DataSourceWithBackend, getTemplateSrv, TemplateSrv,
Expand Down Expand Up @@ -79,16 +78,15 @@ export class QuickwitDataSource
this.languageProvider = new ElasticsearchLanguageProvider(this);
}

/**
* Ideally final -- any other implementation may not work as expected
*/
query(request: DataQueryRequest<ElasticsearchQuery>): Observable<DataQueryResponse> {
const start = new Date();
return super.query(request).pipe(tap((response) => trackQuery(response, request, start)))
.pipe(map((response) => {
return response;
}));
}
// /**
// * Ideally final -- any other implementation may not work as expected
// */
// query(request: DataQueryRequest<ElasticsearchQuery>): Observable<DataQueryResponse> {
// return super.query(request)
// .pipe(map((response) => {
// return response;
// }));
// }

/**
* Checks the plugin health
Expand Down
172 changes: 0 additions & 172 deletions src/tracking.ts

This file was deleted.

0 comments on commit 5f779d3

Please sign in to comment.