Skip to content

fix(docker-compose): fix hostmetrics mount layout, filesystem exclusions, and image version#195

Open
prathamesh-sonpatki wants to merge 3 commits into
mainfrom
prathamesh/fix-docker-compose-hostmetrics
Open

fix(docker-compose): fix hostmetrics mount layout, filesystem exclusions, and image version#195
prathamesh-sonpatki wants to merge 3 commits into
mainfrom
prathamesh/fix-docker-compose-hostmetrics

Conversation

@prathamesh-sonpatki
Copy link
Copy Markdown
Member

Summary

  • Replace split mounts (/proc:/hostfs/proc, /sys:/hostfs/sys, etc.) with single /:hostfs:ro,rslave — split mounts cause hostmetrics to build paths like /hostfs/snap/core18 that don't exist, producing ENOENT errors on every scrape cycle
  • Add exclude_fs_types for squashfs/snap/tmpfs/overlay/cgroup — eliminates snap loopback noise without per-revision exclusion rules
  • Fix exclude_mount_points patterns to match new single-mount layout (/hostfs/root/var/lib/docker/*/hostfs/var/lib/docker/.*)
  • Bump collector image 0.118.00.144.0
  • Update process: scraper comment to document TOCTOU limitation (ENOENT on /proc/<pid>/stat not muted by existing flags)
  • Add comment on when to use network_mode: host for prometheus scraping of host-networked containers

Test plan

  • Run docker compose -f otel-compose.yaml up -d on Ubuntu Linux VM
  • Verify no ENOENT errors in collector logs for /hostfs/snap or /hostfs/boot
  • Verify hostmetrics flowing: system_cpu_utilization_ratio, system_memory_usage_bytes, system_filesystem_utilization_ratio
  • Verify container metrics flowing: container_cpu_utilization_ratio

🤖 Generated with Claude Code

prathamesh-sonpatki and others added 3 commits May 16, 2026 12:08
Send Gemini CLI telemetry — traces, metrics, and logs — to Last9 via
OpenTelemetry. Two paths documented:

- Direct: GEMINI_TELEMETRY_* env vars set endpoint; standard
  OTEL_EXPORTER_OTLP_HEADERS provides auth (picked up by underlying
  OpenTelemetry JS SDK even though gemini-cli does not pass headers
  explicitly to its OTLP exporters).
- Local OTel Collector: useful for batching or fan-out.

Traces are opt-in via GEMINI_TELEMETRY_TRACES_ENABLED=true.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Demonstrates dual-pipeline filterprocessor approach for handling delta
and cumulative OTLP metrics across multi-replica collectors:

- nginx round-robin simulates K8s Service load-balancing
- filter/keep_delta + setshardkey + deltatocumulative per-pod isolation
- filter/keep_cumulative passthrough (SDK owns the counter)
- metrics/delta_broken pipeline shows undercount without setshardkey
- verify.sh queries local VictoriaMetrics for series count sanity check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…usions

- Replace split mounts with single /:hostfs:ro,rslave to prevent ENOENT
  errors when hostmetrics prepends /hostfs to /proc/mounts paths
- Add exclude_fs_types for squashfs/snap/tmpfs/overlay to eliminate snap
  loopback noise without per-revision exclusion rules
- Fix exclude_mount_points patterns to match new single-mount layout
- Bump image to otel/opentelemetry-collector-contrib:0.144.0
- Update process: scraper comment to document TOCTOU limitation
- Add comment on when to use network_mode: host for prometheus scraping

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant