-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fd40b38
docs: update OTel environment variable and config guides
codefromthecrypt f537c70
docs(otel): add sampling example and fix config key casing
codefromthecrypt 457447b
docs: move OTEL config to dedicated section with lowercase keys
blackgirlbytes 6b38be4
docs: simplify OTLP intro in environment-variables.md
blackgirlbytes 56e42ea
docs: remove em-dash from observability config section
blackgirlbytes 249ae51
docs: rename OTLP section to Observability Configuration for consistency
blackgirlbytes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -438,29 +438,50 @@ export NO_PROXY="localhost,127.0.0.1,.internal" | |
|
|
||
| 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. | ||
|
|
||
| To enable export, 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 | ||
| ``` | ||
|
|
||
| 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) | ||
|
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). | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The anchor link
#opentelemetry-protocol-otlpis broken. The section in environment-variables.md was renamed from "OpenTelemetry Protocol (OTLP)" to "Observability Configuration", so the anchor should be#observability-configuration.