grafana / sentry-datasource

Grafana data source plugin for Sentry.
https://grafana.com/grafana/plugins/grafana-sentry-datasource/
Apache License 2.0
23 stars 13 forks source link

Variables in query editor not working correctly #26

Open yesoreyeram opened 2 years ago

yesoreyeram commented 2 years ago

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.

JeSappelleRoot commented 2 years ago

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

JeSappelleRoot commented 2 years ago

Hi there,

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

Joseph

joey-grafana commented 2 years ago

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 :)

JeSappelleRoot commented 2 years ago

Hi there,

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

Best,

Joseph

joey-grafana commented 2 years ago

Will let you know when it's done :)

akramhussein commented 2 years ago

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.

james-glover commented 1 year ago

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.

yesoreyeram commented 1 year ago

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.

sandipb commented 9 months ago

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.