I am developing a plugin for grafana that sends messages to a backend and I want to add user information to the request (which normally is the ${__user.login} global variable) The thing is, I can’t find where this would fall. I tried searching the TemplateSrv in the @grafana/data but it seems it’s only for dashboard defined variables. Is there a way to access this information inside a plugin?
Also it seems that setting a variable with the content of a global variable is not working. I tried creating a dashboard variable of type custom/constant and the content would be the above mentioned global variable but it doesn’t get the data.
Does the user need to be able to supply in their templates, or would it be sufficient if the plugin could extract it from their request without them explicitly passing the information?
Also, what type of plugin are you building? User information is exposed differently depending on if it’s a data source plugin or backend plugin for example.
We are building a Panel plugin and we do not want the user to explicit pass the information. We would like our panel to get the user login (or the user information object).