scalyr / scalyr-grafana-datasource-plugin

Apache License 2.0
14 stars 5 forks source link

Add support for variables via power queries #108

Open andgorrie opened 1 year ago

andgorrie commented 1 year ago

Please add the ability to use a DataSet data source as the source for a variable. In my use case I want all distinct values for a specific Field to be used to populate a Query type variable. Power Query format would be best, as then I could do some fairly advanced manipulation as well if I like.

jmakar-s1 commented 1 year ago

This is supported (though as a facet query): Screenshot 2023-03-23 at 2 50 39 PM

Adding support for variables via power queries is a great idea, will add to the backlog

andgorrie commented 1 year ago

How do I filter with a facet query? I got it to work returning a field but I can't figure out how to filter it to only the specific log I want.

jmakar-s1 commented 1 year ago

It's a kludge, but currently the Regex field could be used to do this, for example above it could become something like /^"(.*cortex.*)"$/

andgorrie commented 1 year ago

I don't think that works for my use case. I have multiple logs with the field 'project_id' and they are all integers, and I only want the 'project_id' from a specific log, so no way to sort the results, I need to filter the query. I assume this isn't currently possible? I wasn't sure if there was a syntax to get to the filter in a FacetQuery.

jmakar-s1 commented 1 year ago

Unfortunately, no not currently