chore(infra): park Langfuse tracing on the agent Lambda#139
Merged
Conversation
Three rounds of env-var tuning (#133 / #137 / #138) failed to cap the request-path hang at <60s. Test on 2026-04-21 with LANGFUSE_TIMEOUT=2 confirmed live still hit Lambda's 60s timeout on /team; the actual blocking call was not root-caused. - Drop LANGFUSE_TIMEOUT and LANGFUSE_FLUSH_INTERVAL from lambda.tf — both are no-ops when tracing is disabled, keeping them was cargo. - Rewrite the comment next to LANGFUSE_TRACING_ENABLED="false" to reflect the parked decision rather than the stale "flip via CLI after apply" plan. Enrichment services retain tracing; they run in normal Lambda (no LWA, no streaming) and don't show this class of hang. Re-entry path is either a local reproduction with a debugger attached or switching to the ADOT Lambda Extension — not more env-var guessing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Three rounds of env-var tuning (#133, #137, #138) failed to cap the request-path hang at <60s. Test on 2026-04-21 with
LANGFUSE_TIMEOUT=2applied via #138 still hit Lambda's 60s timeout on/team— the blocking call wasn't root-caused, and the cost of more env-var guessing outweighs the value of agent traces at this scale.Changes
LANGFUSE_TIMEOUTandLANGFUSE_FLUSH_INTERVAL(both no-ops when tracing is disabled), rewrite the comment next toLANGFUSE_TRACING_ENABLED="false"to reflect the parked decision rather than the stale "flip via CLI after apply" plan.What stays
LANGFUSE_TRACING_ENABLEDkill-switch stays in the Terraform env block for the agent, in case someone attempts re-entry later.Re-entry path (not env var tuning)
Either:
uvicornlocally with real Langfuse credentials, hit/team, and find the exact stack frame blocked at the 5-second mark.localhost:4318, let the extension forward to Langfuse Cloud. Moves every potentially-blocking call out of the request thread by construction.Test plan
terraform fmt+terraform validateclean/teamvia CloudFront returns <5s (already verified manually — live Lambda matches this config today since we flippedLANGFUSE_TRACING_ENABLED=falsevia CLI)🤖 Generated with Claude Code