jaegertracing / jaegertracing/jaeger

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

Open
#8,564 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
23.2k
Forks
3.1k
Avg merge
1d 8h
Merged PRs (30d)
93

Description

### 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

```shell

```

### 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

```shell

```

Contributor guide

Open the contributing guide

Research direction

Start with config.go line 24 and the branches at get_trace_errors.go:76 and get_trace_topology.go:87, then read the related ADR. Resolve whether zero means unlimited or should be rejected, with maintainer input, and make validation, handler behavior, and documentation consistent with that decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.