Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions content/en/containers/kubernetes/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,35 @@ The `ad_identifiers` parameter takes a list, so you can supply multiple containe
`<LOGS_CONFIG>`
: The configuration parameters listed under `logs` in your integration's `<INTEGRATION_NAME>.d/conf.yaml.example` file.

### Advanced annotation parameters

In addition to the core Autodiscovery annotations for checks, logs, and instances, you can use additional annotations to customize check behavior:

#### Tag cardinality

Set the tag cardinality level for a specific check using the `check_tag_cardinality` annotation. This overrides the global Agent tag cardinality setting for metrics collected by that check.

```yaml
apiVersion: v1
kind: Pod
metadata:
name: '<POD_NAME>'
annotations:
ad.datadoghq.com/<CONTAINER_NAME>.checks: |
{
"<INTEGRATION_NAME>": {
"init_config": <INIT_CONFIG>,
"instances": [<INSTANCES_CONFIG>]
}
}
ad.datadoghq.com/<CONTAINER_NAME>.check_tag_cardinality: "<low|orchestrator|high>"
spec:
containers:
- name: '<CONTAINER_NAME>'
```

For more information about tag cardinality, see [Per-check tag configuration][27].

### Auto-configuration

The Datadog Agent automatically recognizes and supplies basic configuration for some common technologies. For a complete list, see [Autodiscovery auto-configuration][20].
Expand Down Expand Up @@ -673,3 +702,4 @@ For more examples, including how to configure multiple checks for multiple sets
[24]: /containers/guide/autodiscovery-examples
[25]: /integrations/istio/
[26]: /integrations/postgres
[27]: /getting_started/integrations/#per-check-tag-configuration
51 changes: 49 additions & 2 deletions content/en/getting_started/integrations/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,16 @@ To better unify your environment, it is also recommended to configure the `env`
You can customize tag behavior for individual checks, overriding the global Agent-level settings:

1. **Disable Autodiscovery tags**

By default, the metrics reported by integrations include tags automatically detected from the environment. For example, the metrics reported by a Redis check that runs inside a container include tags associated with the container, such as `image_name`. You can turn this behavior off by setting the `ignore_autodiscovery_tags` parameter to `true`.

1. **Set tag cardinality per integration check**

You can define the level of tag cardinality (low, orchestrator, or high) on a per-check basis using the `check_tag_cardinality` parameter. This overrides the global tag cardinality setting defined in the Agent configuration.

{{< tabs >}}
{{% tab "Configuration file" %}}

```yaml
init_config:
# Ignores tags coming from autodiscovery
Expand All @@ -126,6 +129,50 @@ check_tag_cardinality: low
# Rest of the config here
```

{{% /tab %}}
{{% tab "Kubernetes annotations" %}}

For containerized environments using Kubernetes, you can set these parameters through [Autodiscovery annotations][1]:

```yaml
apiVersion: v1
kind: Pod
metadata:
name: redis-app
annotations:
ad.datadoghq.com/redis.checks: |
{
"redisdb": {
"init_config": {},
"instances": [
{
"host": "%%host%%",
"port": 6379
}
]
}
}
ad.datadoghq.com/redis.check_tag_cardinality: "low"
spec:
containers:
- name: redis
image: redis:latest
```

The supported annotation format is:
```
ad.datadoghq.com/<CONTAINER_NAME>.check_tag_cardinality: "<CARDINALITY_LEVEL>"
```

Where `<CARDINALITY_LEVEL>` can be `low`, `orchestrator`, or `high`.

[1]: /containers/kubernetes/integrations/?tab=annotations#configuration

{{% /tab %}}
{{< /tabs >}}

<div class="alert alert-info">The <code>check_tag_cardinality</code> parameter only affects metrics collected by integration checks. It does not affect metrics sent through DogStatsD. To configure DogStatsD tag cardinality, use the global <code>dogstatsd_tag_cardinality</code> configuration parameter or the <code>DD_DOGSTATSD_TAG_CARDINALITY</code> environment variable.</div>

### Validation

To validate your Agent and integrations configuration, [run the Agent's `status` subcommand][28], and look for new configuration under the Checks section.
Expand Down
Loading