docs: update OTel environment variable and config guides (#7221)
Signed-off-by: Adrian Cole <adrian@tetrate.io> Co-authored-by: Rizel Scarlett <rizel@squareup.com>
This commit is contained in:
@@ -462,29 +462,50 @@ Alternatively, proxy settings can be configured through your operating system's
|
||||
|
||||
Beyond goose's built-in [logging system](/docs/guides/logs), you can export telemetry to external observability platforms for advanced monitoring, performance analysis, and production insights.
|
||||
|
||||
### OpenTelemetry Protocol (OTLP)
|
||||
### Observability Configuration
|
||||
|
||||
Configure goose to export traces and metrics to any OTLP-compatible observability platform.
|
||||
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.
|
||||
Configure goose to export telemetry to any [OpenTelemetry](https://opentelemetry.io/docs/) compatible platform.
|
||||
|
||||
| Variable | Purpose | Values | Default |
|
||||
|----------|---------|--------|---------|
|
||||
| `OTEL_EXPORTER_OTLP_ENDPOINT` | OTLP endpoint URL | URL (e.g., `http://localhost:4318`) | None |
|
||||
| `OTEL_EXPORTER_OTLP_TIMEOUT` | Export timeout in milliseconds | Integer (ms) | `10000` |
|
||||
To enable export, set a collector endpoint:
|
||||
|
||||
**When to use OTLP:**
|
||||
- Diagnosing slow tool execution or LLM response times
|
||||
- Understanding intermittent failures across multiple sessions
|
||||
- Monitoring goose performance in production or CI/CD environments
|
||||
- Tracking usage patterns, costs, and resource consumption over time
|
||||
- Setting up alerts for performance degradation or high error rates
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
|
||||
export OTEL_EXPORTER_OTLP_TIMEOUT=10000
|
||||
```
|
||||
|
||||
You can control each signal (traces, metrics, logs) independently with `OTEL_{SIGNAL}_EXPORTER`:
|
||||
|
||||
| Variable pattern | Purpose | Values |
|
||||
|---|---|---|
|
||||
| `OTEL_EXPORTER_OTLP_ENDPOINT` | Base OTLP endpoint (applies `/v1/traces`, etc.) | URL |
|
||||
| `OTEL_EXPORTER_OTLP_{SIGNAL}_ENDPOINT` | Override endpoint for a specific signal | URL |
|
||||
| `OTEL_{SIGNAL}_EXPORTER` | Exporter type per signal | `otlp`, `console`, `none` |
|
||||
| `OTEL_SDK_DISABLED` | Disable all OTel export | `true` |
|
||||
|
||||
Additional variables like `OTEL_SERVICE_NAME`, `OTEL_RESOURCE_ATTRIBUTES`,
|
||||
and `OTEL_EXPORTER_OTLP_TIMEOUT` are also supported.
|
||||
See the [OTel environment variable spec][otel-env] for the full list.
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
# Export everything to a local collector
|
||||
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
|
||||
|
||||
# Export only traces, disable metrics and logs
|
||||
export OTEL_TRACES_EXPORTER="otlp"
|
||||
export OTEL_METRICS_EXPORTER="none"
|
||||
export OTEL_LOGS_EXPORTER="none"
|
||||
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
|
||||
|
||||
# Debug traces to console (no collector needed)
|
||||
export OTEL_TRACES_EXPORTER="console"
|
||||
|
||||
# Sample 10% of traces (reduce volume in production)
|
||||
export OTEL_TRACES_SAMPLER="parentbased_traceidratio"
|
||||
export OTEL_TRACES_SAMPLER_ARG="0.1"
|
||||
```
|
||||
|
||||
[otel-env]: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
|
||||
|
||||
### Langfuse Integration
|
||||
|
||||
These variables configure the [Langfuse integration for observability](/docs/tutorials/langfuse).
|
||||
|
||||
Reference in New Issue
Block a user