Skip to content

feat(gemini-cli): add Google Gemini CLI OpenTelemetry example#193

Open
prathamesh-sonpatki wants to merge 1 commit into
mainfrom
prathamesh/gemini-cli-otel-example
Open

feat(gemini-cli): add Google Gemini CLI OpenTelemetry example#193
prathamesh-sonpatki wants to merge 1 commit into
mainfrom
prathamesh/gemini-cli-otel-example

Conversation

@prathamesh-sonpatki
Copy link
Copy Markdown
Member

Summary

  • Adds gemini-cli/ example showing how to ship Google Gemini CLI telemetry to Last9
  • Two paths: direct OTLP HTTP from shell env, or via local Collector
  • Mirrors claude-code/, codex/, cline/, goose/ example layouts

Key facts about Gemini CLI

  • Uses GEMINI_TELEMETRY_* env vars for endpoint configuration
  • Underlying OTel JS SDK reads standard OTEL_EXPORTER_OTLP_HEADERS for auth — direct export works
  • Three signals: traces (opt-in), metrics, logs
  • Default temporality is cumulative
  • Built on opentelemetry-js SDK

Test plan

  • Verified end-to-end with gemini-cli 0.41.2: metrics + logs + traces all flow to Last9 via direct export
  • Reviewer to verify collector path with docker compose up

🤖 Generated with Claude Code

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>
@prathamesh-sonpatki prathamesh-sonpatki force-pushed the prathamesh/gemini-cli-otel-example branch from 6a9d748 to 3879829 Compare May 16, 2026 06:38
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