Arazzo Plugin Go runner and OTel support addded#2122
Arazzo Plugin Go runner and OTel support addded#2122HimethW wants to merge 46 commits intowso2:arazzo-extensionfrom
Conversation
…ants for trace server
… Arazzo extension
…and event handling
…rver' to 'Arazzo server'
… and status code checks
…y standards and enhance tracing capabilities
…t aslo checks the full path when there are no edges connecitng the source and target effectively highlighting condition nodes and goto ndoes
…pathfinding fro retry nodes. the retry count is also now shown in the node
…reen upon workflow completion along with the line connecting it
…flows in WorkflowView
inputs - http start span outputs - step end span
…Panel by showing http spans
…ep on HTTP errors. shown in step end span
…iSink; enhance CLI with new trace endpoint options. now the cli supports jaeger but it is not wired to the vscode plugin yet
…laying trace spans. rendering updated
…low match. so if there ar e common steps for 2 workflows, logs do not show for the incorrect workflow
…into arazzo-extension-OTeL
…led via the arazzo.runWorkflow command
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (4)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds end-to-end workflow execution + tracing support across the Arazzo CLI, VS Code extension, RPC layer, and visualizer UI, including OpenTelemetry-compatible span streaming and in-graph trace highlighting/log views.
Changes:
- Introduces Go runner telemetry sinks (local HTTP trace server + optional OTLP/HTTP exporter) and emits workflow/step/http/retry span events.
- Adds a local tracer HTTP server in the VS Code extension and forwards trace events to the webview via RPC notifications.
- Enhances the visualizer to run workflows, highlight executed paths/nodes, and show per-node trace logs via a new Logs tab.
Reviewed changes
Copilot reviewed 47 out of 62 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| workspaces/common-libs/ui-toolkit/src/styles/Theme.ts | Adds theme token for “testing passed” color. |
| workspaces/arazzo/using_jaeger.md | Documents running Jaeger + CLI OTLP flag. |
| workspaces/arazzo/examples/go-runner-test/toolshop/15-deep-branching.arazzo.yaml | Adds a deep branching workflow example. |
| workspaces/arazzo/arazzo-designer-visualizer/src/views/WorkflowView/WorkflowView.tsx | Trace event handling, path highlighting, workflow selection UI, title bar + run action. |
| workspaces/arazzo/arazzo-designer-visualizer/src/views/WorkflowView/WorkflowTitleBar.tsx | New workflow title bar with “Try” action. |
| workspaces/arazzo/arazzo-designer-visualizer/src/views/WorkflowView/WorkflowSelectionScreen.tsx | New workflow selection screen when ID changes. |
| workspaces/arazzo/arazzo-designer-visualizer/src/views/WorkflowView/NodePropertiesPanel.tsx | Adds Properties/Logs tabs and span filtering. |
| workspaces/arazzo/arazzo-designer-visualizer/src/views/WorkflowView/LogsTab.tsx | New trace log rendering (summary cards + raw view). |
| workspaces/arazzo/arazzo-designer-visualizer/src/types.d.ts | Adds module declarations for importing assets (css/images). |
| workspaces/arazzo/arazzo-designer-visualizer/src/resources/icons/success.svg | Adds success status icon. |
| workspaces/arazzo/arazzo-designer-visualizer/src/resources/icons/fail.svg | Adds failure status icon. |
| workspaces/arazzo/arazzo-designer-visualizer/src/components/nodes/StepNode/StepNodeWidget.tsx | Adds step trace status overlay + duration label. |
| workspaces/arazzo/arazzo-designer-visualizer/src/components/nodes/StepNode/StepNodeModel.ts | Adds traceStatus field to step node data. |
| workspaces/arazzo/arazzo-designer-visualizer/src/components/nodes/StartNode/StartNodeWidget.tsx | Adds start node trace-passed styling. |
| workspaces/arazzo/arazzo-designer-visualizer/src/components/nodes/StartNode/StartNodeModel.ts | Adds traceStatus field to start node data. |
| workspaces/arazzo/arazzo-designer-visualizer/src/components/nodes/RetryNode/RetryNodeWidget.tsx | Shows retry attempt badge on retry nodes. |
| workspaces/arazzo/arazzo-designer-visualizer/src/components/nodes/RetryNode/RetryNodeModel.ts | Adds retryAttempt field to retry node data. |
| workspaces/arazzo/arazzo-designer-visualizer/src/components/nodes/EndNode/EndNodeWidget.tsx | Adds end node trace-passed styling. |
| workspaces/arazzo/arazzo-designer-visualizer/src/components/nodes/EndNode/EndNodeModel.ts | Adds traceStatus field to end node data. |
| workspaces/arazzo/arazzo-designer-visualizer/src/components/nodes/ConditionNode/ConditionNodeWidget.tsx | Adds condition node trace-state border highlighting. |
| workspaces/arazzo/arazzo-designer-visualizer/src/components/nodes/BaseNode/BaseNodeWidget.tsx | Adds generic node border coloring based on trace state. |
| workspaces/arazzo/arazzo-designer-visualizer/src/components/edges/PlannedPathEdge.tsx | Adds trace-highlight styling for edges. |
| workspaces/arazzo/arazzo-designer-rpc-client/src/rpc-clients/visualizer/rpc-client.ts | Adds runWorkflow notification API. |
| workspaces/arazzo/arazzo-designer-rpc-client/src/RpcClient.ts | Adds webview notification listeners for trace + MCP state changes. |
| workspaces/arazzo/arazzo-designer-extension/src/rpc-managers/visualizer/rpc-manager.ts | Implements runWorkflow by invoking VS Code command. |
| workspaces/arazzo/arazzo-designer-extension/src/rpc-managers/visualizer/rpc-handler.ts | Wires runWorkflow notification handler. |
| workspaces/arazzo/arazzo-designer-extension/src/mcp/tracing/tracerServer.ts | Adds local HTTP trace server + event emitter. |
| workspaces/arazzo/arazzo-designer-extension/src/mcp/tracing/traceServerTask.ts | Adds VS Code Task to start trace server in extension host. |
| workspaces/arazzo/arazzo-designer-extension/src/mcp/tracing/traceEvents.ts | Defines trace event types mirrored from Go runner. |
| workspaces/arazzo/arazzo-designer-extension/src/mcp/tracing/index.ts | Exports tracing utilities/types. |
| workspaces/arazzo/arazzo-designer-extension/src/mcp/tracing/constants.ts | Adds default trace server port constant. |
| workspaces/arazzo/arazzo-designer-extension/src/mcp/runWorkflowCodeLens.ts | Updates CodeLens to “Try” / “Retry” and tracks dirty state. |
| workspaces/arazzo/arazzo-designer-extension/src/mcp/mcpServerRunner.ts | Starts tracer server, passes trace endpoint to CLI, tweaks prompts/output, stops tracer on shutdown. |
| workspaces/arazzo/arazzo-designer-extension/src/extension.ts | Adds rerun workflow command, dirty tracking, and webview/MCP state notifications. |
| workspaces/arazzo/arazzo-designer-extension/src/RPCLayer.ts | Forwards trace events + MCP state changes to webview via messenger. |
| workspaces/arazzo/arazzo-designer-extension/cli/arazzo-mcp-gen-linux-arm64 | Adds/updates CLI binary artifact. |
| workspaces/arazzo/arazzo-designer-extension/cli/arazzo-mcp-gen-darwin-arm64 | Adds/updates CLI binary artifact. |
| workspaces/arazzo/arazzo-designer-core/src/state-machine-types.ts | Adds core trace + MCP state event types + notification methods. |
| workspaces/arazzo/arazzo-designer-core/src/rpc-types/visualizer/types.ts | Adds RunWorkflowRequest type. |
| workspaces/arazzo/arazzo-designer-core/src/rpc-types/visualizer/rpc-type.ts | Adds runWorkflow notification type. |
| workspaces/arazzo/arazzo-designer-core/src/rpc-types/visualizer/index.ts | Adds runWorkflow to Visualizer API interface. |
| workspaces/arazzo/arazzo-designer-cli/test_runner/main.go | Updates runner construction for telemetry sink injection. |
| workspaces/arazzo/arazzo-designer-cli/internal/telemetry/otlp_sink.go | Adds OTLP sink implementation. |
| workspaces/arazzo/arazzo-designer-cli/internal/telemetry/multi_sink.go | Adds fan-out sink implementation. |
| workspaces/arazzo/arazzo-designer-cli/internal/telemetry/http_sink.go | Adds local HTTP sink + trace/span ID generation helpers. |
| workspaces/arazzo/arazzo-designer-cli/internal/telemetry/events.go | Defines Go trace event model + sink interface + noop sink. |
| workspaces/arazzo/arazzo-designer-cli/internal/runner/runner.go | Emits workflow + retry telemetry and propagates trace context. |
| workspaces/arazzo/arazzo-designer-cli/internal/runner/executor/step_executor.go | Emits step telemetry and passes trace context to HTTP executor. |
| workspaces/arazzo/arazzo-designer-cli/internal/models/models.go | Adds trace context fields to execution state. |
| workspaces/arazzo/arazzo-designer-cli/internal/mcpserver/server.go | Injects telemetry sink into runner/server construction. |
| workspaces/arazzo/arazzo-designer-cli/internal/httpexec/http_executor.go | Emits HTTP span telemetry during requests. |
| workspaces/arazzo/arazzo-designer-cli/cmd/main.go | Adds CLI flags for trace endpoint + OTLP endpoint; wires sinks into server. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if requestBody != nil { | ||
| if payload := requestBody["payload"]; payload != nil { | ||
| if b, err := json.Marshal(payload); err == nil { | ||
| httpStartAttrs["http.request.body"] = string(b) | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Telemetry currently serializes and sends the full request payload as http.request.body. This can easily include secrets/PII (credentials, tokens, customer data) and will be forwarded to the VS Code extension + shown in the webview logs. Consider removing body capture by default, redacting known sensitive fields/headers, and/or gating it behind an explicit opt-in flag (with size limits) to avoid accidental data exposure.
| if requestBody != nil { | |
| if payload := requestBody["payload"]; payload != nil { | |
| if b, err := json.Marshal(payload); err == nil { | |
| httpStartAttrs["http.request.body"] = string(b) | |
| } | |
| } | |
| } |
| // Include extracted step outputs in the end span | ||
| if stData, ok := state.StepsData[stepID].(map[string]interface{}); ok { | ||
| if outs := stData["outputs"]; outs != nil { | ||
| if b, err := json.Marshal(outs); err == nil { | ||
| attrs["step.outputs"] = string(b) | ||
| } | ||
| } |
There was a problem hiding this comment.
The step end span includes step.outputs serialized into attributes. Step outputs can contain sensitive data (tokens, customer info) and will be forwarded to the extension/webview and potentially external OTLP backends. Consider omitting outputs by default, redacting/allowlisting fields, and enforcing a size limit to prevent accidental data exfiltration and oversized span payloads.
| rpcClient?.onStateChanged((newState: MachineStateValue) => { | ||
| if (typeof newState === 'object' && 'ready' in newState && newState.ready === 'viewReady') { | ||
| fetchData(); | ||
| } | ||
| }); | ||
|
|
||
| // Listen for trace events and update step node overlays | ||
| rpcClient?.onTraceEvent((event: WebviewTraceEvent) => { | ||
| // Accumulate every event so the properties panel can display spans |
There was a problem hiding this comment.
rpcClient?.onStateChanged(...) and rpcClient?.onTraceEvent(...) are registered during render, so every re-render adds another listener. This will duplicate trace handling, cause repeated state updates, and leak memory over time. Register these listeners inside a useEffect that runs once per rpcClient instance (and dispose/unsubscribe if the messenger API supports it).
| // @ts-ignore | ||
| import '@xyflow/react/dist/style.css'; |
There was a problem hiding this comment.
Now that src/types.d.ts declares module "*.css", the // @ts-ignore before importing @xyflow/react/dist/style.css should be unnecessary. Keeping it suppresses real type errors in this file; prefer removing the ignore and relying on the module declaration.
| border-color: ${(props: NodeStyleProp) => { | ||
| // Trace state takes highest priority for border color | ||
| if (props.traceState === 'passed') return (ThemeColors as any).TESTING_PASSED; | ||
| if (props.traceState === 'failed') return ThemeColors.ERROR; | ||
| if (props.traceState === 'running') return ThemeColors.PRIMARY; |
There was a problem hiding this comment.
ThemeColors now defines TESTING_PASSED, so the (ThemeColors as any).TESTING_PASSED cast should not be needed. Removing the any cast will preserve type-safety and help catch theme key regressions.
| {traceStatus.state === 'running' ? null | ||
| : traceStatus.state === 'passed' | ||
| ? <img src={successIcon} width={14} height={14} /> | ||
| : <img src={failIcon} width={14} height={14} />} | ||
| </TraceIndicator> |
There was a problem hiding this comment.
The status icon <img> elements are missing alt text. Add an appropriate alt (e.g., "passed"/"failed") or mark them as decorative with empty alt + aria-hidden to avoid confusing screen readers.
| export const ConditionNodeWidget: React.FC<NodeProps<ConditionNodeData>> = ({ data, isConnectable, selected }) => { | ||
| const traceState = (data as any).traceStatus?.state; | ||
| return ( | ||
| <ConditionNodeContainer selected={selected}> | ||
| <ConditionNodeContainer selected={selected} traceState={traceState}> | ||
| <ConditionNodeContent> |
There was a problem hiding this comment.
traceStatus is accessed via (data as any).traceStatus, and traceState is typed as a plain string. Since the workflow view writes traceStatus onto condition nodes, it would be better to extend ConditionNodeData to include traceStatus?: StepTraceStatus (same pattern as Step/Start/End nodes) and type traceState as 'running' | 'passed' | 'failed' | undefined to avoid any casts.
| * | ||
| * WSO2 LLC. licenses this file to you under the Apache License, | ||
| * Version 2.0 (https://www.wso2.com) All Rights Reserved. | ||
| * | ||
| * WSO2 LLC. licenses this file to you under the Apache License, | ||
| * Version 2.0 (the "License"); you may not use this file except | ||
| * in compliance with the License. |
There was a problem hiding this comment.
The file header includes duplicated/incorrect Apache License lines ("Version 2.0 (https://www.wso2.com) All Rights Reserved." and a repeated "licenses this file" block). This should match the standard header used elsewhere to avoid licensing ambiguity.
| ## First run the jeager application | ||
| docker run -d --name jaeger ` -e COLLECTOR_OTLP_ENABLED=true ` -p 16686:16686 ` -p 4318:4318 ` jaegertracing/all-in-one:latest |
There was a problem hiding this comment.
Typo in heading: "jeager" should be "jaeger" (and the file name suggests Jaeger). Also consider formatting the docker run invocation as a fenced code block and removing the stray backticks so the command can be copied reliably.
| private server: http.Server | undefined; | ||
| private port: number; | ||
| private events: TraceEvent[] = []; | ||
| private outputChannel: vscode.OutputChannel; |
There was a problem hiding this comment.
Trace events are stored indefinitely in events: TraceEvent[] with no cap/rotation, which can grow without bound during long debugging sessions. Consider clearing events on start()/stop(), providing a max buffer size (ring buffer), and/or dropping oldest events to avoid extension-host memory growth.
…w they show the animation similar to steps and the input, output logs of the workflow as well
Purpose