grafana/sentry-datasource

Variables in query editor not working correctly

Opened this issue · 9 comments

Feedback from the sentry team:

The data source plugin doesn't work with template variables, which is a problem for users who have dashboards that rely on them. Is this something that can be addressed?

I haven't confirmed, but I remember hearing from a customer that they couldn't use template variables for the Projects query type. I see it says it's supported in the doc, so might be off base here.

More details in the #grafana-sentry slack thread.

Feel free to check the mentioned issue, I added some extra details

Hi there,

Did the investigation report some clues on the issue ?
Best,

Joseph

Hello, as mentioned in the other issue you opened, "I can see that we are not currently interpolating variables when used in the Projects field. This is a known issue".

We know where the issue is, just need to fix it :)

Hi there,

I just want to keep the issue open
Any luck to get a fix on this issue btw ?

Best,

Joseph

Will let you know when it's done :)

Also experiencing this issue for the stats endpoint with template variables, particularly the Project field.

The issue seems to be that when you use template variables to define multiple projects and then produce a row per project, the query HTTP URL generated is incorrect and does not correctly extract the project id.

It does work for the other endpoint issues.

Also experiencing this issue for the stats endpoint with template variables, particularly the Project field.

The issue seems to be that when you use template variables to define multiple projects and then produce a row per project, the query HTTP URL generated is incorrect and does not correctly extract the project id.

It does work for the other endpoint issues.

Exactly the same for here, it works with Issues but not Stats, I also use the Environments variable as we have a lot of projects and I would rather not have to hardcode the project and have a panel/dashboard per project.

Please could someone try and take a look, thank you.

We have added this to our backlog and I think we can fix this in the upcoming quarter along with other improvements we are currently working on.

Any update on this?

To clarify:

The project field in the stats query expects a number. The number for each project is not easily decipherable from the web ui. I gather that it is the one at the end of the dsn. But to make it easy for the dashboard dropdown, I used the custom variable "key : value" format to give a human friendly key to the user.

But the project field seems to only accept variables in the format "${var}". I am not able to use "${var:value}" to extract the number.