Skip to content

Conversation

@tobert
Copy link
Owner

@tobert tobert commented Apr 21, 2025

  • Added Model Context Provider (MCP) server for agent-assisted code understanding
    • analyzes spans to extract code context (file paths, line numbers, function names)
    • provides a web UI for exploring traces
    • includes WebSocket API for real-time updates
    • offers REST APIs for querying traces, spans, and file associations
    • has an embedded UI with go:embed
    • adjusted some bits of otel-cli server to make it fit better

Copilot AI review requested due to automatic review settings April 21, 2025 21:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces a new Model Context Provider (MCP) server for exposing trace data to coding agents. Key changes include:

  • Adding a new "mcp" command and associated configuration and server logic.
  • Updating the runServer signature across different server modes to accept a pointer to the config.
  • Embedding a UI via go:embed and expanding documentation and changelog entries.

Reviewed Changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
otelcli/server_tui.go Updates to pass a pointer to config when calling runServer.
otelcli/server_mcp.go New MCP server command and flag setup for agent-assisted code tracing.
otelcli/server_json.go Updates to pass config as a pointer to runServer.
otelcli/server.go Updated runServer signature and added a helper for interrupt handling.
otelcli/config.go Minor update to ensure Diag.EndpointSource is initialized correctly.
mcpserver/* New MCP server implementations including UI handler, store, API, and analyzer.
README.md & CHANGELOG.md Updated documentation and changelog for the new MCP server feature.
Files not reviewed (1)
  • go.mod: Language not supported
Comments suppressed due to low confidence (2)

otelcli/server_mcp.go:14

  • [nitpick] The identifier 'mcpSvr' is somewhat ambiguous; consider renaming it to 'mcpFlags' or 'mcpConfigFlags' to more clearly indicate that this struct stores command-line flag values.
var mcpSvr struct {

mcpserver/store.go:113

  • The nested loop used for sorting 'ages' is a naive bubble sort; consider using sort.Slice with a custom comparison function for improved clarity and performance.
for i := 0; i < len(ages); i++ {

@tobert
Copy link
Owner Author

tobert commented Nov 9, 2025

@tobert tobert closed this Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants