OpenTelemetry Collector on a Host Enviroment

Refer to the following instructions for installing OpenTelemetry Collector on a Host Enviroment, such as BareMetal host or on a VM instance. Refer to the following sample yaml for configuration. Note that kf_platform with host as value is a required resource attribute. Also refer to OpenTelemetry Runtime Metrics for additional details regarding runtime metrics.

 

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 Level Metrics

The Kfuse APM Services page integrates with host metrics to show related infrastructure metrics.

Screenshot 2024-09-06 at 12.18.06 PM.png

The metrics can be exported into Kfuse using Datadog or from the OpenTelemetry collector itself.

 

If using OpenTelemetry Collector, the OpenTelemetry Collector needs to be updated with additional configurations. 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: "docker" 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, docker_stats, hostmetrics]