Feat: configurable max queryable traces by vtselect#114
Open
emamihe wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
2 issues found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/vtselect/traces/jaeger/jaeger.go">
<violation number="1" location="app/vtselect/traces/jaeger/jaeger.go:333">
P2: `-search.maxTraces` is not enforced when `limit` is omitted, so default limit 20 can exceed configured maximum.</violation>
</file>
<file name="app/vtselect/traces/tracecommon/tracecommon.go">
<violation number="1" location="app/vtselect/traces/tracecommon/tracecommon.go:29">
P2: `search.maxTraces` is a signed flag with no lower-bound validation, allowing negative values to propagate into query limit logic.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
db82af0 to
6e2e6ef
Compare
Contributor
Author
|
@jiekun I think this feature will also help us. because we are now heavily using victoria traces in our company. and one of the feedbacks I got from our dev team was that the official Jeager service was letting us to query max recent 1500 traces while the Jaeger-UI backed with Victoria Traces allow us to query up to recent 1000 traces. |
Member
|
Hi, thanks for the proposal. I think it's a valuable change and should be included in the next release. I'll take a look at it soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe Your Changes
This PR makes the maximum number of traces returned by the Jaeger
/api/tracessearch API configurable via a new command-line flag instead of a hardcoded constant.Changes:
-search.maxTraces(default: 1000) — maximum number of traces that can be returned in a single search requestmaxLimitconstant inapp/vtselect/traces/jaeger/jaeger.gowith*tracecommon.TraceMaxTracesTraceMaxTracesinapp/vtselect/traces/tracecommon/tracecommon.goalongside other trace search limits (TraceMaxServiceNameList,TraceMaxSpanNameList)docs/victoriatraces/README.mdImpact: Operators can now tune the trace search limit (e.g.
-search.maxTraces=2000) without code changes, improving flexibility for different workloads and environments.Checklist
The following checks are mandatory:
Summary by cubic
Adds a configurable max number of traces for Jaeger's /api/traces via -search.maxTraces and enforces it even when the client omits limit. Lets operators tune result size per environment.
Written for commit 6e2e6ef. Summary will update on new commits.