-
Notifications
You must be signed in to change notification settings - Fork 4.4k
docs: update OTel environment variable and config guides #7221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
fd40b38
f537c70
457447b
6b38be4
56e42ea
249ae51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,8 +97,10 @@ GOOSE_SEARCH_PATHS: | |
| - "/opt/homebrew/bin" | ||
|
|
||
| # Observability (OpenTelemetry) | ||
| OTEL_EXPORTER_OTLP_ENDPOINT: "http://localhost:4318" | ||
| OTEL_EXPORTER_OTLP_TIMEOUT: 20000 | ||
| # Prefer ENV, which overrides this configuration and fully supports | ||
| # OTel semantics. See the environment-variables guide for details. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does this mean? excuse my ignorance.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think i tmeans you can put it in the config, as here, but if you have environment variables, it will use them instead?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ohhh okay. I will suggest a slight rewrite for clarity. thanks mic |
||
| otel_exporter_otlp_endpoint: "http://localhost:4318" | ||
| otel_exporter_otlp_timeout: 20000 | ||
|
|
||
| # Security Configuration | ||
| SECURITY_PROMPT_ENABLED: true | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -440,27 +440,53 @@ Beyond goose's built-in [logging system](/docs/guides/logs), you can export tele | |
|
|
||
| ### OpenTelemetry Protocol (OTLP) | ||
|
|
||
| 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 traces, metrics, and logs to any | ||
| [OpenTelemetry](https://opentelemetry.io/docs/) compatible platform. | ||
| When configured, goose exports telemetry asynchronously and flushes on exit. | ||
|
|
||
| goose respects standard [OTel SDK environment variables][otel-env]. The | ||
| simplest way to enable export is to set a collector endpoint: | ||
|
|
||
| | 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` | | ||
|
|
||
| **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 | ||
| ``` | ||
|
|
||
| This enables OTLP export for all signals (traces, metrics, logs). You can | ||
| control each signal independently with `OTEL_{SIGNAL}_EXPORTER` where signal | ||
| is `TRACES`, `METRICS`, or `LOGS`: | ||
|
|
||
| | 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) | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. example for setting 10pct sampling as default is 100pct. 100pct is what a lot of APM backends want, as they can derive metrics from spans, but is expensive. |
||
| 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). | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.