Grafana
Grafana is an open-source visualization and monitoring platform that lets you create customizable dashboards and analyze observability data from multiple sources. This guide explains how to integrate ThousandEyes metrics, traces, and logs with Grafana using OpenTelemetry.
For more information about sending telemetry to Grafana Cloud using OpenTelemetry, see Grafana Cloud: Send data using OpenTelemetry Protocol (OTLP).
ThousandEyes Data Model Version 2 uses OpenTelemetry resource attributes. Grafana Cloud does not promote resource attributes to queryable metric labels by default.
Prerequisites
You have created a ThousandEyes test.
You have a Grafana Cloud account.
You have created a Grafana Cloud OpenTelemetry connection:
In the Grafana Cloud platform, go to Connections.
Select Add new connection.
Search for OpenTelemetry Collector.
Scroll to the Generate OpenTelemetry Collector Configuration step.
Enter an Access Policy token name.
Select Create token.
Copy the generated OpenTelemetry Collector Configuration for future use.

Stream OpenTelemetry Metrics to Grafana
Step 1: Create a Metrics Integration
Using the ThousandEyes UI for Metrics
In ThousandEyes, go to Manage > Integration 1.0.
Select +New Integration and select OpenTelemetry Integration.
Enter a Name for the integration.
Set the Target to HTTP.
For the Endpoint URL, enter the endpoint from your generated OpenTelemetry Collector Configuration and add
/v1/metricsto the end of your endpoint URL.For example:
https://otlp-gateway-prod-us-central-0.grafana.net/otlp/v1/metrics.
Grafana Endpoint URL For Preset Configurations, select Grafana.
For Auth Type, select Basic.
Enter the username and password from your OpenTelemetry Collector Configuration.
For the OpenTelemetry Signal, select Metric.
For the Data Model Version, select v2.
Select a test.
For more information on creating a test, see General Setup Instructions.
Select Save.
Using the ThousandEyes API for Metrics
Create the HTTP stream programmatically:
Replace {STREAM_ENDPOINT_URL} and <BASE64_ENCODED_GRAFANA_CREDENTIALS> with the correct values for your Grafana instance.
Troubleshooting Grafana Integration Issues
Self-Managed Prometheus Out-of-Order Sample Errors
If you use Grafana with a self-managed Prometheus backend, Prometheus might reject OpenTelemetry metrics with an "out of order sample" error when samples arrive out of order. This issue might occur when metrics are batched or when multiple OpenTelemetry Collector replicas send samples without coordinated ordering.
This Prometheus setting applies to the Prometheus server configuration. You cannot configure it in the Grafana Cloud OpenTelemetry connection or by adding it to the OpenTelemetry Collector configuration.
To allow Prometheus to accept samples that arrive within a configured delay, add an out-of-order time window to the Prometheus configuration file loaded by the --config.file flag. Choose a window that matches your environment. For example:
For more information, see Enable out-of-order ingestion in the Prometheus documentation.
ThousandEyes Dashboard in Grafana
To access the ThousandEyes Dashboard in Grafana, visit the official Grafana dashboard page ThousandEyes Dashboard on Grafana.


Stream OpenTelemetry Traces to Grafana
Step 1: Create a Traces Integration
Using the ThousandEyes UI for Traces
In ThousandEyes, go to Manage > Integration 1.0.
Select +New Integration and select OpenTelemetry Integration.
Enter a Name for the integration.
Set the Target to HTTP.
For the Endpoint URL, enter the endpoint from your generated OpenTelemetry Collector Configuration and add
/v1/tracesto the end of your endpoint URL.For example,
https://otlp-gateway-prod-us-central-0.grafana.net/otlp/v1/traces.For Preset Configurations, select Grafana.
For Auth Type, select Basic.
Enter the username and password from your OpenTelemetry Collector Configuration.
For the OpenTelemetry Signal, select Trace.
Select a test.
For more information on creating a test, see General Setup Instructions.
Select Save.
Using the ThousandEyes API for Traces
Create the HTTP stream programmatically:
Replace {STREAM_ENDPOINT_URL} and <BASE64_ENCODED_GRAFANA_CREDENTIALS> with the correct values for your Grafana instance.
Step 2: Visualize Traces in Grafana
Go to Explore.
Select your tracing backend (Tempo).
Search for ThousandEyes trace entries by applying a filter such as:
{resource.thousandeyes.account.id=~".*"}

Stream OpenTelemetry Logs to Grafana
Step 1: Create a Logs Integration
Using the ThousandEyes UI for Logs
In ThousandEyes, go to Manage > Integration 1.0.
Select +New Integration and select OpenTelemetry Integration.
Enter a Name for the integration.
Set the Target to HTTP.
For the Endpoint URL, enter the endpoint from your generated OpenTelemetry Collector Configuration and add
/v1/logsto the end of your endpoint URL.For example,
https://otlp-gateway-prod-us-central-0.grafana.net/otlp/v1/logs.For Preset Configurations, select Grafana.
For Auth Type, select Basic.
Enter the username and password from your OpenTelemetry Collector Configuration.
For the OpenTelemetry Signal, select Log.
Select a test.
For more information on creating a test, see General Setup Instructions.
Select Save.
Using the ThousandEyes API for Logs
Create the HTTP stream programmatically:
Replace {STREAM_ENDPOINT_URL} and <BASE64_ENCODED_GRAFANA_CREDENTIALS> with the correct values for your Grafana instance.
Step 2: Visualize Logs in Grafana
In Grafana Cloud, go to Explore.
Select your logs data source (typically Loki).
Search for ThousandEyes log entries by applying a filter such as:
{service_name=~"unknown_service"} | thousandeyes_account_id=~".*" |= ""This filters logs that include a ThousandEyes account ID.

Last updated