OpenTelemetry Collector on a Host Environment

To install OpenTelemetry Collector on a Host Environment, such as BareMetal host or on a VM instance, see OpenTelemetry documentation on how to Install the Collector.

Basic OpenTelemetry Deployment on Host Environments

When deploying OpenTelemetry Collector on a Host Environments, refer to Basic OpenTelemetry Integration on Host Environments.

Basic OpenTelemetry Integration on Host Environments
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: "host"
      action: upsert
  resourcedetection:
    detectors:
    - env
    - system
    - 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]
    logs:
      exporters: [otlphttp]
      processors: [batch, resource, resourcedetection]
      receivers: [otlp]

Host and System-Level Metrics

Kloudfuse APM Services integrate with host and System Metrics to show related infrastructure metrics. See Service Detail Infrastructure.

apm service detail infra

You can export these metrics using either Datadog agent, or the OpenTelemetry collector.

When using the OpenTelemetry Collector, you must update it with additional configurations. Specifically, enable hostmetrics receivers, add additional kf_metrics_agent resource attributes. See Enable Additional Attributes for System-Level Metrics.

Enable Additional Attributes for System-Level Metrics
receivers:
 ...
  hostmetrics:
    collection_interval: 30s
    scrapers:
      cpu:
        metrics:
          system.cpu.utilization:
            enabled: true
      memory:
        metrics:
          system.memory.utilization:
            enabled: true
      disk:
      filesystem:
        metrics:
          system.filesystem.utilization:
            enabled: true

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

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

Host-Level Metrics

The Kloudfuse APM Services page integrates with host metrics to show related infrastructure metrics. To see the infrastructure metrics, select a service, scroll down to the secondary horizontal menu, and select the Infra option.

Host metrics
Host Metrics

You can export these metrics into Kloudfuse using the Datadog agent, or from the OpenTelemetry collector itself. When using the OpenTelemetry Collector, you must update its configuration. Specifically, enable hostmetrics receivers, and add additional kf_metrics_agent resource attributes.

receivers:
 ...
  hostmetrics:
    collection_interval: 30s
    scrapers:
      cpu:
        metrics:
          system.cpu.utilization:
            enabled: true
      memory:
        metrics:
          system.memory.utilization:
            enabled: true
      disk:
      filesystem:
        metrics:
          system.filesystem.utilization:
            enabled: true

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

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