Schema: Remove `key` from root DataQuery type (#64467)

pull/64485/head
Ryan McKinley 2 years ago committed by GitHub
parent 1a5a280c86
commit 4b94c7e5d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      docs/sources/developers/kinds/composable/elasticsearchdataquery/schema-reference.md
  2. 10
      docs/sources/developers/kinds/composable/lokidataquery/schema-reference.md
  3. 10
      docs/sources/developers/kinds/composable/parcadataquery/schema-reference.md
  4. 10
      docs/sources/developers/kinds/composable/phlaredataquery/schema-reference.md
  5. 10
      docs/sources/developers/kinds/composable/testdatadataquery/schema-reference.md
  6. 10
      packages/grafana-schema/src/common/common.gen.ts
  7. 9
      packages/grafana-schema/src/common/dataquery_gen.cue
  8. 5
      packages/grafana-schema/src/veneer/common.types.ts
  9. 9
      pkg/kindsys/common_dataquery.cue
  10. 11
      pkg/tsdb/azuremonitor/kinds/dataquery/types_dataquery_gen.go
  11. 31
      pkg/tsdb/cloudwatch/kinds/dataquery/types_dataquery_gen.go
  12. 9
      pkg/tsdb/elasticsearch/kinds/dataquery/types_dataquery_gen.go
  13. 9
      pkg/tsdb/loki/kinds/dataquery/types_dataquery_gen.go
  14. 9
      pkg/tsdb/parca/kinds/dataquery/types_dataquery_gen.go
  15. 9
      pkg/tsdb/phlare/kinds/dataquery/types_dataquery_gen.go
  16. 9
      pkg/tsdb/tempo/kinds/dataquery/types_dataquery_gen.go
  17. 11
      pkg/tsdb/testdatasource/kinds/dataquery/types_dataquery_gen.go

@ -17,12 +17,11 @@ It extends [DataQuery](#dataquery).
| Property | Type | Required | Description |
|--------------|-------------------------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `refId` | string | **Yes** | *(Inherited from [DataQuery](#dataquery))*<br/>A - Z |
| `refId` | string | **Yes** | *(Inherited from [DataQuery](#dataquery))*<br/>A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `alias` | string | No | Alias pattern |
| `bucketAggs` | [BucketAggregation](#bucketaggregation)[] | No | List of bucket aggregations |
| `datasource` | | No | *(Inherited from [DataQuery](#dataquery))*<br/>For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `hide` | boolean | No | *(Inherited from [DataQuery](#dataquery))*<br/>true if query is disabled (ie should not be returned to the dashboard) |
| `key` | string | No | *(Inherited from [DataQuery](#dataquery))*<br/>Unique, guid like, string used in explore mode |
| `hide` | boolean | No | *(Inherited from [DataQuery](#dataquery))*<br/>true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `metrics` | [MetricAggregation](#metricaggregation)[] | No | List of metric aggregations |
| `queryType` | string | No | *(Inherited from [DataQuery](#dataquery))*<br/>Specify the query flavor<br/>TODO make this required and give it a default |
| `query` | string | No | Lucene query |
@ -126,10 +125,9 @@ properties for the given context.
| Property | Type | Required | Description |
|--------------|---------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `refId` | string | **Yes** | A - Z |
| `refId` | string | **Yes** | A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `datasource` | | No | For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `hide` | boolean | No | true if query is disabled (ie should not be returned to the dashboard) |
| `key` | string | No | Unique, guid like, string used in explore mode |
| `hide` | boolean | No | true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `queryType` | string | No | Specify the query flavor<br/>TODO make this required and give it a default |
### MetricAggregation

@ -18,12 +18,11 @@ It extends [DataQuery](#dataquery).
| Property | Type | Required | Description |
|----------------|---------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `expr` | string | **Yes** | The LogQL query. |
| `refId` | string | **Yes** | *(Inherited from [DataQuery](#dataquery))*<br/>A - Z |
| `refId` | string | **Yes** | *(Inherited from [DataQuery](#dataquery))*<br/>A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `datasource` | | No | *(Inherited from [DataQuery](#dataquery))*<br/>For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `editorMode` | string | No | Possible values are: `code`, `builder`. |
| `hide` | boolean | No | *(Inherited from [DataQuery](#dataquery))*<br/>true if query is disabled (ie should not be returned to the dashboard) |
| `hide` | boolean | No | *(Inherited from [DataQuery](#dataquery))*<br/>true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `instant` | boolean | No | @deprecated, now use queryType. |
| `key` | string | No | *(Inherited from [DataQuery](#dataquery))*<br/>Unique, guid like, string used in explore mode |
| `legendFormat` | string | No | Used to override the name of the series. |
| `maxLines` | integer | No | Used to limit the number of log rows returned. |
| `queryType` | string | No | *(Inherited from [DataQuery](#dataquery))*<br/>Specify the query flavor<br/>TODO make this required and give it a default |
@ -38,10 +37,9 @@ properties for the given context.
| Property | Type | Required | Description |
|--------------|---------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `refId` | string | **Yes** | A - Z |
| `refId` | string | **Yes** | A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `datasource` | | No | For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `hide` | boolean | No | true if query is disabled (ie should not be returned to the dashboard) |
| `key` | string | No | Unique, guid like, string used in explore mode |
| `hide` | boolean | No | true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `queryType` | string | No | Specify the query flavor<br/>TODO make this required and give it a default |

@ -19,10 +19,9 @@ It extends [DataQuery](#dataquery).
|-----------------|---------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `labelSelector` | string | **Yes** | Specifies the query label selectors. Default: `{}`. |
| `profileTypeId` | string | **Yes** | Specifies the type of profile to query. |
| `refId` | string | **Yes** | *(Inherited from [DataQuery](#dataquery))*<br/>A - Z |
| `refId` | string | **Yes** | *(Inherited from [DataQuery](#dataquery))*<br/>A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `datasource` | | No | *(Inherited from [DataQuery](#dataquery))*<br/>For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `hide` | boolean | No | *(Inherited from [DataQuery](#dataquery))*<br/>true if query is disabled (ie should not be returned to the dashboard) |
| `key` | string | No | *(Inherited from [DataQuery](#dataquery))*<br/>Unique, guid like, string used in explore mode |
| `hide` | boolean | No | *(Inherited from [DataQuery](#dataquery))*<br/>true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `queryType` | string | No | *(Inherited from [DataQuery](#dataquery))*<br/>Specify the query flavor<br/>TODO make this required and give it a default |
### DataQuery
@ -33,10 +32,9 @@ properties for the given context.
| Property | Type | Required | Description |
|--------------|---------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `refId` | string | **Yes** | A - Z |
| `refId` | string | **Yes** | A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `datasource` | | No | For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `hide` | boolean | No | true if query is disabled (ie should not be returned to the dashboard) |
| `key` | string | No | Unique, guid like, string used in explore mode |
| `hide` | boolean | No | true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `queryType` | string | No | Specify the query flavor<br/>TODO make this required and give it a default |

@ -20,10 +20,9 @@ It extends [DataQuery](#dataquery).
| `groupBy` | string[] | **Yes** | Allows to group the results. |
| `labelSelector` | string | **Yes** | Specifies the query label selectors. Default: `{}`. |
| `profileTypeId` | string | **Yes** | Specifies the type of profile to query. |
| `refId` | string | **Yes** | *(Inherited from [DataQuery](#dataquery))*<br/>A - Z |
| `refId` | string | **Yes** | *(Inherited from [DataQuery](#dataquery))*<br/>A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `datasource` | | No | *(Inherited from [DataQuery](#dataquery))*<br/>For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `hide` | boolean | No | *(Inherited from [DataQuery](#dataquery))*<br/>true if query is disabled (ie should not be returned to the dashboard) |
| `key` | string | No | *(Inherited from [DataQuery](#dataquery))*<br/>Unique, guid like, string used in explore mode |
| `hide` | boolean | No | *(Inherited from [DataQuery](#dataquery))*<br/>true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `queryType` | string | No | *(Inherited from [DataQuery](#dataquery))*<br/>Specify the query flavor<br/>TODO make this required and give it a default |
### DataQuery
@ -34,10 +33,9 @@ properties for the given context.
| Property | Type | Required | Description |
|--------------|---------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `refId` | string | **Yes** | A - Z |
| `refId` | string | **Yes** | A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `datasource` | | No | For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `hide` | boolean | No | true if query is disabled (ie should not be returned to the dashboard) |
| `key` | string | No | Unique, guid like, string used in explore mode |
| `hide` | boolean | No | true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `queryType` | string | No | Specify the query flavor<br/>TODO make this required and give it a default |

@ -17,7 +17,7 @@ It extends [DataQuery](#dataquery).
| Property | Type | Required | Description |
|-------------------|-------------------------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `refId` | string | **Yes** | *(Inherited from [DataQuery](#dataquery))*<br/>A - Z |
| `refId` | string | **Yes** | *(Inherited from [DataQuery](#dataquery))*<br/>A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `alias` | string | No | |
| `channel` | string | No | |
| `csvContent` | string | No | |
@ -25,8 +25,7 @@ It extends [DataQuery](#dataquery).
| `csvWave` | [CSVWave](#csvwave)[] | No | |
| `datasource` | | No | *(Inherited from [DataQuery](#dataquery))*<br/>For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `errorType` | string | No | Possible values are: `server_panic`, `frontend_exception`, `frontend_observable`. |
| `hide` | boolean | No | *(Inherited from [DataQuery](#dataquery))*<br/>true if query is disabled (ie should not be returned to the dashboard) |
| `key` | string | No | *(Inherited from [DataQuery](#dataquery))*<br/>Unique, guid like, string used in explore mode |
| `hide` | boolean | No | *(Inherited from [DataQuery](#dataquery))*<br/>true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `labels` | string | No | |
| `levelColumn` | boolean | No | |
| `lines` | integer | No | |
@ -60,10 +59,9 @@ properties for the given context.
| Property | Type | Required | Description |
|--------------|---------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `refId` | string | **Yes** | A - Z |
| `refId` | string | **Yes** | A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `datasource` | | No | For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `hide` | boolean | No | true if query is disabled (ie should not be returned to the dashboard) |
| `key` | string | No | Unique, guid like, string used in explore mode |
| `hide` | boolean | No | true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `queryType` | string | No | Specify the query flavor<br/>TODO make this required and give it a default |
### NodesQuery

@ -34,19 +34,19 @@ export interface DataQuery {
datasource?: unknown;
/**
* true if query is disabled (ie should not be returned to the dashboard)
* Note this does not always imply that the query should not be executed since
* the results from a hidden query may be used as the input to other queries (SSE etc)
*/
hide?: boolean;
/**
* Unique, guid like, string used in explore mode
*/
key?: string;
/**
* Specify the query flavor
* TODO make this required and give it a default
*/
queryType?: string;
/**
* A - Z
* A unique identifier for the query within the list of targets.
* In server side expressions, the refId is used as a variable name to identify results.
* By default, the UI will assign A->Z; however setting meaningful names may be useful.
*/
refId: string;
}

@ -18,15 +18,16 @@ package common
// Specific implementations will *extend* this interface, adding the required
// properties for the given context.
DataQuery: {
// A - Z
// A unique identifier for the query within the list of targets.
// In server side expressions, the refId is used as a variable name to identify results.
// By default, the UI will assign A->Z; however setting meaningful names may be useful.
refId: string
// true if query is disabled (ie should not be returned to the dashboard)
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
hide?: bool
// Unique, guid like, string used in explore mode
key?: string
// Specify the query flavor
// TODO make this required and give it a default
queryType?: string

@ -9,6 +9,11 @@ export interface MapLayerOptions<TConfig = any> extends raw.MapLayerOptions {
}
export interface DataQuery extends raw.DataQuery {
/**
* Unique, guid like, string (used only in explore mode)
*/
key?: string;
// TODO remove explicit nulls
datasource?: raw.DataSourceRef | null;
}

@ -9,15 +9,16 @@ package kindsys
// Specific implementations will *extend* this interface, adding the required
// properties for the given context.
DataQuery: {
// A - Z
// A unique identifier for the query within the list of targets.
// In server side expressions, the refId is used as a variable name to identify results.
// By default, the UI will assign A->Z; however setting meaningful names may be useful.
refId: string
// true if query is disabled (ie should not be returned to the dashboard)
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
hide?: bool
// Unique, guid like, string used in explore mode
key?: string
// Specify the query flavor
// TODO make this required and give it a default
queryType?: string

@ -362,17 +362,18 @@ type AzureMonitorQuery struct {
GrafanaTemplateVariableFn *AzureMonitorQueryGrafanaTemplateVariableFn `json:"grafanaTemplateVariableFn,omitempty"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
Hide *bool `json:"hide,omitempty"`
// Unique, guid like, string used in explore mode
Key *string `json:"key,omitempty"`
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
Hide *bool `json:"hide,omitempty"`
Namespace *string `json:"namespace,omitempty"`
// Specify the query flavor
// TODO make this required and give it a default
QueryType *string `json:"queryType,omitempty"`
// A - Z
// A unique identifier for the query within the list of targets.
// In server side expressions, the refId is used as a variable name to identify results.
// By default, the UI will assign A->Z; however setting meaningful names may be useful.
RefId string `json:"refId"`
// Azure Monitor query type.

@ -240,10 +240,9 @@ type CloudWatchAnnotationQuery struct {
Dimensions map[string]interface{} `json:"dimensions,omitempty"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
Hide *bool `json:"hide,omitempty"`
// Unique, guid like, string used in explore mode
Key *string `json:"key,omitempty"`
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
Hide *bool `json:"hide,omitempty"`
MatchExact *bool `json:"matchExact,omitempty"`
MetricName *string `json:"metricName,omitempty"`
Namespace string `json:"namespace"`
@ -255,7 +254,9 @@ type CloudWatchAnnotationQuery struct {
// TODO make this required and give it a default
QueryType *string `json:"queryType,omitempty"`
// A - Z
// A unique identifier for the query within the list of targets.
// In server side expressions, the refId is used as a variable name to identify results.
// By default, the UI will assign A->Z; however setting meaningful names may be useful.
RefId string `json:"refId"`
Region string `json:"region"`
Statistic *string `json:"statistic,omitempty"`
@ -280,12 +281,11 @@ type CloudWatchLogsQuery struct {
Expression *string `json:"expression,omitempty"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
Hide *bool `json:"hide,omitempty"`
Id string `json:"id"`
// Unique, guid like, string used in explore mode
Key *string `json:"key,omitempty"`
// LogGroupNames deprecated, use logGroups instead
LogGroupNames []string `json:"logGroupNames,omitempty"`
LogGroups []struct {
@ -300,7 +300,9 @@ type CloudWatchLogsQuery struct {
// TODO make this required and give it a default
QueryType *string `json:"queryType,omitempty"`
// A - Z
// A unique identifier for the query within the list of targets.
// In server side expressions, the refId is used as a variable name to identify results.
// By default, the UI will assign A->Z; however setting meaningful names may be useful.
RefId string `json:"refId"`
Region string `json:"region"`
StatsGroups []string `json:"statsGroups,omitempty"`
@ -325,13 +327,12 @@ type CloudWatchMetricsQuery struct {
Expression *string `json:"expression,omitempty"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
Hide *bool `json:"hide,omitempty"`
// Id common props
Id string `json:"id"`
// Unique, guid like, string used in explore mode
Key *string `json:"key,omitempty"`
Id string `json:"id"`
Label *string `json:"label,omitempty"`
MatchExact *bool `json:"matchExact,omitempty"`
MetricEditorMode *CloudWatchMetricsQueryMetricEditorMode `json:"metricEditorMode,omitempty"`
@ -345,7 +346,9 @@ type CloudWatchMetricsQuery struct {
// TODO make this required and give it a default
QueryType *string `json:"queryType,omitempty"`
// A - Z
// A unique identifier for the query within the list of targets.
// In server side expressions, the refId is used as a variable name to identify results.
// By default, the UI will assign A->Z; however setting meaningful names may be useful.
RefId string `json:"refId"`
Region string `json:"region"`
Sql *struct {

@ -622,11 +622,10 @@ type ElasticsearchDataQuery struct {
Datasource *interface{} `json:"datasource,omitempty"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
Hide *bool `json:"hide,omitempty"`
// Unique, guid like, string used in explore mode
Key *string `json:"key,omitempty"`
// List of metric aggregations
Metrics []MetricsItem `json:"metrics,omitempty"`
@ -637,7 +636,9 @@ type ElasticsearchDataQuery struct {
// TODO make this required and give it a default
QueryType *string `json:"queryType,omitempty"`
// A - Z
// A unique identifier for the query within the list of targets.
// In server side expressions, the refId is used as a variable name to identify results.
// By default, the UI will assign A->Z; however setting meaningful names may be useful.
RefId string `json:"refId"`
// Name of time field

@ -54,14 +54,13 @@ type LokiDataQuery struct {
Expr string `json:"expr"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
Hide *bool `json:"hide,omitempty"`
// @deprecated, now use queryType.
Instant *bool `json:"instant,omitempty"`
// Unique, guid like, string used in explore mode
Key *string `json:"key,omitempty"`
// Used to override the name of the series.
LegendFormat *string `json:"legendFormat,omitempty"`
@ -75,7 +74,9 @@ type LokiDataQuery struct {
// @deprecated, now use queryType.
Range *bool `json:"range,omitempty"`
// A - Z
// A unique identifier for the query within the list of targets.
// In server side expressions, the refId is used as a variable name to identify results.
// By default, the UI will assign A->Z; however setting meaningful names may be useful.
RefId string `json:"refId"`
// Used to scale the interval value.

@ -25,11 +25,10 @@ type ParcaDataQuery struct {
Datasource *interface{} `json:"datasource,omitempty"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
Hide *bool `json:"hide,omitempty"`
// Unique, guid like, string used in explore mode
Key *string `json:"key,omitempty"`
// Specifies the query label selectors.
LabelSelector string `json:"labelSelector"`
@ -40,7 +39,9 @@ type ParcaDataQuery struct {
// TODO make this required and give it a default
QueryType *string `json:"queryType,omitempty"`
// A - Z
// A unique identifier for the query within the list of targets.
// In server side expressions, the refId is used as a variable name to identify results.
// By default, the UI will assign A->Z; however setting meaningful names may be useful.
RefId string `json:"refId"`
}

@ -28,11 +28,10 @@ type PhlareDataQuery struct {
GroupBy []string `json:"groupBy"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
Hide *bool `json:"hide,omitempty"`
// Unique, guid like, string used in explore mode
Key *string `json:"key,omitempty"`
// Specifies the query label selectors.
LabelSelector string `json:"labelSelector"`
@ -43,7 +42,9 @@ type PhlareDataQuery struct {
// TODO make this required and give it a default
QueryType *string `json:"queryType,omitempty"`
// A - Z
// A unique identifier for the query within the list of targets.
// In server side expressions, the refId is used as a variable name to identify results.
// By default, the UI will assign A->Z; however setting meaningful names may be useful.
RefId string `json:"refId"`
}

@ -69,11 +69,10 @@ type TempoQuery struct {
} `json:"filters"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
Hide *bool `json:"hide,omitempty"`
// Unique, guid like, string used in explore mode
Key *string `json:"key,omitempty"`
// Defines the maximum number of traces that are returned from Tempo
Limit *int64 `json:"limit,omitempty"`
@ -90,7 +89,9 @@ type TempoQuery struct {
// TODO make this required and give it a default
QueryType *string `json:"queryType,omitempty"`
// A - Z
// A unique identifier for the query within the list of targets.
// In server side expressions, the refId is used as a variable name to identify results.
// By default, the UI will assign A->Z; however setting meaningful names may be useful.
RefId string `json:"refId"`
// Logfmt query to filter traces by their tags. Example: http.status_code=200 error=true

@ -191,10 +191,9 @@ type TestDataDataQuery struct {
ErrorType *ErrorType `json:"errorType,omitempty"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
Hide *bool `json:"hide,omitempty"`
// Unique, guid like, string used in explore mode
Key *string `json:"key,omitempty"`
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
Hide *bool `json:"hide,omitempty"`
Labels *string `json:"labels,omitempty"`
LevelColumn *bool `json:"levelColumn,omitempty"`
Lines *int64 `json:"lines,omitempty"`
@ -216,7 +215,9 @@ type TestDataDataQuery struct {
QueryType *string `json:"queryType,omitempty"`
RawFrameContent *string `json:"rawFrameContent,omitempty"`
// A - Z
// A unique identifier for the query within the list of targets.
// In server side expressions, the refId is used as a variable name to identify results.
// By default, the UI will assign A->Z; however setting meaningful names may be useful.
RefId string `json:"refId"`
ScenarioId *ScenarioId `json:"scenarioId,omitempty"`
SeriesCount *int32 `json:"seriesCount,omitempty"`

Loading…
Cancel
Save