fix(otel): use async reqwest client so OTLP export works in goose serve mode - #10100
Merged
Merged
Conversation
michaelneale
approved these changes
Jun 30, 2026
michaelneale
left a comment
Collaborator
There was a problem hiding this comment.
huh neat fix for that.
lifeizhou-ap
added a commit
that referenced
this pull request
Jul 1, 2026
* main: (26 commits) Fix MCP app sandbox bridge lifecycle (#10064) fix(bedrock): send inference config (max_tokens, temperature) on Converse (#9889) feat(providers): support OpenRouter request parameters (#9276) Migrate local inference model management to ACP (#10124) (attempt to) fix disk space errors in linux release builds (#10024) feat: add --edit session flag to edit conversation before forking (#9799) feat: add iFlytek Spark and Astron MaaS providers (#9837) fix(desktop): dedupe Nostr session deep link imports (#9918) [codex] Add SessionStart hook parity outside CLI (#9970) feat(providers): add Fireworks AI declarative provider (#9990) fix(providers): don't retry deterministically-permanent 400s (thinking-block immutability) (#10005) fix(deps): downgrade pkcs8 to v0.10 to match sec1/pkcs1 v0.7 (#10119) chore(deps): bump actions/cache from 5.0.2 to 6.0.0 (#10051) Make OpenAI Responses API store param configurable (#10040) remove unsupported model (#10121) chore(release): bump version to 1.40.0 (minor) (#10099) move ollama provider into goose-providers (#9986) UI acp migratoin: Decouple desktop UI types from generated OpenAPI types (#10109) fix(otel): use async reqwest client so OTLP export works in `goose serve` mode (#10100) feat (acp): exposed available tools in acp schema (#10097) ...
lifeizhou-ap
added a commit
that referenced
this pull request
Jul 1, 2026
* main: (42 commits) Fix MCP app sandbox bridge lifecycle (#10064) fix(bedrock): send inference config (max_tokens, temperature) on Converse (#9889) feat(providers): support OpenRouter request parameters (#9276) Migrate local inference model management to ACP (#10124) (attempt to) fix disk space errors in linux release builds (#10024) feat: add --edit session flag to edit conversation before forking (#9799) feat: add iFlytek Spark and Astron MaaS providers (#9837) fix(desktop): dedupe Nostr session deep link imports (#9918) [codex] Add SessionStart hook parity outside CLI (#9970) feat(providers): add Fireworks AI declarative provider (#9990) fix(providers): don't retry deterministically-permanent 400s (thinking-block immutability) (#10005) fix(deps): downgrade pkcs8 to v0.10 to match sec1/pkcs1 v0.7 (#10119) chore(deps): bump actions/cache from 5.0.2 to 6.0.0 (#10051) Make OpenAI Responses API store param configurable (#10040) remove unsupported model (#10121) chore(release): bump version to 1.40.0 (minor) (#10099) move ollama provider into goose-providers (#9986) UI acp migratoin: Decouple desktop UI types from generated OpenAPI types (#10109) fix(otel): use async reqwest client so OTLP export works in `goose serve` mode (#10100) feat (acp): exposed available tools in acp schema (#10097) ...
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Swaps the
opentelemetry-otlpfeature fromreqwest-blocking-clientto the asyncreqwest-client(one line inCargo.toml). This fixes OTLP export panicking and silently dropping all telemetry when goosed runs ingoose serve(ACP) mode.The bug
The OTLP exporter wraps each export in a
block_onfallback for when there's no ambient Tokio runtime (theBatchProcessorruns in a rawstd::thread). The blocking reqwest client creates and drops its own nested runtime per request, and dropping a runtime insideblock_onpanics:thread 'OpenTelemetry.Logs.BatchProcessor' panicked: Cannot drop a runtime in a context where blocking is not allowed.The exporter thread dies ~1s in, then every log is dropped with
AfterShutdownwarnings.goosed agentis unaffected (exports run in the ambient axum runtime →.awaitpath, noblock_on), which is why production telemetry works today. Onlygoose servehits the broken path.The fix
Switch to the async
reqwest-client. Theblock_onwrapper was designed for an async client (per its own comment) - the async client reuses the reactor the wrapper provides, so no nested runtime is created or dropped.otlp.rsunchanged.Testing
cargo test -p goose --features otel --lib otel::otlp→ 54 passed; clippy/fmt clean.goose serveexport: 0 panics / 0 AfterShutdown (was 1 panic + ~1,580 drops).goosed agentexport: unchanged, no regression.End-to-end via goose-internal (the real
goose serveconsumer)goose-internal runs the backend as
goose serveand exports security telemetry (prompt/command-injection scan findings) over OTLP - it was getting nothing downstream because of this panic. Verified the fix end-to-end:goosefrom this branch and pointed goose-internal's dev app at it viaGOOSE_BIN=.../target/debug/goose just dev.goose servemode, OTLP logs-only export enabled, correct endpoint/service name.echo GOOSE_INTERNAL_TEST_RUN_100) and kept the app open ~60s so the batch processor flushed during the session.Risk
Low — single-line feature swap that restores the async client the wrapper was built for;
agent-mode path verified non-regressed.