Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Grafana Cloud destination


(new)

Beta

Data Destinations is currently available as a Private Beta product and the information contained in this document is subject to change. Data Destinations is not a HIPAA Eligible Service or PCI compliant and should not be enabled in workflows that are subject to HIPAA or PCI. To learn more, see Private beta legal information.

Grafana Cloud(link takes you to an external page) provides hosted log aggregation, search, and alerting built on Grafana Loki, letting you turn Twilio events into searchable log streams for real-time visibility. This destination supports only the hosted Grafana Cloud Loki endpoint. A self-hosted Grafana or Loki deployment on a private network isn't supported.

Destination overview

destination-overview page anchor
  • Category: Analytics, Performance monitoring
  • Release status: Beta
  • Authentication: Basic authentication
  • Regional availability: US1
Join the Data Destinations private beta

Get early access to native destinations for data warehouses, observability tools, and event pipelines.

Sign up(link takes you to an external page)

Eligible events

eligible-events page anchor

You can send all event types supported by Event Streams to Grafana Cloud. This destination has no user-identifier restriction.


Before you set up a Grafana Cloud destination, make sure you have:

  • A Grafana Cloud account with a Loki-enabled stack.
  • Your Grafana Cloud Instance ID (Loki tenant ID), found in your Grafana Cloud stack details, in the Loki section.
  • A Grafana Cloud Access Policy Token with the logs:write scope, created under Access Policies in your Grafana Cloud account.
  • Your stack's Loki URL (region-specific, for example, https://logs-prod-us-central1.grafana.net), also found in your stack details.

(information)

Info

See Set up a destination for the full UI and Destinations API setup flow common to every destination type.

To create a Grafana Cloud destination in the Twilio Console:

  1. From your Grafana Cloud account, gather the settings listed in Destination settings.
  2. In the Twilio Console, go to Data > Data Destinations > Destinations > Add destination subscription.
  3. Complete the Add destination subscription wizard.

To create a Grafana Cloud destination through the Destinations API, send a POST request to the Destinations endpoint and set destinationType to grafana-cloud. For authentication and the other request body fields, see Create a destination.

Create a destination

create-a-destination page anchor
POST "https://destinations.twilio.com/v1/ControlPlane/Destinations"

Set the config object in the request body as follows:

NameTypeDescription
credentials.credentialType
(Required)
stringSet to BASIC.
credentials.apiToken
(Required)
stringThe Grafana Cloud access policy token that authenticates requests to Loki.
credentials.userId
(Required)
stringYour Grafana Cloud Loki instance ID (log tenant ID). Twilio uses it as the HTTP Basic authentication username.
lokiUrl
(Required)
stringYour Grafana Cloud Loki base URL, for example https://logs-prod-us-central1.grafana.net. The URL is region-specific and has no trailing slash. Twilio appends the push path automatically.

The following example shows a request body. Replace the uppercase placeholder values with your own.

1
{
2
"destinationType": "grafana-cloud",
3
"name": "My Grafana Cloud destination",
4
"config": {
5
"credentials": {
6
"credentialType": "BASIC",
7
"apiToken": "API_TOKEN",
8
"userId": "USER_ID"
9
},
10
"lokiUrl": "LOKI_URL"
11
}
12
}

Use grafana-cloud as the destinationType.

FieldDescriptionRequiredDefault or choices
Instance IDYour Grafana Cloud Loki instance ID (log tenant ID), used as the HTTP Basic Auth username. Found in your Grafana Cloud stack details, Loki section.YesNone
Access Policy TokenYour Grafana Cloud access policy token, used as the HTTP Basic Auth password. Needs the logs:write scope. Sensitive: entered once and stored encrypted.YesNone
Loki URLYour Grafana Cloud Loki base URL (region-specific, for example, https://logs-prod-us-central1.grafana.net). No trailing slash.YesNone

Twilio authenticates to Grafana Cloud Loki by using HTTP Basic Auth, with your Instance ID as the username and your Access Policy Token as the password. Twilio stores these credentials encrypted, and they never appear in event payloads.


FieldGrafana Cloud field
Event typeStream label type
Event timeLog entry timestamp (Unix epoch nanoseconds)
Event payloadLog line (full event, JSON)

Verification and troubleshooting

verification-and-troubleshooting page anchor

When you save a Grafana Cloud destination, Twilio validates your Instance ID and Access Policy Token with a test write to Grafana Cloud Loki. This validation write ingests no data, so it doesn't appear in your logs.

Twilio doesn't currently offer a way to manually trigger a test event for this destination, from either the Console or the CLI. To confirm delivery works, wait for a real event of a subscribed type to occur.

CauseWhat you'll seeFix
Invalid Instance ID or Access Policy TokenValidation fails with an auth errorRe-check your credentials in Grafana Cloud and update the destination
Access Policy Token missing logs:write scopeValidation fails with an auth errorCreate or update the token to include logs:write
Wrong or unreachable Loki URLValidation fails, or delivery errors reported in the DebuggerConfirm your stack's Loki URL from Grafana Cloud stack details
Grafana Cloud rate-limiting your accountDelivery errors reported in the DebuggerReduce volume or ask Grafana Support to raise your ingestion rate limit
Grafana Cloud returns a custom 260 status (tenant ingestion blocked)Delivery errors reported in the Debugger; not retriedThis is a permanent, account-level block. Contact Grafana Support to turn ingestion back on for your tenant

If Twilio can't deliver events to your destination, Twilio sends an error notification to the Debugger (available in US1 region only). If Twilio continues to encounter delivery errors, Twilio notifies you every 20 minutes after the initial error.