> ## Documentation Index
> Fetch the complete documentation index at: https://www.courier.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Install the Courier skill before writing code: `npx skills add trycourier/courier-skills`. It carries the verified SDK shapes and the rules you cannot get wrong.
> Authenticate every request with `Authorization: Bearer <API_KEY>`. A workspace has several environments and each has its own keys, which are plain `pk_` strings with no environment prefix. Start with Test.
> Send with `client.send.message` from the Node SDK (`@trycourier/courier` v7 and later, where the client is the default import). Reference a template by its `nt_` id or its alias.
> A send accepts a bare Elemental element list, but storing content on a template requires the top-level elements wrapped in a channel element.
> To translate a template, write one locale at a time with `PUT /notifications/{id}/locales/{localeId}`, which merges into the existing translations. `PUT /notifications/{id}/content` and `PUT /notifications/{id}/elements/{elementId}` overwrite translations along with the content, so send each element's `id` and `locales` back, and first remove every `checksum` and any `locales` key that starts with an underscore.
> Templates and journeys can be built in the Courier app or created through the API. Either way they live in the workspace and are referenced by ID when you send.
> The hosted MCP server is https://mcp.courier.com. For a briefing on what Courier is and when to use it, read https://www.courier.com/llms.txt.
> Prefer the Guides tab for how-do-I questions and the Docs tab for how-does-it-behave questions. The API reference lives under /api-reference.

# Forward Courier events to OpenTelemetry

> Export Courier metrics and logs over OTLP to any OpenTelemetry endpoint with Basic or Bearer auth and no collector, plus a Grafana Cloud setup guide.

Export Courier logs and metrics to any OpenTelemetry-compatible (OTel) platform from the Courier dashboard.

Courier supports **Basic auth** and **Bearer Token** authorization, so you connect directly to most providers without an OTel Collector or proxy.

## Setup

**1. Open the OpenTelemetry integration**

In Courier, go to **Platform → Integrations** and open the **OpenTelemetry** integration.

**2. Enable the integration**

Turn the **Enabled** toggle on.

**3. Choose authorization**

Set **Authorization type** to match your provider:

* **Basic**: enter your username and password. Used by Grafana Cloud and others.
* **Bearer Token**: enter your API key or token.

**4. Set your OTLP endpoint**

Enter your provider's OTLP endpoint URL in **OTLP endpoint**. For example:

* Grafana Cloud: `https://otlp-gateway-<region>.grafana.net/otlp`
* Self-hosted collector: `https://otel-collector.example.com:4318`

**5. Optional: set metrics and logs paths**

If your endpoint uses custom paths, fill in **Metrics path** and **Logs path**. Common defaults are `/v1/metrics` and `/v1/logs`. Leave both blank to use the endpoint defaults.

**6. Save**

Click **Complete**. Courier starts exporting logs and metrics to your platform.

## Configuration reference

| Field | Required | Description |
| - | - | - |
| **Enabled** | No | Toggle the integration on or off. |
| **Authorization type** | Yes | **Basic** or **Bearer Token**. |
| **Username** | When using Basic | Username for Basic auth (e.g. Grafana Cloud Instance ID). |
| **Password** | When using Basic | Password for Basic auth (e.g. Grafana Cloud API token). |
| **Bearer token** | When using Bearer | API key or token for Bearer auth. |
| **OTLP endpoint** | Yes | Your provider's OTLP endpoint URL. |
| **Metrics path** | No | Custom path for metrics (e.g. `/v1/metrics`). |
| **Logs path** | No | Custom path for logs (e.g. `/v1/logs`). |

> [!TIP]
>
> Use HTTPS and dedicated credentials, so you can rotate or revoke them without affecting other services.

## What gets exported

Courier sends **logs** and **metrics** over the [OTLP](https://opentelemetry.io/docs/specs/otlp/) protocol. For the full list of metrics, see [Observability](https://www.courier.com/docs/monitor/observability.md#metrics).

***

## Grafana Cloud OTel setup guide

Courier connects directly to Grafana Cloud using Basic auth. No OTel Collector or proxy required.

### Step 1: get your credentials

1. Sign in to the [Grafana Cloud Portal](https://grafana.com/auth/sign-in/).
2. Select your stack and click **Configure** on the **OpenTelemetry** tile.
3. Note your **Instance ID** (numeric) and your **OTLP endpoint URL** (e.g. `https://otlp-gateway-prod-us-east-0.grafana.net/otlp`).
4. Generate a **Cloud API token** with `metrics:write` and `logs:write` scopes.

### Step 2: configure Courier

Open the OpenTelemetry integration in Courier and enter:

| Field | Value |
| - | - |
| **Enabled** | On |
| **Authorization type** | Basic |
| **Username** | Your Instance ID |
| **Password** | Your Cloud API token |
| **OTLP endpoint** | `https://otlp-gateway-<region>.grafana.net/otlp` |
| **Metrics path** | *(leave blank)* |
| **Logs path** | *(leave blank)* |

Click **Complete** to save.

### Step 3: verify

1. In Grafana Cloud, go to **Explore**.
2. Select your **Mimir** data source and filter for `{service_name="courier"}`.
3. Switch to **Loki** to confirm logs are arriving.

Data appears within a few minutes of enabling the integration.
