We are planning to create a custom ClickHouse Grafana plugin with the following behavior: queries should automatically be executed using the currently logged-in Grafana user, instead of the user configured in the datasource.
We have been able to achieve this to some extent. However, we are facing issues in alerting scenarios. For alert queries, the grafana_scheduler user is treated as the logged-in user.
Is there any way to obtain information about the user who originally created the alert and pass that user context to the query API at the plugin level for alerts?