-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Use OpenTelemetry span_name terminology in jaegermcp extension #7916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: yurishkuro <3523016+yurishkuro@users.noreply.github.com>
Co-authored-by: yurishkuro <3523016+yurishkuro@users.noreply.github.com>
Co-authored-by: yurishkuro <3523016+yurishkuro@users.noreply.github.com>
There was a problem hiding this 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 PR modernizes the jaegermcp extension by replacing legacy Jaeger terminology with OpenTelemetry standard terminology. Specifically, it renames operation_name/operation to span_name throughout the codebase to align with OTLP conventions and reduce confusion for users familiar with modern observability standards.
Changes:
- Updated type definitions to use
span_nameinstead ofoperation_name/operationin input/output structures - Modified handlers to populate the renamed fields correctly
- Updated ADR 002 documentation to reflect the new terminology in tool specifications and examples
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| docs/adr/002-mcp-server.md | Updated all tool specifications and examples to use span_name terminology |
| cmd/jaeger/internal/extension/jaegermcp/internal/types/search_traces.go | Renamed OperationName to SpanName in input type and RootOperation to RootSpanName in summary type |
| cmd/jaeger/internal/extension/jaegermcp/internal/types/get_trace_topology.go | Renamed Operation field to SpanName in SpanNode type |
| cmd/jaeger/internal/extension/jaegermcp/internal/types/get_span_details.go | Renamed Operation field to SpanName in SpanDetail type |
| cmd/jaeger/internal/extension/jaegermcp/internal/types/get_critical_path.go | Renamed Operation field to SpanName in CriticalPathSegment type |
| cmd/jaeger/internal/extension/jaegermcp/internal/handlers/test_helpers_test.go | Updated parameter name from operationName to spanName in test helper function |
| cmd/jaeger/internal/extension/jaegermcp/internal/handlers/search_traces_test.go | Updated test assertions to use RootSpanName and SpanName fields |
| cmd/jaeger/internal/extension/jaegermcp/internal/handlers/search_traces.go | Updated handler to map SpanName to internal OperationName storage field and populate RootSpanName in output |
| cmd/jaeger/internal/extension/jaegermcp/internal/handlers/get_trace_topology_test.go | Updated test assertions to access SpanName field instead of Operation |
| cmd/jaeger/internal/extension/jaegermcp/internal/handlers/get_trace_topology.go | Updated handler to populate SpanName field in SpanNode construction |
| cmd/jaeger/internal/extension/jaegermcp/internal/handlers/get_trace_errors_test.go | Updated test assertions to access SpanName field |
| cmd/jaeger/internal/extension/jaegermcp/internal/handlers/get_span_details_test.go | Updated test assertions to access SpanName field |
| cmd/jaeger/internal/extension/jaegermcp/internal/handlers/get_span_details.go | Updated handler to populate SpanName field in SpanDetail construction |
| cmd/jaeger/internal/extension/jaegermcp/internal/handlers/get_critical_path_test.go | Updated test assertion to check SpanName field |
| cmd/jaeger/internal/extension/jaegermcp/internal/handlers/get_critical_path.go | Updated handler to populate SpanName field in CriticalPathSegment construction |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7916 +/- ##
==========================================
- Coverage 95.53% 95.50% -0.03%
==========================================
Files 312 312
Lines 16512 16512
==========================================
- Hits 15774 15770 -4
- Misses 576 579 +3
- Partials 162 163 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The jaegermcp extension was using legacy Jaeger terminology (
operation_name,operation) instead of OpenTelemetry standard terminology (span_name). This creates confusion for users familiar with OTLP and diverges from modern observability conventions.Changes
Type definitions updated:
SearchTracesInput:operation_name→span_nameTraceSummary:root_operation→root_span_nameSpanNode:operation→span_nameCriticalPathSegment:operation→span_nameSpanDetail:operation→span_nameHandlers updated to populate new field names in:
search_traces.goget_trace_topology.goget_critical_path.goget_span_details.goADR 002 updated throughout with corrected terminology in tool specifications and examples.
Example
MCP tool responses now use OpenTelemetry-aligned naming:
{ "trace_id": "abc123", "root_service": "frontend", "root_span_name": "/api/checkout", // was: root_operation "span_count": 47 }Note
Internal storage layer (
tracestore.TraceQueryParams.OperationName) retains legacy naming for backward compatibility. Mapping handled in search handler.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.