Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add maximum spans per span set #4383

Merged
merged 1 commit into from
Nov 27, 2024
Merged

Conversation

carles-grafana
Copy link
Contributor

@carles-grafana carles-grafana commented Nov 26, 2024

What this PR does:

Add maximum spans per span set.

Which issue(s) this PR fixes:
Fixes #4275

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Member

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Needs some doc, changelog and a simple unit test.

modules/frontend/config.go Outdated Show resolved Hide resolved
modules/frontend/search_sharder.go Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved


# The maximum allowed value of spans per span set. 0 disables this limit.
[max_spans_per_span_set]: <int> | default = 100]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we set it to 0 by default? then it won't be a breaking change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not opposed to 0. If you all prefer it, we can do that.

However, this feels like a sensible default that will help all OSS users so i'd prefer the breaking change that just makes Tempo operate better.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's okay to me. It simplify setting up Tempo for sure

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs more context so people know what a limit of 100 spansets mean. Are we talking about results of a traceql query?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a limit of 100 spans per spanset. it would be this field in Grafana:

image

naturally this can be adjusted to whatever works for your org (or turned off with 0)

Copy link
Member

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the conflict in the changelog and we'll merge!

@@ -731,6 +732,12 @@ func TestSearchSharderRoundTripBadRequest(t *testing.T) {
resp, err = testRT.RoundTrip(pipeline.NewHTTPRequest(req))
testBadRequestFromResponses(t, resp, err, "range specified by start and end exceeds 5m0s. received start=1000 end=1500")

// spans per span set greater than maximum
req = httptest.NewRequest("GET", "/?spss=200", nil)
req = req.WithContext(user.InjectOrgID(req.Context(), "blerg"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"blerg". well, i guess you're officially on the team now :)

This as a breaking change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit maximun number of spans for span sets
4 participants