jaeger icon indicating copy to clipboard operation
jaeger copied to clipboard

[Bug]: (jaegermcp) max_span_details_per_request validation contradicts handler "0 = unlimited" semantics

Open Vi-shub opened this issue 6 months ago • 1 comments

What happened?

Config.MaxSpanDetailsPerRequest is validated with valid:"range(1|100)" (config.go line 24), so 0 is rejected at startup. However, get_trace_errors.go:76 and get_trace_topology.go:87 both contain == 0 / > 0 branches that treat 0 as "no limit". Those branches are dead under current validation, and the inconsistency is confusing for future contributors and for the upcoming Skills Framework (#8440), which will need a clear answer for "is there a configurable no-limit mode?".

Steps to reproduce

Just run the project and check how Config.MaxSpanDetailsPerRequest is validated

Expected behavior

Resolution choice —> would prefer maintainer input:

A) Relax validation to range(0|100) and document 0 = unlimited in config.go and the ADR. Keeps the existing handler branches alive and gives operators an escape hatch. B) Remove the == 0 / > 0 special cases from handlers and rely on validation as the single source of truth. Less expressive but simpler.

Relevant log output


Screenshot

No response

Additional context

Hi @yurishkuro need your assistance for this issue. I'll send a PR for whichever direction you prefer. Either way it removes the current dead code / mismatch. Thanks for your time.

Jaeger backend version

No response

SDK

No response

Pipeline

No response

Stogage backend

No response

Operating system

No response

Deployment model

No response

Deployment configs


Vi-shub avatar May 11 '26 20:05 Vi-shub

Hi @Vi-shub, I’ve been exploring the Jaeger MCP codebase recently and this issue looks really interesting to me, especially because of the validation/configuration consistency and its connection to the upcoming Skills Framework work. If nobody else is currently working on it, I’d love to take a shot at contributing a fix for it.

farazmirzax avatar May 16 '26 16:05 farazmirzax