Getting some thoughts down...
- Goals
- Main Goal: go-mysql-server end-to-end inside SSE over completion for discovery, supporting some subset of cases of combining other datasources
- Run go-mysql-server without "server"
- Use SDK for response
Docs (https://grafana.com/docs/grafana/latest/administration/recorded-queries/#how-recorded-queries-work):
Recorded queries only work with backend data source plugins. Refer to Backend data source plugin for more information about backend data source plugins. You can recorded four types of queries:
- single row and column - A query that returns a single row and column.
- row count - A query that returns meaningful rows to be counted.
- expression - Any expression. To learn more about creating and using expressions, see Write expression queries.
- dataplane numeric - A query that returns dataplane numeric kind data.
http://localhost:3000/swagger?urls.primaryName=scope.grafana.app%2Fv0alpha1
for Swagger definitions.example.http
: VSCode REST Client Extension HTTP Callsscopesnodes.json
: JSON output of ScopeNode
kind items created in example.http
scopes.json
: JSON output of Scope
kind items created in example.http
find_no_param_response.json
and find_parent_param_is_applications_response.json
: The responses to the two calls to the find/scope_node_children
endpoint that are in the example.http
fileWe have created an alpha version of the API for scopes and scope/dashboard relationships. This is an OpenAPI and kubernetes style API.
There are two main objects (kinds):
Scope
: Each Scope's spec includes an array of ScopeFilter
and the string properties title
and description
.ScopeFilter
has key
, operator
(enum), and value
### Render a Basic template with POST | |
POST http://admin:admin@localhost:3000/apis/peakq.grafana.app/v0alpha1/render?var-metricName=up | |
Content-Type: application/json | |
Accept: application/json | |
{ | |
"title": "Test", | |
"vars": [ | |
{ | |
"key": "metricName", |
# ./pp <query> <scope> <aggregate_group_by> <func_string_replacements:funcName,argIdx,currentValue,newValue>...
# aggregate_group_by is optional
$ ./pp 'up{foo="baz",a="q"}' '{a=~"z"}'
up{a=~"z",foo="baz"}
$ ./pp 'up{foo="baz",a="q"}' '{a=~"z",c="z"}'
up{a=~"z",c="z",foo="baz"}
diff --git a/go.mod b/go.mod | |
index 7534de9cfc..41d10ed8b3 100644 | |
--- a/go.mod | |
+++ b/go.mod | |
@@ -124,7 +124,7 @@ require ( | |
gopkg.in/mail.v2 v2.3.1 // @grafana/backend-platform | |
gopkg.in/yaml.v2 v2.4.0 // indirect | |
gopkg.in/yaml.v3 v3.0.1 // @grafana/alerting-squad-backend | |
- xorm.io/builder v0.3.6 // @grafana/backend-platform | |
+ xorm.io/builder v0.3.6 // indirect; @grafana/backend-platform |
Recorded Queries will record multiple metrics, identified by labels, if the input data is numeric dataplane data.
Numeric dataplane data comes: