Spans API Grafana Integration
Prerequisites
- Grafana ≥ 9.1.0
- Embrace Spans API Token. Request a token from your Embrace account manager.
Setting Up Embrace as a Data Source to retrieve spans
Follow these steps to add Tempo as a data source in the Grafana dashboard:
- Click the gear icon to go to the Configurations page.
- Click on "Add data source" and select Tempo.
- Name your source "embrace-spans-api" and set the following fields:
URL
:https://api.embrace.io/spans
- Under
Custom HTTP Headers
, add a header with a nameAuthorization
and useBearer <YOUR_API_TOKEN>
as your token string. If you don't have a token yet, you can use the sandbox tokendc8b04fb11874ee19a6ac1ced98da486
, and your token string should beBearer dc8b04fb11874ee19a6ac1ced98da486
.
Exploring Spans Data
If you click on the "Explore" tab on Grafana's sidebar, and you select the "embrace-spans-api" data source, you can start querying your spans data. There are two modes you can do queries, the "Search" mode and the "TraceQL" mode.
Search Mode
Here you can use the status dropdown to search for successful or error spans.
You can also search using the tags, for example, using the statusMessage
tag.
On the Tags
dropdown you will be able to select any attribute that is present in your spans data
(see the Embrace attributes section).
One thing to note is that if you select an existing tag, you will be able to see the tag values that are present in your data:
Another filter you can use is the Span name
:
TraceQL Mode
You can also search for spans using TraceQL language.