gemini-cli는 프로젝트 수정 전에 checkpoint를 만든다. check-point는 git-snapshot, chat conversation, Tool call 정보를 저장하고 있으며 저장 위치는 다음과 같다
~/.gemini/tmp/<project_hash>/checkpoints
checkpoint 활성화
checkpoint option을 활성화하기 위해서는 settings.json에 다음과 같이 작성해야한다."checkpointing": { "enabled": true }
checkpoint 사용
checkpoint는 restore 옵션으로 사용할 수 있다./restore <checkpoint_file> #예시 /restore 2025-06-22T10-00-00_000Z-my-file.txt-write_file
gemini-cli는 opentelemetry(OTEL)를 지원한다.
local 환경에서는 OTEL과 jaeger를 사용해서 log를 받는 것을 추천하고 있다.
default 값은 다음과 같다.
telemetry.enabled: false
telemetry.target: local
telemetry.otlpEndpoint: http://localhost:4317
telemetry.logPrompts: true
실습환경을 반영해서 작성하면,#set endpoint to local "telemetry": { "enabled": true, "target": "local", "otlpEndpoint": "http://localhost:4317", "logPrompts": "true" }
#after you find gemini dir by using $ npm config list --json | grep prefix # do below command line in dir containing package.json # in my case dir was in "/home/user1/.nvm/versions/node/v18.20.8/lib/node_modules/@google/gemini-cli" ------------------------------------------------------- $ npm run telemetry -- --target=local #at gemini workplace $ gemini telemetrylocal에서는 해당 command를 작성하면 otelcol-contrib (the OpenTelemetry Collector)와 jaeger가 설치된다.
http://localhost:16688
에 접근하면 jaeger UI에 접근하여 trace를 확인할 수 있다.~/.gemini/tmp/<projectHash>/otel/collector.log로그들은 모두 여기에 저장된다.
로그
- gemini_cli.config: This event occurs once at startup with the CLI's configuration.
- gemini_cli.user_prompt: This event occurs when a user submits a prompt.
- gemini_cli.tool_call: This event occurs for each function call.
- gemini_cli.api_request: This event occurs when making a request to Gemini API.
- gemini_cli.api_error: This event occurs if the API request fails.
- gemini_cli.api_response: This event occurs upon receiving a response from Gemini API.
메트릭
- gemini_cli.session.count (Counter, Int): Incremented once per CLI startup.
- gemini_cli.tool.call.count (Counter, Int): Counts tool calls.
- gemini_cli.tool.call.latency (Histogram, ms): Measures tool call latency.
- gemini_cli.api.request.count (Counter, Int): Counts all API requests.
- gemini_cli.api.request.latency (Histogram, ms): Measures API request latency.
- gemini_cli.token.usage (Counter, Int): Counts the number of tokens used.
- gemini_cli.file.operation.count (Counter, Int): Counts file operations.