Skip to main content
API resource reference for ExportPolicy, part of the Telemetry service. To create or change one, see Changing resources; to inspect, see Reading resources.
This resource is part of the v1alpha1 API and is subject to change. Fields and behavior may change in future releases.

Identity

Grouptelemetry.miloapis.com
Versionv1alpha1
KindExportPolicy
ScopeProject

Overview

An ExportPolicy sends telemetry data collected on the Datum Cloud platform to a third-party telemetry platform. You define one or more sources that select which telemetry data to publish, and one or more sinks that describe where to send it and how to authenticate. Each sink references the sources it should forward. Use an ExportPolicy when you want your platform metrics to land in an external observability system, for example by pushing them to an endpoint that speaks the Prometheus Remote Write protocol. The control plane continuously evaluates the deployed exporters and reconciles them to match the policy. Note that delivery is not guaranteed, especially when a sink’s endpoint is unavailable, and telemetry matching multiple sources is not de-duplicated.

Spec fields

FieldTypeRequiredDescription
spec.sources[]ObjectYesThe telemetry sources to publish to the configured sinks. Multiple sources may be defined; matching data is not de-duplicated across sources.
spec.sources[].namestringYesA unique name for the source within the policy. Must be a valid DNS label.
spec.sources[].metricsObjectNoSelects metric data to retrieve from the Datum Cloud platform.
spec.sources[].metrics.metricsqlstringNoA MetricSQL query used to select and filter metric data to publish (e.g. {service_name="networking.miloapis.com", resource_kind="Gateway"}). See the MetricSQL reference.
spec.sinks[]ObjectYesHow telemetry data should be sent to third-party platforms.
spec.sinks[].namestringYesA name for the sink that is unique within the policy.
spec.sinks[].sources[]stringYesThe names of the sources whose data should be sent to this sink.
spec.sinks[].targetObjectYesThe target the sink delivers telemetry to.
spec.sinks[].target.prometheusRemoteWriteObjectNoPublishes telemetry using the Prometheus Remote Write protocol.
spec.sinks[].target.prometheusRemoteWrite.endpointstringYesThe HTTP endpoint to publish telemetry data to.
spec.sinks[].target.prometheusRemoteWrite.authenticationObjectNoHow the sink authenticates with the endpoint (e.g. basicAuth).
spec.sinks[].target.prometheusRemoteWrite.batchObjectYesHow telemetry is batched before sending. Defaults to every 5 seconds or 500 entries, whichever comes first.
spec.sinks[].target.prometheusRemoteWrite.retryObjectYesRetry behavior when requests to the endpoint fail. Retries are not guaranteed to succeed if the endpoint is unavailable or misconfigured.

Status fields (read-only)

FieldTypeDescription
status.conditions[]ObjectSummary status for the policy as a whole. Known condition types: Ready.
status.sinks[]ObjectPer-sink status information for each configured sink.

Usage

apiVersion: telemetry.miloapis.com/v1alpha1
kind: ExportPolicy
metadata:
  name: gateway-metrics
spec:
  sources:
    - name: gateway-metrics
      metrics:
        metricsql: '{service_name="networking.miloapis.com", resource_kind="Gateway"}'
  sinks:
    - name: prometheus
      sources:
        - gateway-metrics
      target:
        prometheusRemoteWrite:
          endpoint: https://metrics.example.com/api/v1/write
datumctl apply -f exportpolicy.yaml --project my-project
datumctl get exportpolicies --project my-project
datumctl describe exportpolicy gateway-metrics --project my-project
Run datumctl explain exportpolicies --recursive to see the full, live field tree for this resource.
Last modified on July 2, 2026