Plugins 〉Lightstep Metrics
Lightstep Metrics
Lightstep Metrics Plugin
The Lightstep Metrics Plugin allows you to view metrics from Lightstep directly in Grafana. With minimal effort, you can use the plugin to continue viewing your existing visualizations in Grafana, using Lightstep as the data source. Then when you notice a deviation, you can click in a chart in Grafana and navigate into Lightstep to use Change Intelligence and uncover the root cause.
Change Intelligence determines the service that emitted a metric, searches for performance changes on Key Operations from that service at the same time as the deviation, and then uses trace data to determine what caused the change.
NOTE: The Lightstep Metrics Plugin is on a per-project basis. If you want this integration for multiple Lightstep projects, follow these instructions for each of your projects.
Prerequisites
You'll need the following to enable and use the plugin:
A Grafana account (version 7.2.2 and greater)
NOTE: The plugin only supports graph and time series charts.
Metric data reporting to Lightstep.
Currently using Prometheus? You can use the Prometheus sidecar to send metrics to Lightstep. Lightstep also accepts metrics from other backends.
Your Organization and Project name. Both can be found on on the Project Settings page of Lightstep.
A Lightstep API key with Viewer permissions created just for Grafana.
Paste the key someplace safe, as you will not be able to access it again from Lightstep.
Installation
You can install the plugin using the Grafana CLI, or if your Grafana server doesn't have internet access, you can download and instal it manually.
Install from the CLI
Install the plugin from the Grafana CLI using Grafana's plugin installation instructions.
grafana-cli plugins install lightstep-metrics-datasource
Install Manually
Download the zip file from GitHub.
https://github.com/lightstep/lightstep-metrics-datasource/archive/refs/heads/main.zip
Install the plugin by extracting the archive to the Grafana
grafana-plugins
directory.
Enable the Lightstep Plugin in Grafana
After you install the plugin, follow these steps:
Steps may vary slightly depending on your version of Grafana.
Restart the Grafana server so it can discover the new plugin.
In the Navigation Bar, choose Configuration, select Data Sources, and click Add data source.
Start typing
Lightstep
in the search field to find the Lightstep Metrics plugin and click Select.Enter your Lightstep organization and project name, paste in your Lightstep API key, and click Save & Test.
Grafana confirms that it's connected to Lightstep.
You can now create dashboards and charts in Grafana using metrics sent from Lightstep.
Create Grafana Charts Using Metrics from Lightstep
With the Lightstep plugin installed, you can query your Lightstep metrics directly from Grafana.
In the Edit Panel view, make sure Lightstep Metrics is selected as the data source.
Use the Metrics dropdown to select the metric for your query.
Continue adding to your query in the Metrics field, using the PromQL query language.
Click out of the field (or press
shift
+Enter
) to run your query.Choose the visualization for the chart (Lightstep supports either Graph or Time Series). Click Apply to create the graph.
Investigate a Metric Deviation from a Grafana Chart
Now that you have a Grafana chart based on Lightstep metrics, when you notice a deviation, you can go directly from that chart into Lightstep to find the root cause.
When you view the chart and notice a deviation that you'd like to investigate, click into the deviation and select View what changed in Lightstep.
You're taken into Change Intelligence in Lightstep, where you can start your investigation.
View the query you made in Grafana by clicking the View query button.
<!-- TODO: add a link to the Learning Path for Prom+Grafana, once available -->
Grafana Cloud Pro
- $25 / user / month and includes a free trial for new users
- Available with a Grafana Cloud Pro plan
- Access to 1 Enterprise plugin
- Fully managed service (not available to self-manage)
Grafana Cloud Advanced / Grafana Enterprise
- Available with a Grafana Cloud Advanced plan or Grafana Enterprise license
- Access to all Enterprise plugins
- Run fully managed or self-manage on your own infrastructure
Installing Lightstep Metrics on Grafana Cloud:
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
For more information, visit the docs on plugin installation.
Installing on a local Grafana:
For local instances, plugins are installed and updated via a simple CLI command. Plugins are not updated automatically, however you will be notified when updates are available right within your Grafana.
1. Install the Data Source
Use the grafana-cli tool to install Lightstep Metrics from the commandline:
grafana-cli plugins install
The plugin will be installed into your grafana plugins directory; the default is /var/lib/grafana/plugins. More information on the cli tool.
Alternatively, you can manually download the .zip file for your architecture below and unpack it into your grafana plugins directory.
Alternatively, you can manually download the .zip file and unpack it into your grafana plugins directory.
2. Configure the Data Source
Accessed from the Grafana main menu, newly installed data sources can be added immediately within the Data Sources section.
Next, click the Add data source button in the upper right. The data source will be available for selection in the Type select box.
To see a list of installed data sources, click the Plugins item in the main menu. Both core data sources and installed data sources will appear.
Changelog
1.0.0
Initial release.