---
title: How to Send Custom Telemetry to DigitalOcean Insights (private)
description: Custom telemetry sends your own application metrics, traces, and logs to DigitalOcean Insights using the OpenTelemetry Protocol (OTLP).
product: Insights
url: https://docs.digitalocean.com/products/insights/how-to/send-custom-telemetry/
last_updated: "2026-11-23"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# How to Send Custom Telemetry to DigitalOcean Insights (private)

DigitalOcean Insights provides metrics, logs, traces, dashboards, and alerts to help you monitor, analyze, and troubleshoot supported DigitalOcean resources.

**Warning**:

  DigitalOcean Insights is not a HIPAA-eligible service and is strictly excluded from DigitalOcean’s Business Associate Agreement (BAA). Customers are contractually prohibited from transmitting, storing, or processing Protected Health Information (PHI) within Insights via logs, traces, custom metrics, or log forwarding, even if originating from resources under an active BAA. For teams covered by a BAA, Insights blocks log and trace ingestion but does not block metrics, which remain permissible only to the extent they contain zero PHI.

  For more information, see [Insights Data Protection](https://docs.digitalocean.com/products/insights/details/data-protection/index.html.md).

**Note**:

  Platform-level operational metrics do not contain personal data. Logs and traces may contain personally identifiable information (PII), credentials, or other sensitive data emitted by your applications.

  Operational security follows DigitalOcean’s [Shared Responsibility Model](https://www.digitalocean.com/security/shared-responsibility-model). DigitalOcean secures the underlying infrastructure; customers maintain exclusive responsibility for telemetry contents emitted by their workloads and access control configurations.

  Ingested logs and traces do not undergo automatic scrubbing, masking, or redaction. Customers are solely responsible for removing or masking Personally Identifiable Information (PII), credentials, or sensitive data on the client side prior to ingestion.

  For more information, see [Insights Data Protection](https://docs.digitalocean.com/products/insights/details/data-protection/index.html.md).

DigitalOcean Insights custom telemetry lets you send your own application metrics, traces, and logs to Insights using the OpenTelemetry Protocol (OTLP). Custom telemetry appears alongside platform metrics from your DigitalOcean resources, so you can correlate application behavior with infrastructure health in one place.

**Note**:

  Custom telemetry is in [private preview](https://docs.digitalocean.com/platform/product-lifecycle/index.html.md#private-preview). To request access, [sign up for the private preview](https://docs.google.com/forms/d/1WmgTLWghAsUFOS27A6yQh996dv7aJ-Yqo-m8uXPb6yA/viewform).

  Custom telemetry is billed the same way as logs and traces and counts toward the same monthly ingestion allowance. For more information, see [Insights Pricing](https://docs.digitalocean.com/products/insights/details/pricing/index.html.md#telemetry-ingestion).

For recommendations on what to send and how to instrument your services so that metrics, logs, and traces correlate, see [Instrument Custom Telemetry](https://docs.digitalocean.com/products/insights/concepts/telemetry-best-practices/index.html.md#instrument-custom-telemetry).

To use custom telemetry, you need:

- Access to the custom telemetry private preview.
- An application instrumented with an [OpenTelemetry SDK](https://opentelemetry.io/docs/languages/) that can export over OTLP/HTTP.
- A supported DigitalOcean resource that runs the application, such as an App Platform app, Droplet, Managed Database, or DigitalOcean Kubernetes (DOKS) cluster.

## Create an API Token for Custom Telemetry

Insights authenticates custom telemetry using a DigitalOcean API token. [Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) with the `insights:custom_ingest` scope.

Store the token in an environment variable, such as `DO_API_TOKEN`, rather than in your application code.

## Configure the OpenTelemetry Exporter

Each Insights region has its own OTLP endpoint, `https://otlp-insights-<region>.digitalocean.com`, where `<region>` is the slug of the region your application runs in, such as `nyc3`. Signals are sent to the `/v1/metrics`, `/v1/traces`, and `/v1/logs` paths on that endpoint. Most OpenTelemetry SDKs append these paths automatically when you set the base endpoint.

To configure the exporter, set the following environment variables in your application’s environment, replacing `<region>` with your region slug:

```shell
export OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp-insights-<region>.digitalocean.com"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer $DO_API_TOKEN"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
export OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE="delta"
```

Custom metrics must meet the following requirements:

- **Send delta metrics.** Insights rejects cumulative metric values. Set `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` to `delta`, as shown in the configuration above.
- **Use dotted metric names.** Separate name segments with periods, such as `app.payment.declined`. Insights rejects names that use underscores as separators, such as `app_payment_declined`.
- **Do not use the `do.` prefix.** Metric names that start with `do.` are reserved for platform metrics.

The endpoint region must match the `resource.region.slug` attribute on your telemetry. Insights rejects data sent to an endpoint in a different region. For a list of regions, see [Insights Availability](https://docs.digitalocean.com/products/insights/details/availability/index.html.md).

## Set Resource Attributes

Every metric, trace, and log you send must include resource attributes that identify the service, the DigitalOcean resource it runs on, the owning team, and the region. Insights uses these attributes to link your telemetry to the resource, group it with platform metrics, and enable filtering in the DigitalOcean Control Panel.

The following resource attributes are required:

- **`service.name`:** The name of your application or microservice, such as `payment-service`. This is the primary identifier in the Control Panel. For metrics, also add `service.name` as a metric label. In the **Metrics** tab, resource attributes alone do not make metrics filterable.
- **`resource.urn`:** The Uniform Resource Name (URN) of the DigitalOcean resource that owns the telemetry, in the format `do:<resource-type>:<resource-id>`. For examples, see [Resource URN Format](#resource-urn-format).
- **`resource.type`:** The category of DigitalOcean resource: `app`, `droplet`, `dbaas`, or `kubernetes`. Insights uses this value to group your data with platform metrics.
- **`tenant.urn`:** The team that owns the resource, in the format `do:team:<team-id>`. Insights uses this value for access control and billing attribution.
- **`resource.region.slug`:** The slug of the DigitalOcean region where your application runs, such as `nyc3`, `sfo3`, or `ams3`. The value must match a supported Insights region and the region of the endpoint you send to.

You can also include the following optional resource attributes:

- **`service.version`:** The deployed version of your service, such as `1.4.2`.
- **`service.namespace`:** A logical grouping for services, such as an environment or team name.
- **`deployment.environment`:** The deployment environment: `prod`, `staging`, or `dev`.

### Resource URN Format

The `resource.urn` attribute uses the format `do:<resource-type>:<resource-id>`:

- **App Platform:** `do:app:<app-id>`, for web services, APIs, and workers.
- **Droplets:** `do:droplet:<droplet-id>`.
- **Managed Databases:** `do:dbaas:<database-cluster-id>`, for database clusters such as PostgreSQL and MySQL.
- **DigitalOcean Kubernetes:** `do:kubernetes:<cluster-id>`, for DOKS workloads.

### Example Resource Attributes

The following example sets resource attributes for a payment service running on App Platform, using the standard `OTEL_RESOURCE_ATTRIBUTES` environment variable:

```shell
export OTEL_RESOURCE_ATTRIBUTES="service.name=payment-service,service.version=1.4.2,resource.urn=do:app:<your-app-id>,resource.type=app,tenant.urn=do:team:<your-team-id>,resource.region.slug=nyc3,deployment.environment=prod"
```

To correlate metrics, logs, and traces, propagate trace context between services, emit logs inside active spans, and include `service.name` as a metric label. These practices help you filter telemetry by service and link related signals. For more information, see [Instrument Custom Telemetry](https://docs.digitalocean.com/products/insights/concepts/telemetry-best-practices/index.html.md#instrument-custom-telemetry).

## Enable Telemetry Signals for the Resource

Enable the metrics, logs, or traces signals for the resource that owns your telemetry, identified by its URN. You can update signals using the DigitalOcean CLI or API. For full details, see [Enable or Disable Telemetry Collection Using Automation](https://docs.digitalocean.com/products/insights/how-to/manage-telemetry-collection/index.html.md#enable-or-disable-telemetry-collection-using-automation).

### DigitalOcean CLI

To enable signals using the DigitalOcean CLI, use the `doctl insights resource update` command with the resource’s URN and the `--metrics`, `--logs`, or `--traces` flag set to `true`.

## How to Update Resource Signal Enablement Using the DigitalOcean CLI

1. [Install `doctl`](https://docs.digitalocean.com/reference/doctl/how-to/install/index.html.md), the official DigitalOcean CLI.
2. [Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with `doctl`.
3. Use the token to grant `doctl` access to your DigitalOcean account.

   ```shell
   doctl auth init
   ```
4. Finally, run `doctl insights resource update`. Basic usage looks like this, but you can [read the usage docs](https://docs.digitalocean.com/reference/doctl/reference/insights/resource/update/index.html.md) for more details:

   ```shell
   doctl insights resource update <resource-urn> [flags]
   ```

   The following example enables metrics and logs while disabling traces:

   ```shell
   doctl insights resource update do:droplet:12345 --region nyc3 --metrics=true --logs=true --traces=false
   ```

### DigitalOcean API

To enable signals using the DigitalOcean API, send the resource’s URN to the [Update Resource Signal Enablement](https://docs.digitalocean.com/reference/api/reference/insights/index.html.md#insights_update_resourceSignals) endpoint with `metrics`, `logs`, or `traces` set to `true`.

## How to Update Resource Signal Enablement Using the DigitalOcean API

[Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with the API.

### cURL

Send a PUT request to [`https://api.digitalocean.com/v2/insights/resources/{resource_urn}/signals`](https://docs.digitalocean.com/reference/api/reference/insights/index.html.md#insights_update_resourceSignals).

Using cURL:

```shell
curl -X PUT \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  -d '{"region":"nyc3","metrics":true,"logs":true}' \
  "https://api.digitalocean.com/v2/insights/resources/do:droplet:12345/signals"
```

After enabling the signals and sending telemetry, select the region where your telemetry was sent in the Control Panel to view your custom telemetry alongside platform telemetry in the following tabs:

- **Metrics:** In the **Metrics** tab, search for your custom metric names and filter by `service.name`. For more information, see [How to Explore and Query Metrics](https://docs.digitalocean.com/products/insights/how-to/explore-query-metrics/index.html.md).
- **Traces:** In the **Traces** tab, filter by status, service, or attribute, and expand a trace to investigate its spans. For more information, see [How to View Traces](https://docs.digitalocean.com/products/insights/how-to/view-traces/index.html.md).
- **Logs:** In the **Logs** tab, search and filter by log attributes, such as an order ID, and open related traces when available. For more information, see [How to View Logs](https://docs.digitalocean.com/products/insights/how-to/view-logs/index.html.md).

If your telemetry doesn’t appear, verify that the required resource attributes are included in each signal, that `resource.urn` identifies a resource with the corresponding signal enabled, and that the endpoint region matches `resource.region.slug`.