Telemetry Best Practices

Last verified 23 Nov 2026

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

DigitalOcean Insights lets you collect and analyze metrics, logs, and traces to monitor resource performance and troubleshoot issues. Configuring telemetry collection, sampling, and retention based on your monitoring needs helps you manage data volume and observability costs.

The following best practices can help you manage telemetry effectively.

Collect Relevant Telemetry

Collect telemetry based on the resources, workloads, and performance issues you want to monitor.

Each telemetry type serves a different purpose:

  • Metrics: Monitor resource utilization, performance trends, and changes over time.
  • Logs: Investigate events, errors, and application activity.
  • Traces: Examine individual requests and operations to identify latency, failures, and service interactions.

Not every workload requires all three telemetry types. Start with the data needed to monitor your resources and investigate issues, then enable additional collection as needed.

Platform metrics are available at no additional cost. For enhanced Droplet metrics, such as memory usage, disk usage, and load averages, install the DigitalOcean metrics agent.

Logs and traces count toward billable telemetry ingestion. To manage collection, enable or disable logs and traces for individual resources.

Available telemetry depends on the resource type and configuration. The Insights Telemetry Reference lists the metrics, log attributes, and trace attributes available for supported resources.

For more information about the telemetry types, see Understanding Insights Telemetry.

Configure Trace Sampling Based on Workload Activity

Trace sampling determines the percentage of traces retained from DigitalOcean-managed resources. Sampling helps control trace volume while maintaining visibility into request activity.

Insights supports sampling rates from 0% to 100%, with a default of 10%. We recommend starting with the default rate and adjusting it based on your workload and troubleshooting needs.

  • Higher sampling rates: Retain more traces for investigation but increase the volume of trace data.
  • Lower sampling rates: Reduce retained trace volume but may omit requests relevant to an investigation.

For example, you can temporarily increase the sampling rate when investigating intermittent latency or request failures, then reduce it after the investigation.

Avoid using very low sampling rates for workloads with infrequent requests or uncommon failures, as important traces may not be retained.

You can configure trace sampling in Insights settings. Changes take effect immediately.

Note

Trace sampling settings in Insights apply only to DigitalOcean-managed resources. For custom traces, configure sampling in your application using an OpenTelemetry SDK or Collector. See the OpenTelemetry sampling documentation for more information.

Configure Data Retention Based on Your Needs

Insights retains metrics, logs, and traces for 30 days at no additional cost. You can configure extended retention separately for each telemetry type.

Choose retention periods based on how frequently you investigate historical issues and how much data you need for analysis.

For example:

  • Standard retention: Use the included 30-day period for workloads that primarily require recent operational data.
  • Extended retention: Retain historical telemetry for investigating recurring issues, analyzing long-term trends, or meeting applicable retention requirements.

You can configure extended retention from one day to five years beyond the included 30 days. Select None to use only standard retention.

Extended retention incurs additional charges based on the volume of data stored beyond the included period. Before increasing retention, consider whether each telemetry type requires the same retention period.

For more information, see Insights Pricing.

Monitor Telemetry Ingestion and Costs

Telemetry ingestion can increase as workloads grow, traffic changes, or additional resources begin sending data.

Regularly review telemetry ingestion to identify which resources generate the most logs and traces.

We recommend reviewing ingestion after:

  • Enabling log or trace collection for additional resources.
  • Deploying applications that generate more telemetry.
  • Increasing trace sampling rates.
  • Adding custom instrumentation.
  • Making significant changes to workload traffic.

In Insights settings, the Data Ingestion section displays estimated log and trace ingestion by resource for the selected billing period. You can also download a CSV file to review usage.

Insights includes 5 GB of log and trace ingestion per month at no additional cost, shared across all projects within a billing team. Usage beyond the allowance incurs additional charges. Platform metrics do not count toward billable ingestion.

If you forward logs to an external destination, log forwarding charges apply in addition to telemetry ingestion charges.

For current rates and allowances, see Insights Pricing.

Use Labels and Attributes Consistently

Consistent labels and attributes make telemetry easier to search, filter, compare, and correlate across resources.

Use descriptive names for services, environments, and other relevant dimensions. For example, use consistent values such as development, staging, and production to distinguish application environments.

When configuring custom instrumentation:

  • Use consistent service names across related metrics, logs, and traces.
  • Include relevant resource and environment attributes to identify where telemetry originates.
  • Avoid high-cardinality metric labels, such as unique request IDs, which can create large numbers of distinct metric series.
  • Store request-specific identifiers in log or span attributes instead of metric labels.

For example, use service.name to identify an application service and deployment.environment to distinguish its deployment environment.

Avoid including credentials, authentication tokens, or other sensitive information in telemetry. Insights does not automatically scrub or redact ingested logs and traces, so remove or mask sensitive data before sending it.

Insights is not HIPAA-eligible, and you must not send protected health information (PHI) through any telemetry type. For more information, see Insights Data Protection.

Instrument Custom Telemetry private

Custom telemetry lets you send application metrics, logs, and traces to Insights using the OpenTelemetry Protocol (OTLP). You can correlate application behavior with infrastructure metrics from supported DigitalOcean resources.

Custom telemetry is in private preview and is billed under the same ingestion pricing as platform logs and traces. For setup instructions, see How to Send Custom Telemetry to DigitalOcean Insights.

The following practices help you collect and correlate custom telemetry.

Collect Application-Level Telemetry

Send telemetry that helps you investigate application behavior beyond the infrastructure metrics provided by DigitalOcean.

For example:

  • Metrics: Track application outcomes, request counts, error rates, and latency using counters and histograms.
  • Logs: Record application events and errors with relevant structured attributes.
  • Traces: Monitor requests across services to identify slow or failing operations.

For custom metrics, use delta temporality and dotted metric names, such as app.requests.completed. Do not use the do. prefix, which is reserved for platform metrics.

Avoid collecting unnecessary application data that increases ingestion volume without providing useful information for troubleshooting.

Configure Resource Attributes

Custom telemetry requires resource attributes that identify the service, DigitalOcean resource, owning team, and region.

Use the following attributes consistently:

  • service.name: Identifies the application or service generating telemetry.
  • resource.urn: Identifies the DigitalOcean resource that owns the telemetry.
  • resource.type: Identifies the DigitalOcean resource type.
  • tenant.urn: Identifies the team that owns the resource.
  • resource.region.slug: Identifies the region where the telemetry is sent.

For custom metrics, also include service.name as a metric label. Resource attributes alone do not make custom metrics filterable by service in the Metrics tab.

The region specified by resource.region.slug must match the region of the OTLP endpoint receiving the telemetry.

You can include optional attributes, such as service.version, service.namespace, and deployment.environment, to provide additional context during investigations.

Correlate Logs and Traces

Use trace context to connect related operations across services and associate application logs with individual requests.

We recommend:

  • Propagating the W3C traceparent header between instrumented services so related operations belong to the same trace.
  • Configuring application logging to include the trace_id and span_id from the active span.
  • Using consistent service and resource attributes across logs and traces.
  • Including relevant request identifiers in log and span attributes to make related events easier to find.

For example, you can search for an application error in the Logs tab, open its related trace, and inspect the spans to determine which operation failed.

To correlate custom telemetry with platform telemetry, ensure that the corresponding signals are enabled for the resource and that the required resource attributes are configured correctly.

Review Telemetry Configurations Regularly

Review telemetry collection, sampling, and retention settings as your infrastructure and monitoring requirements change.

Check whether:

  • Enabled telemetry types remain necessary for each resource.
  • Trace sampling rates provide sufficient data for investigations.
  • Retention periods align with operational requirements.
  • New resources generate the expected telemetry.
  • Ingestion and retention remain within your expected budget.

For example, temporary development workloads may not require the same telemetry collection or extended retention as production applications.

Use dashboards to visualize related metrics and investigate performance trends. Configure alerts to receive notifications when resource metrics meet conditions that require attention.

For information about supported configurations and restrictions, see Insights Limits.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.