fix(tracing): honor content capture opt-out (#11782)

This commit is contained in:
Jasper
2026-09-03 10:36:12 +02:00
committed by GitHub
parent 35524facf0
commit 0338189c66
6 changed files with 280 additions and 32 deletions
@@ -428,6 +428,7 @@ You can control each signal (traces, metrics, logs) independently with `OTEL_{SI
| `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` |
| `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` | Include model messages and tool arguments/results in exported traces | `true`, `false` (default) |
Additional variables like `OTEL_SERVICE_NAME`, `OTEL_RESOURCE_ATTRIBUTES`,
and `OTEL_EXPORTER_OTLP_TIMEOUT` are also supported.
+8 -1
View File
@@ -28,6 +28,14 @@ export LANGFUSE_URL=https://cloud.langfuse.com # EU data region 🇪🇺
# https://localhost:3000 if you're self-hosting
```
By default, traces exclude model messages and tool arguments and results. To include that content, explicitly enable content capture:
```bash
export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true
```
Only enable content capture when your telemetry storage is appropriate for potentially sensitive content.
## Run goose with Langfuse Integration
Now, you can run goose and monitor your AI requests and actions through Langfuse.
@@ -37,4 +45,3 @@ With goose running and the environment variables set, Langfuse will start captur
_[Example trace (public) in Langfuse](https://cloud.langfuse.com/project/cloramnkj0002jz088vzn1ja4/traces/cea4ed38-0c44-4b0a-8c20-4b0b6b9e8d73?timestamp=2025-01-31T15%3A52%3A30.362Z&observation=7c8e5807-3c29-4c28-9c6f-7d7427be401f)_
![goose trace in Langfuse](https://langfuse.com//images/docs/goose-integration/goose-example-trace.png)