evals(v4): OTEL o11y UX (doctor/welcome + cli shutdown) - #2762
Open
miguelg719 wants to merge 1 commit into
Open
Conversation
|
This was referenced Aug 17, 2026
Closed
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Architecture diagram
sequenceDiagram
participant CLI as CLI Entry (cli.ts)
participant Doctor as Doctor Command (tui/commands/doctor.ts)
participant Welcome as Welcome Status (tui/welcomeStatus.ts)
participant Env as Environment Snapshot
participant OTEL as OTEL Framework (framework/otel.ts)
participant Tracer as Tracer (shutdown/flush)
participant Langsmith as LangSmith Provider
Note over CLI,Welcome: OTEL Observability UX
Welcome->>Env: snapshotEnv()
Env->>Env: langSmithEntry() - resolve LANGSMITH_API_KEY first
alt LANGSMITH_API_KEY set
Env-->>Welcome: ProviderKeyEntry (set)
else LANGSMITH_API_KEY not set
Env->>Env: fallback to LANGCHAIN_API_KEY
Env-->>Welcome: ProviderKeyEntry (set/optional)
end
Welcome-->>CLI: env snapshot with langsmith entry
Doctor->>Doctor: renderHuman(report)
Doctor->>Doctor: keyRow("LANGSMITH_API_KEY", ...)
Doctor-->>CLI: displays LangSmith key status
Note over CLI,OTEL: CLI Shutdown Signal Handling
alt SIGINT/SIGTERM received
CLI->>CLI: handleSignal(code)
CLI->>CLI: try resolveTraceTransport()
alt trace transport is "otel"
CLI->>OTEL: import shutdownTracing()
OTEL->>Tracer: await shutdown()
Tracer-->>OTEL: completed/flushed
OTEL-->>CLI: done
else non-OTEL transport
CLI->>CLI: no tracer shutdown (unchanged)
end
CLI->>CLI: process.exit(code)
else normal exit
CLI->>CLI: continue execution
end
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
miguelg719
force-pushed
the
miguelgonzalez/evals-v4-otel-ux
branch
from
August 17, 2026 19:46
569556b to
c313f54
Compare
miguelg719
force-pushed
the
miguelgonzalez/evals-v4-otel-ux
branch
from
August 17, 2026 20:04
c313f54 to
9a714c1
Compare
miguelg719
force-pushed
the
miguelgonzalez/evals-v4-otel-ux
branch
from
August 17, 2026 21:03
9a714c1 to
cacb00c
Compare
miguelg719
force-pushed
the
miguelgonzalez/evals-v4-otel-ux
branch
from
August 17, 2026 22:05
cacb00c to
179ca03
Compare
miguelg719
force-pushed
the
miguelgonzalez/evals-v4-otel-ux
branch
from
August 17, 2026 22:07
179ca03 to
7e0c01f
Compare
miguelg719
force-pushed
the
miguelgonzalez/evals-v4-otel-ux
branch
from
August 17, 2026 22:34
7e0c01f to
e601252
Compare
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.
Why
Stack 6/6.
What
doctor+welcomeStatussurface the LangSmith key.cli.tsflushes/shuts down the tracer on SIGINT/SIGTERM (otel-gated, error-swallowing).Testing
typecheck + unit + build green.
Base: #2761
Summary by cubic
Surfaces the LangSmith API key in
doctor/welcomeand flushes OTEL traces on CLI shutdown to improve observability. Previously these views omitted LangSmith and the CLI exited without flushing spans; now, when trace transport is "otel", the CLI waits for tracer shutdown on SIGINT/SIGTERM and ignores shutdown errors.doctorandwelcomeshow the LangSmith API key, preferring LANGSMITH_API_KEY and falling back to LANGCHAIN_API_KEY;welcomeStatusrecords which var was used anddoctorlabels it.shutdownTracing()before exit; errors are swallowed. Non-OTEL behavior is unchanged.Written for commit e601252. Summary will update on new commits.