Skip to main content
This page covers three questions that come up once the Datadog agent runs on a Qovery cluster. To install the agent, follow Datadog first.

Services show up as app-z1234abcd in Datadog

In Datadog, kube_service, container_name and similar tags carry the Kubernetes names Qovery generates, such as app-z1a2b3c4d, not the names you gave your services. Dashboards are hard to read, and filtering by team or environment is not possible.

Fix: add Unified Service Tagging labels

Attach the Datadog standard labels to your services with Labels & Annotations:
  1. Go to Organization Settings, then Labels & Annotations, and add a label group with: Add your own labels too, for example team: payments.
  2. Assign the label group to the service.
  3. Redeploy the service. Labels are applied at deployment.
Datadog then sets the service, env and version tags on the metrics, logs and traces of the service. See Unified Service Tagging. Label groups apply to applications, cron jobs, lifecycle jobs and databases. For a Helm service, set the labels in the values of the chart.

Alternative: turn environment variables into tags

The Datadog agent can also copy environment variables of a container into tags. This was the usual workaround before labels were available, and it still works. In the values of your Datadog Helm service:
Create the SERVICE_DISPLAY_NAME and TEAM variables on your services, redeploy them, then redeploy the Datadog service. These tags are attached to containers, not to pods, so pod-level views in Datadog do not show them.

Logs are missing or the deployment fails after adding a Datadog log annotation

You added a Datadog autodiscovery annotation to a service, for example:
and Datadog does not collect the logs as configured, or the service no longer deploys.

Logs are missing or untagged

The Datadog agent reads the annotation after the pod starts. A mistake in it changes what the agent collects, not how the pod is scheduled or becomes ready. Check these points in the annotation group:
  • The key names the container. The part between ad.datadoghq.com/ and .logs must be the name of the container in the pod, not the name of the service in Qovery. Get it with kubectl get pod <pod-name> -n <namespace> -o jsonpath='{.spec.containers[*].name}'.
  • The value is valid JSON. It must be a JSON array, with double quotes around every key and string. A trailing comma or single quotes make it invalid.
  • The scope is right. Datadog reads autodiscovery annotations on pods. Set the scope of the annotation group to pods.
Then redeploy the service. See Datadog Autodiscovery Annotations.

The deployment fails

The agent does not take part in the rollout, so look for the cause in the deployment itself. Open the deployment logs and the Kubernetes events of the service, and read the first error line. If it mentions the annotation, Kubernetes rejected its key: a key is an optional prefix, a /, and a name of at most 63 characters made of letters, digits, -, _ and ..

Uninstall the Datadog agent

How you remove the agent depends on how it was installed. Installed as a Qovery Helm service (the method in the Datadog guide): stop the Datadog Helm service, then delete it (three-dot menu, Remove helm). Deleting a Helm service removes all the Kubernetes resources created by the chart. From the CLI: qovery helm stop -n <datadog-service> --watch, then qovery helm delete -n <datadog-service> --watch. These commands use the organization, project and environment selected with qovery context set; run it first, or add --organization, --project and --environment. See Delete a Helm service. Installed by hand with Helm or kubectl: connect to the cluster (see Connect to your cluster) and remove it the same way:
If the release is gone but agent pods remain, and the namespace contains nothing else, delete the namespace:
After removing the agent, remove the Datadog labels and annotations you no longer need, and the DD_* variables of your services, then redeploy them.

Still stuck?

Contact Qovery support from the Console: click the help button at the bottom right, then Contact Support. You can also post in your dedicated Slack channel. Include the Console URL of the service, the deployment ID or the time of the error, and the error line from the logs. See Help and Support.