Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
receivers:
  otlp:
    protocols:
      grpc:
      http:
        cors:
          allowed_origins:
            - "http://*"
            - "https://*"

exporters:
  otlphttp:
    logs_endpoint: https://<REPLACE WITH KFUSE ADDRESS>/ingester/otlp/v1/logs
    metrics_endpoint: https://<REPLACE WITH KFUSE ADDRESS>/ingester/otlp/metrics
    traces_endpoint: https://<REPLACE WITH KFUSE ADDRESS>/ingester/otlp/traces

processors:
  batch:
    timeout: 10s
  resource:
    attributes:
    - key: kf_platform
      value: "docker"
      action: upsert
  resourcedetection:
    detectors:
    - env
    - docker
    - ec2
    - gcp
    - azure
    override: true
    timeout: 2s

connectors:
  spanmetrics:

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch, resource, resourcedetection]
      exporters: [otlphttp]
    metrics:
      exporters: [otlphttp]
      processors: [batch, resource, resourcedetection]
      receivers: [otlp]

Notes on docker resource detector

The docker resource detector ensures that the host machines hostname is used as the host.name resource attributes. This requires the open telemetry collector to have permissions to read from the docker.sock file. When running the open telemetry collector as part of docker-compose, add the following configuration in the section for open telemetry collector.

Code Block
    volumes:
      ...
      - type: bind
        source: /var/run/docker.sock
        target: /var/run/docker.sock
        read_only: True
    user: 10001:<REPLACE GROUP>

The group is the group of the docker.sock file. This can be obtained by running the following command

Code Block
stat -c '%g' /var/run/docker.sock