Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

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_namespan_name
  • TraceSummary: root_operationroot_span_name
  • SpanNode: operationspan_name
  • CriticalPathSegment: operationspan_name
  • SpanDetail: operationspan_name

Handlers updated to populate new field names in:

  • search_traces.go
  • get_trace_topology.go
  • get_critical_path.go
  • get_span_details.go

ADR 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

Review code in cmd/jaeger/internal/extension/jaegermcp/ and make sure it is consistently using OpenTelemetry terminology like span_name instead of operation_name (legacy Jaeger namig). Update all types and variable names accordingly. Update ADR 002 as needed.


💡 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.

Copilot AI and others added 3 commits January 23, 2026 15:29
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>
Copilot AI changed the title [WIP] Update code to use OpenTelemetry terminology Use OpenTelemetry span_name terminology in jaegermcp extension Jan 23, 2026
Copilot AI requested a review from yurishkuro January 23, 2026 15:39
@yurishkuro yurishkuro marked this pull request as ready for review January 23, 2026 16:05
@yurishkuro yurishkuro requested a review from a team as a code owner January 23, 2026 16:05
Copilot AI review requested due to automatic review settings January 23, 2026 16:05
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 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_name instead of operation_name/operation in 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.

@yurishkuro yurishkuro added the changelog:experimental Change to an experimental part of the code label Jan 23, 2026
@yurishkuro yurishkuro merged commit ee71ca6 into main Jan 23, 2026
59 of 63 checks passed
@yurishkuro yurishkuro deleted the copilot/update-opentelemetry-terminology branch January 23, 2026 16:13
@codecov
Copy link

codecov bot commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.50%. Comparing base (c6bd06d) to head (9680423).
⚠️ Report is 1 commits behind head on main.

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     
Flag Coverage Δ
badger_v1 9.27% <ø> (ø)
badger_v2 1.93% <ø> (ø)
cassandra-4.x-v1-manual 13.64% <ø> (ø)
cassandra-4.x-v2-auto 1.92% <ø> (ø)
cassandra-4.x-v2-manual 1.92% <ø> (ø)
cassandra-5.x-v1-manual 13.64% <ø> (ø)
cassandra-5.x-v2-auto 1.92% <ø> (ø)
cassandra-5.x-v2-manual 1.92% <ø> (ø)
clickhouse 1.97% <ø> (ø)
elasticsearch-6.x-v1 17.57% <ø> (ø)
elasticsearch-7.x-v1 17.60% <ø> (ø)
elasticsearch-8.x-v1 17.75% <ø> (ø)
elasticsearch-8.x-v2 1.93% <ø> (ø)
elasticsearch-9.x-v2 ?
grpc_v1 8.59% <ø> (ø)
grpc_v2 1.93% <ø> (ø)
kafka-3.x-v2 1.93% <ø> (ø)
memory_v2 1.93% <ø> (ø)
opensearch-1.x-v1 17.64% <ø> (ø)
opensearch-2.x-v1 ?
opensearch-2.x-v2 1.93% <ø> (ø)
opensearch-3.x-v2 1.93% <ø> (ø)
query 1.93% <ø> (ø)
tailsampling-processor 0.55% <ø> (ø)
unittests 94.17% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/otel changelog:experimental Change to an experimental part of the code enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants