DataDog / documentation

The source for Datadog's documentation site.
http://docs.datadoghq.com
Other
474 stars 1.08k forks source link

Invalid example on Kubernetes Prometheus and OpenMetrics metrics collection page #24950

Closed RLProteus closed 2 months ago

RLProteus commented 2 months ago

Documentation Page

Kubernetes Prometheus and OpenMetrics metrics collection

Issue Description

The Advanced configuration example incorrectly uses a map for additionalConfigs when that field only supports the string type as defined here. Also see the example here.

Current doc:

apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  global:
    credentials:
      apiKey: <DATADOG_API_KEY>

  features:
    prometheusScrape:
      enabled: true
      enableServiceEndpoints: true
      additionalConfigs:
        - autodiscovery:
            kubernetes_container_names:
              - my-app
            kubernetes_annotations:
              include:
                app: my-app
          configurations:
            - timeout: 5
              send_distribution_buckets: true

Should be updated to:

apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  global:
    credentials:
      apiKey: <DATADOG_API_KEY>

  features:
    prometheusScrape:
      enabled: true
      enableServiceEndpoints: true
      additionalConfigs: |-
        - autodiscovery:
            kubernetes_container_names:
              - my-app
            kubernetes_annotations:
              include:
                app: my-app
          configurations:
            - timeout: 5
              send_distribution_buckets: true
RLProteus commented 2 months ago

PR opened https://github.com/DataDog/documentation/pull/24951

buraizu commented 2 months ago

@RLProteus thank you for reaching out and providing the detailed context. I've merged the linked PR and I'll close this for now, but please feel free to reopen if you have any further questions around this.