Client telemetry
See which work your AI coding assistants' spend pays for, without changing how they reach their providers. The AI Data Plane runs in your own Kubernetes cluster. Tools such as Claude Code and GitHub Copilot CLI send it the usage data they already produce. CloudZero receives that data with all prompt and response content removed.
Use this guide if your AI tools call their providers directly, or to send a LiteLLM gateway's own telemetry to the AI Data Plane. To send your applications' AI requests through the AI Data Plane instead, use AI Data Plane gateway deployment.
Who you need: someone with admin access to your Kubernetes cluster runs Steps 1 to 5. Step 6 changes settings on the machines your AI tools run on, which your IT or device management team often handles; for a LiteLLM gateway, whoever runs the gateway makes the change.
The AI Data Plane is in preview. Coverage and capabilities are expanding. To get started, reach out to your account manager.
Overview
Connecting the AI Data Plane to your AI clients' telemetry takes seven steps:
- Set your installation values
- Install the cache operator
- Create the namespace and Secrets
- Install the chart
- Publish the telemetry intake
- Configure your AI clients
- Verify the deployment
Prerequisites
- A Kubernetes cluster running version 1.29 or later, with at least two nodes, and capacity for about 2.9 CPU and 4.8 GiB of memory in requests.
kubectlaccess to the cluster, and Helm 3.- An ingress your cluster already provides, to publish an in-cluster Service at a TLS-terminated URL on your private network.
- Outbound network access from the cluster to
telemetry.cloudzero.com(telemetry ingest),ai-control-plane.discovery.cloudzero.com(control plane),docker.cloudsmith.io(images), and your classification endpoint's host. Installing the Dragonfly operator in Step 2 also reachesraw.githubusercontent.comand the Dragonfly image registry. If you mirror images, mirror the Dragonfly image too. - A classification endpoint reachable from the cluster. After each turn, the AI Data Plane labels the work: the kind of work, plus the repository, branch, pull request, and work item when they appear. It does this with one small call per turn to a model you choose. CloudZero receives the labels, not the conversation. A turn is the set of requests to a model, and their responses, that one user prompt starts. The classification endpoint is where that call goes: your gateway, or your model provider's API, such as
https://api.anthropic.com. Use a credential scoped to that call, such as a LiteLLM virtual key or a provider API key. Classification makes one call per turn, and one per sub-agent, billed to your provider account. Measured turns average about 4,550 input tokens, about $0.0018 per turn on Claude Haiku 4.5.
Gather your credentials
| Credential | Where to get it | Where it is stored |
|---|---|---|
| CloudZero API key | In CloudZero, go to Settings > API Keys and create a key with the Send AI Telemetry scope | Secret cloudzero-api-key, data key value |
| Registry token | Your account manager, along with the chart version to install. CloudZero hosts the chart and images in a private registry, so you can't create this token yourself. | Used for helm registry login and the image pull Secret cloudsmith-pull |
| Classification credential | Created by you at your classification endpoint | Secret context-engine-gateway, data key token |
Step 1: Set your installation values
This guide installs the AI Data Plane Helm chart in otel mode, where no AI requests pass through the AI Data Plane and each client exports its OpenTelemetry traces and logs to it.
Every command in this guide uses these shell variables, so run every later step in the same terminal.
- Set the shell variables:
export NAMESPACE=cloudzero-data-plane
export RELEASE_NAME=czdp
export CHART=oci://docker.cloudsmith.io/cloudzero/cloudzero/cloudzero-data-plane
export CHART_VERSION=<CHART_VERSION>
export CLASSIFIER_HOST=<CLASSIFIER_HOST>
export CLASSIFIER_PORT=<CLASSIFIER_PORT>
export CLASSIFIER_TLS=false
export CLASSIFIER_CODEC=<CLASSIFIER_CODEC>
export MODEL=<MODEL>| Variable | What to set it to |
|---|---|
RELEASE_NAME | The default czdp works for most installations. If an inline release, the gateway installation, already runs in this namespace, use a different name, such as czdp-otel. |
CHART_VERSION | The chart version your account manager provided with your registry token. otel mode requires chart 0.2.0 or later. |
CLASSIFIER_HOST | Your classification endpoint's host, without https://. For an endpoint in this cluster, use its Service DNS name, <ENDPOINT_SERVICE>.<ENDPOINT_NAMESPACE>.svc.cluster.local. |
CLASSIFIER_PORT | The port your classification endpoint serves on. LiteLLM's default is 4000. |
CLASSIFIER_TLS | false for an in-cluster Service. For anything else, true, with CLASSIFIER_PORT set to its HTTPS port. |
CLASSIFIER_CODEC | The format your endpoint serves for classification calls: anthropic-messages (/v1/messages), openai-chat (/v1/chat/completions), or openai-responses (/v1/responses). |
MODEL | A model name your endpoint serves. Start with an inexpensive model, such as claude-haiku-4-5. |
For example, to classify with Anthropic's API at https://api.anthropic.com, set CLASSIFIER_HOST=api.anthropic.com, CLASSIFIER_PORT=443, CLASSIFIER_TLS=true, and CLASSIFIER_CODEC=anthropic-messages. Your classification credential in Step 3 is then a Claude API key scoped to one workspace.
Keep the other values as written.
- Store your registry token without printing it. Run this command, paste the token at the prompt, and press Enter:
read -rs REGISTRY_TOKENStep 2: Install the cache operator
The AI Data Plane's caches run on Dragonfly, an in-memory data store. The Dragonfly operator installs once per cluster, before the chart.
- Check whether the operator is installed:
kubectl get crd dragonflies.dragonflydb.ioIf the command lists dragonflies.dragonflydb.io, skip to Step 3.
- If the command returns
NotFound, install the operator and wait for it to register:
kubectl apply -f https://raw.githubusercontent.com/dragonflydb/dragonfly-operator/v1.6.1/manifests/dragonfly-operator.yaml
kubectl wait --for=condition=Established crd/dragonflies.dragonflydb.io --timeout=120sThe wait command prints condition met when the operator is ready.
Step 3: Create the namespace and Secrets
The chart reads its credentials from three Secrets. Only the names and data keys are fixed, so any secret management tool works. If a release already runs in this namespace, these Secrets exist. Skip to Step 4.
- Create the namespace:
kubectl create namespace "$NAMESPACE"- Store your CloudZero API key:
kubectl create secret generic cloudzero-api-key \
--namespace "$NAMESPACE" \
--from-literal=value='<CLOUDZERO_API_KEY>'- Create the image pull Secret. The username is always
cloudzero/cloudzero:
kubectl create secret docker-registry cloudsmith-pull \
--namespace "$NAMESPACE" \
--docker-server=docker.cloudsmith.io \
--docker-username=cloudzero/cloudzero \
--docker-password="$REGISTRY_TOKEN"- Store the classification credential. If your endpoint doesn't require one, store any non-empty value:
kubectl create secret generic context-engine-gateway \
--namespace "$NAMESPACE" \
--from-literal=token='<CLASSIFICATION_CREDENTIAL>'| Placeholder | Value |
|---|---|
<CLOUDZERO_API_KEY> | Your CloudZero API key |
<CLASSIFICATION_CREDENTIAL> | The credential you created at your classification endpoint for the AI Data Plane |
Step 4: Install the chart
- Log in to the registry:
helm registry login docker.cloudsmith.io \
--username cloudzero/cloudzero \
--password "$REGISTRY_TOKEN"- Write the values file:
cat > values.yaml <<EOF
unstable:
cloudZero:
existingSecretName: cloudzero-api-key
defaults:
image:
pullSecrets:
- cloudsmith-pull
components:
contextEngine:
enabled: true
mode: otel
classifier:
target:
host: $CLASSIFIER_HOST
port: $CLASSIFIER_PORT
tls: $CLASSIFIER_TLS
codec: $CLASSIFIER_CODEC
model: $MODEL
credentialSecret: context-engine-gateway
EOFSettings under
unstablecan change in any release. Before you install a different chart version, check this guide for changed settings.
- Install the chart:
helm upgrade --install "$RELEASE_NAME" "$CHART" \
--version "$CHART_VERSION" \
--namespace "$NAMESPACE" \
-f values.yamlHelm prints STATUS: deployed when the install succeeds.
Step 5: Publish the telemetry intake
The telemetry intake is the <RELEASE_NAME>-context-engine Service on port 4318. Clients outside the cluster, such as your users' computers, reach it at a hostname you publish with your ingress. Your ingress must:
- Route
/v1/traces,/v1/logs, and/v1/metricsto the<RELEASE_NAME>-context-engineService on port4318, without rewriting the path - Terminate TLS for your hostname and forward plaintext to the Service
- Accept request bodies up to 4 MiB
- Live in the AI Data Plane's namespace, if it is a Kubernetes
Ingress - Be reachable only from your own network, because the AI Data Plane doesn't authenticate the traffic it receives and clients send it prompt and response content
-
Publish the
<RELEASE_NAME>-context-engineService with an ingress that meets these requirements. -
From a machine outside the cluster, test the intake. Replace
<EXPOSED_HOST>with the hostname you published:
curl -sS -o /dev/null -w '%{http_code}\n' -X POST "https://<EXPOSED_HOST>/v1/metrics" \
-H 'Content-Type: application/json' -d '{}'A 200 means the path to the intake is open. To confirm classification, run a real turn in Step 7.
Step 6: Configure your AI clients
Each client, including a LiteLLM gateway, keeps sending its requests as it does today and exports its telemetry to the intake. Every client uses the endpoint https://<EXPOSED_HOST> and the protocol http/protobuf. Clients on users' machines also set user.email=<USER_EMAIL> in OTEL_RESOURCE_ATTRIBUTES.
| Client | Settings |
|---|---|
| Claude Code | CLAUDE_CODE_ENABLE_TELEMETRY=1CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1OTEL_TRACES_EXPORTER=otlpOTEL_LOGS_EXPORTER=otlpOTEL_METRICS_EXPORTER=noneOTEL_LOG_USER_PROMPTS=1 |
| GitHub Copilot CLI | COPILOT_OTEL_ENABLED=trueOTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true |
| LiteLLM | callbacks: ["otel"]turn_off_message_logging: falseIn the same cluster, the endpoint can be http://<RELEASE_NAME>-context-engine.<NAMESPACE>.svc.cluster.local:4318 |
Other clients are not supported in otel mode yet.
Claude Code needs both traces and logs. Without traces, its turns are classified, but no usage reaches CloudZero.
LiteLLM reads its two settings from litellm_settings in its proxy configuration, and the endpoint and protocol from its environment. See LiteLLM's OpenTelemetry integration. Without message logging on, LiteLLM's usage reaches CloudZero, but its turns aren't classified.
-
Set the endpoint, protocol, and the settings for each client in the environment the client starts in. For example, set the shared settings with
OTEL_EXPORTER_OTLP_ENDPOINT=https://<EXPOSED_HOST>andOTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf. -
For clients on users' machines, set each user's email address, so CloudZero can attribute each turn to the person who did the work:
export OTEL_RESOURCE_ATTRIBUTES="user.email=<USER_EMAIL>"To configure every Copilot CLI user at once, use Copilot's managed settings. See OpenTelemetry for Copilot agent monitoring. A managed settings file is the same for every user, so deliver OTEL_RESOURCE_ATTRIBUTES per user, for example through a shell profile your device management writes. For every Claude Code setting, see Claude Code monitoring.
Step 7: Verify the deployment
-
Run one real turn from a configured client.
-
In AI Signals, open the Livestream tab and confirm the turn appears with its classified activity. A turn is classified 5 minutes after its last span, and at most 20 minutes after its first span. A Copilot CLI turn can appear sooner, because its agent's root span ends the turn.
What to expect
The AI Data Plane registers with CloudZero when it starts and appears in Settings > AI Settings > Control Plane within a few minutes. Viewing it requires read permission for AI Signals. From then on, every configured client exports its telemetry to the intake while its requests go directly to its provider. Once your test turn appears, setup is complete.
Uninstall
Remove the release's workloads:
helm uninstall "$RELEASE_NAME" --namespace "$NAMESPACE"This leaves the coordinator identity Secrets (<RELEASE_NAME>-coordinator-identity and <RELEASE_NAME>-coordinator-gateway), the Secrets you created in Step 3, the Dragonfly operator and its custom resource definition (CRD), and a runtime Lease in the namespace. Delete those to remove everything. The device stays registered in CloudZero after you uninstall.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
helm registry login fails | The username isn't cloudzero/cloudzero, or the registry token is wrong or has been rotated | Log in with the username cloudzero/cloudzero. If it still fails, ask your account manager for a new token, and recreate the cloudsmith-pull Secret with it. |
Pods stay in ImagePullBackOff | The cloudsmith-pull Secret is missing or has the wrong username, or unstable.defaults.image.pullSecrets doesn't list it | Delete the Secret with kubectl delete secret cloudsmith-pull -n "$NAMESPACE", recreate it with the username cloudzero/cloudzero as in Step 3, and list it under unstable.defaults.image.pullSecrets. If you mirror images, also mirror cloudzero.com/envoy and the Dragonfly image. |
The intake test or a client gets 404 responses | The request reached the intake on the wrong path | Remove any path rewrite or prefix in your ingress. Give each client the endpoint without a path, because the exporter appends /v1/... itself. |
The intake test or a client gets 502 or 503 responses | Your ingress can't reach the intake | Confirm the ingress targets the <RELEASE_NAME>-context-engine Service on port 4318 from the AI Data Plane's namespace, and that the context engine pods are ready. |
If you need help, contact your account manager.
Related resources
- AI Data Plane: what the AI Data Plane does and how to monitor your deployment
- AI Data Plane architecture: how the AI Data Plane is deployed and what it touches, for your operations team to review
- AI Data Plane gateway deployment: the installation for applications that send AI requests through the AI Data Plane
- AI Data Plane telemetry schema: the generated context spans and gateway usage spans for an inline deployment
Have questions or feedback? Reach out to your account manager.
Updated about 23 hours ago

