Otel-K8attributes Configmap

apiVersion: v1

data:

  relay: |

    exporters:

      debug: {}

      otlp:

        endpoint: instana-agent.instana-agent.svc.cluster.local:4317

        tls:

           insecure: true

    extensions:

      health_check:

        endpoint: ${env:MY_POD_IP}:13133

    processors:

      batch: {}

      k8sattributes:

        extract:

          metadata:

          - k8s.namespace.name

          - k8s.deployment.name

          - k8s.statefulset.name

          - k8s.daemonset.name

          - k8s.cronjob.name

          - k8s.job.name

          - k8s.node.name

          - k8s.pod.name

          - k8s.pod.uid

          - k8s.pod.start_time

        filter:

          node_from_env_var: K8S_NODE_NAME

        passthrough: false

        pod_association:

        - sources:

          - from: resource_attribute

            name: k8s.pod.ip

        - sources:

          - from: resource_attribute

            name: k8s.pod.uid

        - sources:

          - from: connection

      resource:

        attributes:

         - key: server.address

           from_attribute: net.host.name

           action: insert

         - key: server.port

           from_attribute: net.host.port

           action: insert

         - key: service.name

           value: nvidia-dcgm

           action: update

         - key: INSTANA_PLUGIN

           value: dcgm

           action: insert

      memory_limiter:

        check_interval: 5s

        limit_percentage: 80

        spike_limit_percentage: 25

    receivers:

      filelog:

        exclude:

        - /var/log/pods/otel-collector_otel-collector-opentelemetry-collector*_*/opentelemetry-collector/*.log

        include:

        - /var/log/pods/*/*/*.log

        include_file_name: false

        include_file_path: true

        operators:

        - id: container-parser

          max_log_size: 102400

          type: container

        retry_on_failure:

          enabled: true

        start_at: end

      jaeger:

        protocols:

          grpc:

            endpoint: ${env:MY_POD_IP}:14250

          thrift_compact:

            endpoint: ${env:MY_POD_IP}:6831

          thrift_http:

            endpoint: ${env:MY_POD_IP}:14268

      kubeletstats:

        auth_type: serviceAccount

        collection_interval: 20s

        endpoint: ${env:K8S_NODE_NAME}:10250

      otlp:

        protocols:

          grpc:

             endpoint: ${env:MY_POD_IP}:4317

          http:

              endpoint: ${env:MY_POD_IP}:4318

      prometheus:

        config:

          scrape_configs:

          - job_name: opentelemetry-collector

            scrape_interval: 10s

            static_configs:

            - targets:

              - ${env:MY_POD_IP}:8888

          - job_name: 'nvidia-dcgm'

            scrape_interval: 10s

            static_configs:

            - targets: ['nvidia-dcgm-exporter.gpu-operator.svc.cluster.local:9400']

      zipkin:

        endpoint: ${env:MY_POD_IP}:9411

    service:

      extensions:

      - health_check

      pipelines:

        logs:

          exporters:

          - otlp

          processors:

          - k8sattributes

          - memory_limiter

          - batch

          receivers:

          - otlp

          - filelog

        metrics:

          exporters:

          - otlp

          processors:

          - k8sattributes

          - memory_limiter

          - batch

          receivers:

          - otlp

          - prometheus

          - kubeletstats

        traces:

          exporters:

          - otlp

          processors:

          - k8sattributes

          - resource

          - memory_limiter

          - batch

          receivers:

          - otlp

          - jaeger

          - zipkin

      telemetry:

        metrics:

          address: ${env:MY_POD_IP}:8888

        logs:

           level: debug

kind: ConfigMap

metadata:

  annotations:

    meta.helm.sh/release-name: otel-collector

    meta.helm.sh/release-namespace: otel-collector

  creationTimestamp: "2024-09-11T06:33:21Z"

  labels:

    app.kubernetes.io/instance: otel-collector

    app.kubernetes.io/managed-by: Helm

    app.kubernetes.io/name: opentelemetry-collector

    app.kubernetes.io/version: 0.108.0

    helm.sh/chart: opentelemetry-collector-0.104.0

  name: otel-collector-opentelemetry-collector-agent

  namespace: otel-collector

  resourceVersion: "1446986"

  uid: 7cd6d110-cf60-492b-bd4f-4726dbcb39a2