Repository navigation
Bump scouter - #393
Merged
Merged
Bump scouter#393
Conversation
…ndlers (MAJOR-4, MAJOR-6)
Separate concerns: GET /api/scouter/profiles lists profiles, POST /api/scouter/profiles/hydrate runs drift hydration. Routes.ts: removed PROFILE_GET duplicate, moved MONITORING_PROFILES to /hydrate path.
Rename setup_agent_layout to setupAgentLayout; replace bg-white/text-gray/border-gray/backdrop-blur with theme tokens in TraceTable; add matchesTags to mock filteredItems in CardSearch.
Covers: correct URL, cursor field stripping, non-ok response error, body error propagation.
Covers getAssertion (all variants + invalid throws), isTraceAssertionValue, isAgentAssertionValue, AgentEvalProfileHelper (all 4 getters, missing tasks.agent/trace graceful handling).
…R-9) Replace Matcher::Any with typed UrlEncoded matchers; assert body fields on success/error. Fix duplicate rand dep in opsml-server dev-dependencies (rand = 0.* conflicted with workspace rand = 0.9). Use serde_json::Value for facets handler return until TraceFacetsResponse lands on stable scouter branch.
Dependency ReviewThe following issues were found:
Vulnerabilitiespy-opsml/uv.lock
Only included vulnerabilities with severity high or higher. License Issuespy-opsml/uv.lock
Scanned Manifest FilesCargo.lock
crates/opsml_server/Cargo.toml
py-opsml/uv.lock
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
thorrester
marked this pull request as ready for review
April 28, 2026 02:04
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.
Pull Request
Short Summary
Promotes
scouter-clientfrom thegenai-semanticsfeature branch tomain, and ships everything that depended on that promotion: new GenAI and observability proxy routes in the Rust server, a rebuilt OTel-compliant tracing layer in Python, a newServiceMapMiddlewarefor recording service-to-service connections, and a full faceted filter sidebar for the trace UI.Context
The
genai-semanticsbranch ofscouterhas been merged tomain. The dependency pin inCargo.tomlis now dead weight — this PR removes it. Everything else follows from that unlock.Rust — GenAI proxy routes
A new
crates/opsml_server/src/core/scouter/genai/route.rsadds ten-plus endpoints that proxy Scouter's GenAI analytics surface: agent dashboards, model usage, token metrics, error breakdowns, operation breakdowns, tool activity, conversation lookup, and span filtering. The sharedpost_proxy/get_proxyhelpers in that file handle theAssertUnwindSafe+catch_unwindpattern for the Scouter client calls. A parallelobservability/route.rsdoes the same for the infra-level observability metrics, spans, and traces that were previously only reachable by going to Scouter directly.Rust — trace route cleanup
The existing trace handlers were missing
AuditContextextensions and had copy-pasted error strings ("Failed to acknowledge drift alerts" in the trace handler — that was a bug). Both are fixed. A newget_trace_spans_from_filtersendpoint and a facet endpoint round out the trace surface.Rust — profile split
profilesBFF logic is split from drift-profile hydration into separate handlers so each endpoint has a single responsibility.Python — tracing overhaul
tracing/__init__.pygainsScouterSpan— an OTel-compliant wrapper around the RustActiveSpan— andScouterTracingMiddlewarefor ASGI apps._capture_argumentsintrospects function signatures to record call arguments as span attributes. OTel import fallbacks are restructured so the module degrades cleanly whenopentelemetryis absent.Python —
ServiceMapMiddlewareNew ASGI middleware at
opsml/scouter/service_map/middleware.pythat intercepts HTTP requests and responses, capturessource_service → destination_service + endpoint + method + status + latency_ms + trace_id, and writesServiceConnectionRecordrows to Bifrost. Schema inference (infer_schema) and trace ID extraction (extract_trace_id) are delegated to Rust via PyO3.Python — deps
Adds
opentelemetryas an optional dependency group (opentelemetry-sdk,opentelemetry-exporter-otlp-proto-common,opentelemetry-instrumentation). Thegenaiextras group drops duplicate OTel pins and addscrewai,openai-agents,openinference-instrumentation-crewai, andopentelemetry-instrumentation-openai-agents-v2.Agent examples
Removes
music_recommender,recipe_generator, andsingle_agentexamples (all ADK-specific, now stale). Replaces them with three parallel examples (crewai/,openai/,google/) sharing a commonsetup.py,scenarios.jsonl, and a top-levelrun.pythat dispatches by framework.UI — faceted trace filtering
The trace dashboard gets a full sidebar filter system:
FacetSidebar,FacetSection,FacetRow,AttributeFacet,DurationFacet,ChipBar,AddFilterMenu, andfilterState.svelte.ts(Svelte 5 runes-based). Filters accumulate as chips and drive theTraceTablequery.TraceDashboard.svelteandTraceTable.svelteare substantially rewritten to wire this up.UI — agent task view
TaskDetailView.svelteis rebuilt (343 lines changed).AgentAssertionPill.svelteis new — renders assertion pass/fail status with a consistent pill design.ComparisonView.svelteis updated to match.UI — mock data mode
A dev-only mock mode (
mockMode.svelte.ts,devMock.ts,src/lib/server/mock/mode.ts) lets the UI render with static fixtures without a live backend, useful during rapid UI iteration.UI — new BFF endpoints
Ten new
+server.tsfiles undersrc/routes/api/scouter/genai/proxy the new Rust GenAI routes to the frontend.Tests
Rust:
tests/api/scouter/genai.rs(258 lines),observability.rs(91 lines), updatedtrace.rsandprofile.rs. UI: Vitest tests forfilterState,task.tsassertions,charts.ts,facets.ts,trace/utils.ts, agent inference helpers, and user schema validation.Cargo.tomlscouter-clientbranch:genai-semantics→maincrates/opsml_server/src/core/scouter/genai/route.rscrates/opsml_server/src/core/scouter/observability/route.rscrates/opsml_server/src/core/scouter/trace/route.rsAuditContext, new spans + facet endpoints, fixed error stringscrates/opsml_server/src/core/scouter/profile/route.rscrates/opsml_server/tests/api/scouter/genai.rscrates/opsml_server/tests/api/scouter/observability.rspy-opsml/python/opsml/scouter/tracing/__init__.pyScouterSpan,ScouterTracingMiddleware,_capture_argumentspy-opsml/python/opsml/scouter/service_map/middleware.pyServiceMapMiddleware+ServiceConnectionRecordpy-opsml/python/opsml/scouter/trace.pypy-opsml/pyproject.tomlopentelemetryoptional group;genaiextras updatedpy-opsml/examples/genai/agent/crewai/openai/google/structurecrates/opsml_server/opsml_ui/src/lib/components/trace/filters/crates/opsml_server/opsml_ui/src/lib/components/trace/TraceDashboard.sveltecrates/opsml_server/opsml_ui/src/lib/components/scouter/agent/task/TaskDetailView.sveltecrates/opsml_server/opsml_ui/src/lib/components/scouter/agent/task/AgentAssertionPill.sveltecrates/opsml_server/opsml_ui/src/routes/api/scouter/genai/+server.tsendpointscrates/opsml_server/opsml_ui/src/lib/components/settings/mockMode.svelte.tsIs this a Breaking Change?
No. Existing Python imports (
opsml.scouter.tracing,opsml.scouter.drift,opsml.scouter.evaluate) are unchanged — new exports are additive. The Rust API surface adds new routes; no existing routes are removed or have their request/response contracts changed. Thescouter-clientbranch switch is internal to the server binary and is not visible to callers.