Files
grafana/public/app/plugins/datasource/tempo/dataquery.gen.ts

93 lines
2.4 KiB
TypeScript
Raw Normal View History

// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// PluginTSTypesJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export const DataQueryModelVersion = Object.freeze([0, 0]);
Tempo: New Search UI using TraceQL (#63808) * WIP of creating new components to support the Search tab using TraceQL * Search fields now require an ID. Added duration fields to new Search UI * Distinguish static from dynamic fields. Added dynamic tags input * Moved new search behind traceqlSearch feature flag. Added handling of different types of values to accurately wrap them in quotes when generating query. * Hold search state in TempoQuery to leverage state in URL. Moved types to schema file * Use a read only monaco editor to render a syntax highlighted generated query. Added tooltip to duration. Added query options section * Support multiple values using the regex operator and multi input * Delete dynamic filters * Automatically select the regex op when multiple values are selected. Revert to previous operator when only one value is selected * Added tests for SearchField component * Added tests for the TraceQLSearch component * Added tests for function that generates the query * Fix merge conflicts * Update test * Replace Search tab when traceqlSearch feature flag is enabled. Limit operators for both name fields to =,!=,=~ * Disable clear button for values * Changed delete and add buttons to AccessoryButton. Added descriptions to operators * Remove duplicate test * Added a prismjs grammar for traceql. Replaced read only query editor with syntax highlighted query. Removed spaces between tag operator and value when generating query. * Fix support for custom values when isMulti is enabled in Select * Use toOption function
2023-03-06 16:31:08 +00:00
export interface TempoQuery extends common.DataQuery {
filters: Array<TraceqlFilter>;
/**
* Defines the maximum number of traces that are returned from Tempo
*/
limit?: number;
/**
* Define the maximum duration to select traces. Use duration format, for example: 1.2s, 100ms
*/
maxDuration?: string;
/**
* Define the minimum duration to select traces. Use duration format, for example: 1.2s, 100ms
*/
minDuration?: string;
/**
* TraceQL query or trace ID
*/
query: string;
/**
* Logfmt query to filter traces by their tags. Example: http.status_code=200 error=true
*/
search?: string;
/**
* Filters to be included in a PromQL query to select data for the service graph. Example: {client="app",service="app"}
*/
serviceMapQuery?: string;
/**
* Query traces by service name
*/
serviceName?: string;
/**
* Query traces by span name
*/
spanName?: string;
}
Tempo: New Search UI using TraceQL (#63808) * WIP of creating new components to support the Search tab using TraceQL * Search fields now require an ID. Added duration fields to new Search UI * Distinguish static from dynamic fields. Added dynamic tags input * Moved new search behind traceqlSearch feature flag. Added handling of different types of values to accurately wrap them in quotes when generating query. * Hold search state in TempoQuery to leverage state in URL. Moved types to schema file * Use a read only monaco editor to render a syntax highlighted generated query. Added tooltip to duration. Added query options section * Support multiple values using the regex operator and multi input * Delete dynamic filters * Automatically select the regex op when multiple values are selected. Revert to previous operator when only one value is selected * Added tests for SearchField component * Added tests for the TraceQLSearch component * Added tests for function that generates the query * Fix merge conflicts * Update test * Replace Search tab when traceqlSearch feature flag is enabled. Limit operators for both name fields to =,!=,=~ * Disable clear button for values * Changed delete and add buttons to AccessoryButton. Added descriptions to operators * Remove duplicate test * Added a prismjs grammar for traceql. Replaced read only query editor with syntax highlighted query. Removed spaces between tag operator and value when generating query. * Fix support for custom values when isMulti is enabled in Select * Use toOption function
2023-03-06 16:31:08 +00:00
export const defaultTempoQuery: Partial<TempoQuery> = {
filters: [],
};
/**
* search = Loki search, nativeSearch = Tempo search for backwards compatibility
*/
export type TempoQueryType = ('traceql' | 'traceqlSearch' | 'search' | 'serviceMap' | 'upload' | 'nativeSearch' | 'clear');
/**
* static fields are pre-set in the UI, dynamic fields are added by the user
*/
export type TraceqlSearchFilterType = ('static' | 'dynamic');
export interface TraceqlFilter {
/**
* Uniquely identify the filter, will not be used in the query generation
*/
id: string;
/**
* The operator that connects the tag to the value, for example: =, >, !=, =~
*/
operator?: string;
/**
* The tag for the search filter, for example: .http.status_code, .service.name, status
*/
tag?: string;
/**
* The type of the filter, can either be static (pre defined in the UI) or dynamic
*/
type: TraceqlSearchFilterType;
/**
* The value for the search filter
*/
value?: (string | Array<string>);
/**
* The type of the value, used for example to check whether we need to wrap the value in quotes when generating the query
*/
valueType?: string;
}
export interface Tempo {}