File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
cmd/jaeger/internal/extension/jaegermcp Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ type Config struct {
2323 ServerVersion string `mapstructure:"server_version" valid:"required"`
2424
2525 // MaxSpanDetailsPerRequest limits the number of spans that can be fetched in a single request.
26- MaxSpanDetailsPerRequest int `mapstructure:"max_span_details_per_request" valid:"range(1|100)" `
26+ MaxSpanDetailsPerRequest int `mapstructure:"max_span_details_per_request"`
2727
2828 // MaxSearchResults limits the number of trace search results.
2929 MaxSearchResults int `mapstructure:"max_search_results" valid:"range(1|1000)"`
@@ -37,6 +37,9 @@ func (cfg *Config) Validate() error {
3737 if cfg .MaxSpanDetailsPerRequest < 1 {
3838 return fmt .Errorf ("max_span_details_per_request must be at least 1" )
3939 }
40+ if cfg .MaxSpanDetailsPerRequest > 100 {
41+ return fmt .Errorf ("max_span_details_per_request must not exceed 100" )
42+ }
4043
4144 _ , err := govalidator .ValidateStruct (cfg )
4245 return err
You can’t perform that action at this time.
0 commit comments