Documentation for automated readers A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers
and AI tools to parse than HTML. The Markdown version is available at
https://grafana.com/docs/grafana/v8.3/packages_api/runtime.md, or by sending
Accept: text/markdown to https://grafana.com/docs/grafana/v8.3/packages_api/runtime/. For broader
documentation discovery, the curated index is available at https://grafana.com/llms.txt
and the complete index is available at https://grafana.com/llms-full.txt.
Menu
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Used to retrieve the AngularLoader that enables the use of Angular components within a React component.Please see the AngularComponent for a proper example.
Used to communicate via http(s) to a remote backend such as the Grafana backend, a datasource etc. The BackendSrv is using the Fetch API under the hood to handle all the communication.The request function can be used to perform a remote call by specifying a BackendSrvRequest. To make the BackendSrv a bit easier to use we have added a couple of shorthand functions that will use default values executing the request.
This is the entry point for communicating with a datasource that is added as a plugin (both external and internal). Via this service you will get access to the DataSourceApi that have a rich API for communicating with the datasource.
Used to send events to all the registered backends. This should be accessed via the getEchoSrv() function. Will, by default, flush events to the backends every 10s or when the flush function is triggered.
If you need to automatically navigate the user to a new place in the application this should be done via the LocationSrv and it will make sure to update the application state accordingly.
(BETA) WARNING: this function provides a temporary way for plugins to access anything in the angular injector. While the migration from angular to react continues, there are a few options that do not yet have good alternatives. Note that use of this function will be removed in the future.
Describes the details in the payload returned when checking the health of a data source plugin.If the ‘message’ key exists, this will be displayed in the error message in DataSourceSettingsPage If the ‘verboseMessage’ key exists, this will be displayed in the expandable details in the error message in DataSourceSettingsPage