-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtelemetry.env.example
More file actions
39 lines (37 loc) · 1.78 KB
/
Copy pathtelemetry.env.example
File metadata and controls
39 lines (37 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Source this file in the shell that runs Gemini CLI.
#
# Exports Gemini CLI logs, metrics, and traces to the shared collector. The
# collector estimates cost on api_response logs. Native metrics pass through to
# VictoriaMetrics unchanged.
#
# Docs: https://google-gemini.github.io/gemini-cli/docs/cli/telemetry.html
# ---------------------------------------------------------------------------
# Option A: environment variables. These override settings.json.
# ---------------------------------------------------------------------------
export GEMINI_TELEMETRY_ENABLED=true
# "local" = export to the configured OTLP endpoint (our collector), not GCP.
export GEMINI_TELEMETRY_TARGET=local
# Collector is OTLP HTTP only, so protocol must be http.
export GEMINI_TELEMETRY_OTLP_ENDPOINT=http://localhost:4318
export GEMINI_TELEMETRY_OTLP_PROTOCOL=http
# Bearer auth for the collector (matches OTEL_AUTH_TOKEN).
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer ${OTEL_AUTH_TOKEN}"
# Traces are heavier (full prompts/outputs/system instructions in spans). Opt in
# explicitly; leave unset to keep logs+metrics only.
export GEMINI_TELEMETRY_TRACES_ENABLED=true
# Metadata-only: keep prompt bodies out of telemetry (prompt_length still recorded).
export GEMINI_TELEMETRY_LOG_PROMPTS=false
# ---------------------------------------------------------------------------
# Option B: settings.json (~/.gemini/settings.json or project .gemini/settings.json)
# ---------------------------------------------------------------------------
# {
# "telemetry": {
# "enabled": true,
# "target": "local",
# "otlpEndpoint": "http://localhost:4318",
# "otlpProtocol": "http",
# "traces": true,
# "logPrompts": false
# }
# }
# (Auth header still comes from OTEL_EXPORTER_OTLP_HEADERS in the environment.)