Add Laminar tracing to processMessage() pipeline#5
Merged
Conversation
Instruments every processMessage() call with three spans: - process_message (root, EXECUTOR) — input message, source, tags, usage - context_assembly — observations, active messages, memory counts, skill count - llm_call (LLM) — full preamble sent to model, response, tokens, cost Scheduler-fired calls are tagged with "scheduler" + scheduleId so they can be filtered separately in the dashboard — useful for debugging reminder suppression decisions. Fully opt-in: omit LAMINAR_API_KEY to disable with zero overhead (null object pattern in tracing.ts). Self-hosted under Apache 2.0 via Docker. One Laminar instance supports multiple Construct instances via projects. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deploying sprawl with
|
| Latest commit: |
34ddccf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://df37b8c5.sprawl.pages.dev |
| Branch Preview URL: | https://feat-laminar-tracing.sprawl.pages.dev |
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
processMessage()call via a null-object wrapper (tracing.ts) — zero overhead whenLAMINAR_API_KEYis unsetprocess_message(root),context_assembly(memory/observation counts),llm_call(full preamble the model saw + tokens/cost)scheduler+scheduleIdfor easy filtering in the dashboardscheduleIdadded toProcessMessageOptsand passed through from the schedulerLAMINAR_API_KEY,LAMINAR_BASE_URL(documented in.env.construct.example)Motivation
Personality quirks (redundant reminders, repetition, temporal confusion) are hard to debug because there's no visibility into what context the model actually received. The
llm_callspan captures the full preamble, enabling trace replay to understand exactly why the agent made a decision.Self-hosting setup
Test plan
just checkpasses (typecheck + lint + fmt + tests)LAMINAR_API_KEYproduces no errors or behavior changeschedulertag andschedule_idattribute🤖 Generated with Claude Code