Skip to content

Commit 9e9545d

Browse files
docs: update OTel environment variable and config guides
Signed-off-by: Adrian Cole <adrian@tetrate.io>
1 parent ab54075 commit 9e9545d

File tree

2 files changed

+40
-16
lines changed

2 files changed

+40
-16
lines changed

documentation/docs/guides/config-files.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ GOOSE_SEARCH_PATHS:
9797
- "/opt/homebrew/bin"
9898

9999
# Observability (OpenTelemetry)
100+
# Prefer ENV, which overrides this configuration and fully supports
101+
# OTel semantics. See the environment-variables guide for details.
100102
OTEL_EXPORTER_OTLP_ENDPOINT: "http://localhost:4318"
101103
OTEL_EXPORTER_OTLP_TIMEOUT: 20000
102104

documentation/docs/guides/environment-variables.md

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -440,27 +440,49 @@ Beyond goose's built-in [logging system](/docs/guides/logs), you can export tele
440440

441441
### OpenTelemetry Protocol (OTLP)
442442

443-
Configure goose to export traces and metrics to any OTLP-compatible observability platform.
444-
OTLP is the standard protocol for sending telemetry collected by [OpenTelemetry](https://opentelemetry.io/docs/). When configured, goose exports telemetry asynchronously and flushes on exit.
443+
Configure goose to export traces, metrics, and logs to any
444+
[OpenTelemetry](https://opentelemetry.io/docs/) compatible platform.
445+
When configured, goose exports telemetry asynchronously and flushes on exit.
445446

446-
| Variable | Purpose | Values | Default |
447-
|----------|---------|--------|---------|
448-
| `OTEL_EXPORTER_OTLP_ENDPOINT` | OTLP endpoint URL | URL (e.g., `http://localhost:4318`) | None |
449-
| `OTEL_EXPORTER_OTLP_TIMEOUT` | Export timeout in milliseconds | Integer (ms) | `10000` |
450-
451-
**When to use OTLP:**
452-
- Diagnosing slow tool execution or LLM response times
453-
- Understanding intermittent failures across multiple sessions
454-
- Monitoring goose performance in production or CI/CD environments
455-
- Tracking usage patterns, costs, and resource consumption over time
456-
- Setting up alerts for performance degradation or high error rates
457-
458-
**Example:**
447+
goose respects standard [OTel SDK environment variables][otel-env]. The
448+
simplest way to enable export is to set a collector endpoint:
449+
450+
```bash
451+
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
452+
```
453+
454+
This enables OTLP export for all signals (traces, metrics, logs). You can
455+
control each signal independently with `OTEL_{SIGNAL}_EXPORTER` where signal
456+
is `TRACES`, `METRICS`, or `LOGS`:
457+
458+
| Variable pattern | Purpose | Values |
459+
|---|---|---|
460+
| `OTEL_EXPORTER_OTLP_ENDPOINT` | Base OTLP endpoint (applies `/v1/traces`, etc.) | URL |
461+
| `OTEL_EXPORTER_OTLP_{SIGNAL}_ENDPOINT` | Override endpoint for a specific signal | URL |
462+
| `OTEL_{SIGNAL}_EXPORTER` | Exporter type per signal | `otlp`, `console`, `none` |
463+
| `OTEL_SDK_DISABLED` | Disable all OTel export | `true` |
464+
465+
Additional variables like `OTEL_SERVICE_NAME`, `OTEL_RESOURCE_ATTRIBUTES`,
466+
and `OTEL_EXPORTER_OTLP_TIMEOUT` are also supported.
467+
See the [OTel environment variable spec][otel-env] for the full list.
468+
469+
**Examples:**
459470
```bash
471+
# Export everything to a local collector
460472
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
461-
export OTEL_EXPORTER_OTLP_TIMEOUT=10000
473+
474+
# Export only traces, disable metrics and logs
475+
export OTEL_TRACES_EXPORTER="otlp"
476+
export OTEL_METRICS_EXPORTER="none"
477+
export OTEL_LOGS_EXPORTER="none"
478+
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
479+
480+
# Debug traces to console (no collector needed)
481+
export OTEL_TRACES_EXPORTER="console"
462482
```
463483

484+
[otel-env]: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
485+
464486
### Langfuse Integration
465487

466488
These variables configure the [Langfuse integration for observability](/docs/tutorials/langfuse).

0 commit comments

Comments
 (0)