diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cb7579f50a..837c1224980 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ * [ENHANCEMENT] Added a configuration option `search_prefer_self` to allow the queriers to do some work while also leveraging serverless in search. [#1307](https://github.com/grafana/tempo/pull/1307) (@joe-elliott) * [ENHANCEMENT] Make trace combination/compaction more efficient [#1291](https://github.com/grafana/tempo/pull/1291) (@mdisibio) * [ENHANCEMENT] Add Content-Type headers to query-frontend paths [#1306](https://github.com/grafana/tempo/pull/1306) (@wperron) +* [ENHANCEMENT] Make search respect per tenant `max_bytes_per_trace` and added `skippedTraces` to returned search metrics. [#1318](https://github.com/grafana/tempo/pull/1318) (@joe-elliott) * [BUGFIX]: Remove unnecessary PersistentVolumeClaim [#1245](https://github.com/grafana/tempo/issues/1245) * [BUGFIX] Fixed issue when query-frontend doesn't log request details when request is cancelled [#1136](https://github.com/grafana/tempo/issues/1136) (@adityapwr) * [BUGFIX] Update OTLP port in examples (docker-compose & kubernetes) from legacy ports (55680/55681) to new ports (4317/4318) [#1294](https://github.com/grafana/tempo/pull/1294) (@mapno) diff --git a/cmd/tempo-serverless/handler.go b/cmd/tempo-serverless/handler.go index 0ab1779d73c..75cac173218 100644 --- a/cmd/tempo-serverless/handler.go +++ b/cmd/tempo-serverless/handler.go @@ -27,7 +27,9 @@ import ( "gopkg.in/yaml.v2" ) -const envConfigPrefix = "TEMPO" +const ( + envConfigPrefix = "TEMPO" +) // used to initialize a reader one time var ( @@ -50,6 +52,11 @@ func Handler(r *http.Request) (*tempopb.SearchResponse, *HTTPError) { return nil, httpError("parsing search request", err, http.StatusBadRequest) } + maxBytes, err := api.ExtractServerlessParams(r) + if err != nil { + return nil, httpError("extracting serverless params", err, http.StatusBadRequest) + } + // load config, fields are set through env vars TEMPO_ reader, cfg, err := loadBackend() if err != nil { @@ -116,6 +123,11 @@ func Handler(r *http.Request) (*tempopb.SearchResponse, *HTTPError) { resp.Metrics.InspectedTraces++ resp.Metrics.InspectedBytes += uint64(len(obj)) + if maxBytes > 0 && len(obj) > maxBytes { + resp.Metrics.SkippedTraces++ + continue + } + metadata, err := decoder.Matches(id, obj, searchReq.SearchReq) if err != nil { return nil, httpError("matching", err, http.StatusInternalServerError) diff --git a/docs/tempo/website/configuration/_index.md b/docs/tempo/website/configuration/_index.md index 8d7ee608744..1b90e715f2b 100644 --- a/docs/tempo/website/configuration/_index.md +++ b/docs/tempo/website/configuration/_index.md @@ -791,8 +791,12 @@ overrides: # RATE_LIMITED: ingestion rate limit (15000000 bytes) exceeded while adding 10 bytes [ingestion_rate_limit_bytes: | default = 15000000 (15MB) ] - # Maximum size of a single trace in bytes. `0` to disable. - # Results in errors like + # Maximum size of a single trace in bytes. `0` to disable + # This limit is used in 3 places: + # - During search traces will be skipped when they exceed this threshold. + # - During ingestion traces that exceeds this threshold will be refused. + # - During compaction traces that exceed this threshold will be partially dropped. + # During ingestion it results in errors like # TRACE_TOO_LARGE: max size of trace (5000000) exceeded while adding 387 bytes [max_bytes_per_trace: | default = 5000000 (5MB) ] diff --git a/modules/frontend/searchsharding.go b/modules/frontend/searchsharding.go index da4b86fcfd6..03a2e6d1a46 100644 --- a/modules/frontend/searchsharding.go +++ b/modules/frontend/searchsharding.go @@ -82,6 +82,7 @@ func (r *searchResponse) addResponse(res *tempopb.SearchResponse) { r.resultsMetrics.InspectedBytes += res.Metrics.InspectedBytes r.resultsMetrics.InspectedTraces += res.Metrics.InspectedTraces r.resultsMetrics.SkippedBlocks += res.Metrics.SkippedBlocks + r.resultsMetrics.SkippedTraces += res.Metrics.SkippedTraces } func (r *searchResponse) shouldQuit() bool { diff --git a/modules/frontend/searchsharding_test.go b/modules/frontend/searchsharding_test.go index a30001fa524..67b18c44313 100644 --- a/modules/frontend/searchsharding_test.go +++ b/modules/frontend/searchsharding_test.go @@ -493,6 +493,7 @@ func TestSearchSharderRoundTrip(t *testing.T) { InspectedBlocks: 2, InspectedBytes: 3, SkippedBlocks: 4, + SkippedTraces: 9, }}, status2: 200, response2: &tempopb.SearchResponse{ @@ -507,6 +508,7 @@ func TestSearchSharderRoundTrip(t *testing.T) { InspectedBlocks: 6, InspectedBytes: 7, SkippedBlocks: 8, + SkippedTraces: 10, }}, expectedStatus: 200, expectedResponse: &tempopb.SearchResponse{ @@ -525,6 +527,7 @@ func TestSearchSharderRoundTrip(t *testing.T) { InspectedBlocks: 1, InspectedBytes: 10, SkippedBlocks: 12, + SkippedTraces: 19, }}, }, { diff --git a/modules/overrides/limits.go b/modules/overrides/limits.go index 14933f5c72e..78a21900344 100644 --- a/modules/overrides/limits.go +++ b/modules/overrides/limits.go @@ -52,7 +52,6 @@ type Limits struct { // Ingester enforced limits. MaxLocalTracesPerUser int `yaml:"max_traces_per_user" json:"max_traces_per_user"` MaxGlobalTracesPerUser int `yaml:"max_global_traces_per_user" json:"max_global_traces_per_user"` - MaxBytesPerTrace int `yaml:"max_bytes_per_trace" json:"max_bytes_per_trace"` MaxSearchBytesPerTrace int `yaml:"max_search_bytes_per_trace" json:"max_search_bytes_per_trace"` // Metrics-generator processor config @@ -64,6 +63,10 @@ type Limits struct { // Querier enforced limits. MaxBytesPerTagValuesQuery int `yaml:"max_bytes_per_tag_values_query" json:"max_bytes_per_tag_values_query"` + // MaxBytesPerTrace is enforced in the Ingester, Compactor, Querier (Search) and Serverless (Search). It + // it not enforce currently when doing a trace by id lookup. + MaxBytesPerTrace int `yaml:"max_bytes_per_trace" json:"max_bytes_per_trace"` + // Configuration for overrides, convenient if it goes here. PerTenantOverrideConfig string `yaml:"per_tenant_override_config" json:"per_tenant_override_config"` PerTenantOverridePeriod model.Duration `yaml:"per_tenant_override_period" json:"per_tenant_override_period"` diff --git a/modules/querier/querier.go b/modules/querier/querier.go index ebfa60dfdb9..f4ad3683fa5 100644 --- a/modules/querier/querier.go +++ b/modules/querier/querier.go @@ -411,8 +411,14 @@ func (q *Querier) SearchBlock(ctx context.Context, req *tempopb.SearchBlockReque } // proxy externally! + tenantID, err := user.ExtractOrgID(ctx) + if err != nil { + return nil, errors.Wrap(err, "error extracting org id for externalEndpoint") + } + maxBytes := q.limits.MaxBytesPerTrace(tenantID) + endpoint := q.cfg.SearchExternalEndpoints[rand.Intn(len(q.cfg.SearchExternalEndpoints))] - return searchExternalEndpoint(ctx, endpoint, req) + return searchExternalEndpoint(ctx, endpoint, maxBytes, req) } func (q *Querier) internalSearchBlock(ctx context.Context, req *tempopb.SearchBlockRequest) (*tempopb.SearchResponse, error) { @@ -441,6 +447,8 @@ func (q *Querier) internalSearchBlock(ctx context.Context, req *tempopb.SearchBl DataEncoding: req.DataEncoding, } + maxBytes := q.limits.MaxBytesPerTrace(tenantID) + var searchErr error respMtx := sync.Mutex{} resp := &tempopb.SearchResponse{ @@ -458,6 +466,13 @@ func (q *Querier) internalSearchBlock(ctx context.Context, req *tempopb.SearchBl resp.Metrics.InspectedBytes += uint64(len(obj)) respMtx.Unlock() + if maxBytes > 0 && len(obj) > maxBytes { + respMtx.Lock() + resp.Metrics.SkippedTraces++ + respMtx.Unlock() + return false + } + metadata, err := decoder.Matches(id, obj, req.SearchReq) respMtx.Lock() @@ -524,7 +539,7 @@ func (q *Querier) postProcessSearchResults(req *tempopb.SearchRequest, rr []resp return response } -func searchExternalEndpoint(ctx context.Context, externalEndpoint string, searchReq *tempopb.SearchBlockRequest) (*tempopb.SearchResponse, error) { +func searchExternalEndpoint(ctx context.Context, externalEndpoint string, maxBytes int, searchReq *tempopb.SearchBlockRequest) (*tempopb.SearchResponse, error) { req, err := http.NewRequest(http.MethodGet, externalEndpoint, nil) if err != nil { return nil, fmt.Errorf("external endpoint failed to make new request: %w", err) @@ -533,6 +548,7 @@ func searchExternalEndpoint(ctx context.Context, externalEndpoint string, search if err != nil { return nil, fmt.Errorf("external endpoint failed to build search block request: %w", err) } + req = api.AddServerlessParams(req, maxBytes) err = user.InjectOrgIDIntoHTTPRequest(ctx, req) if err != nil { return nil, fmt.Errorf("external endpoint failed to inject tenant id: %w", err) diff --git a/modules/querier/querier_test.go b/modules/querier/querier_test.go index edaae7aad0a..f6d950cc198 100644 --- a/modules/querier/querier_test.go +++ b/modules/querier/querier_test.go @@ -8,6 +8,7 @@ import ( "time" "github.com/grafana/tempo/modules/ingester/client" + "github.com/grafana/tempo/modules/overrides" "github.com/grafana/tempo/pkg/tempopb" "github.com/stretchr/testify/require" "github.com/uber-go/atomic" @@ -60,7 +61,10 @@ func TestQuerierUsesSearchExternalEndpoint(t *testing.T) { for _, tc := range tests { numExternalRequests.Store(0) - q, err := New(tc.cfg, client.Config{}, nil, nil, nil) + o, err := overrides.NewOverrides(overrides.Limits{}) + require.NoError(t, err) + + q, err := New(tc.cfg, client.Config{}, nil, nil, o) require.NoError(t, err) for i := 0; i < tc.queriesToExecute; i++ { diff --git a/pkg/api/http.go b/pkg/api/http.go index a5051ee2b0a..a08612f539a 100644 --- a/pkg/api/http.go +++ b/pkg/api/http.go @@ -37,6 +37,9 @@ const ( urlParamDataEncoding = "dataEncoding" urlParamVersion = "version" + // maxBytes (serverless only) + urlParamMaxBytes = "maxBytes" + HeaderAccept = "Accept" HeaderContentType = "Content-Type" HeaderAcceptProtobuf = "application/protobuf" @@ -334,6 +337,37 @@ func BuildSearchBlockRequest(req *http.Request, searchReq *tempopb.SearchBlockRe return req, nil } +// AddServerlessParams takes an already existing http.Request and adds maxBytes +// to it +func AddServerlessParams(req *http.Request, maxBytes int) *http.Request { + if req == nil { + req = &http.Request{ + URL: &url.URL{}, + } + } + + q := req.URL.Query() + q.Set(urlParamMaxBytes, strconv.FormatInt(int64(maxBytes), 10)) + req.URL.RawQuery = q.Encode() + + return req +} + +// ExtractServerlessParams extracts params for the serverless functions from +// an http.Request +func ExtractServerlessParams(req *http.Request) (int, error) { + s, exists := extractQueryParam(req, urlParamMaxBytes) + if !exists { + return 0, nil + } + maxBytes, err := strconv.ParseInt(s, 10, 32) + if err != nil { + return 0, fmt.Errorf("invalid maxBytes: %w", err) + } + + return int(maxBytes), nil +} + func extractQueryParam(r *http.Request, param string) (string, bool) { value := r.URL.Query().Get(param) return value, value != "" diff --git a/pkg/api/http_test.go b/pkg/api/http_test.go index f0c70bf8ae4..d5762bf5870 100644 --- a/pkg/api/http_test.go +++ b/pkg/api/http_test.go @@ -10,6 +10,7 @@ import ( "github.com/grafana/tempo/cmd/tempo-query/tempo" "github.com/grafana/tempo/pkg/tempopb" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) // For licensing reasons these strings exist in two packages. This test exists to make sure they don't @@ -446,3 +447,30 @@ func TestBuildSearchRequest(t *testing.T) { assert.Equal(t, tc.query, actualURL.URL.String()) } } + +func TestAddServerlessParams(t *testing.T) { + actualURL := AddServerlessParams(nil, 10) + assert.Equal(t, "?maxBytes=10", actualURL.URL.String()) + + req, err := http.NewRequest("GET", "http://example.com", nil) + require.NoError(t, err) + + actualURL = AddServerlessParams(req, 10) + assert.Equal(t, "http://example.com?maxBytes=10", actualURL.URL.String()) +} + +func TestExtractServerlessParam(t *testing.T) { + r := httptest.NewRequest("GET", "http://example.com", nil) + maxBytes, err := ExtractServerlessParams(r) + require.NoError(t, err) + assert.Equal(t, 0, maxBytes) + + r = httptest.NewRequest("GET", "http://example.com?maxBytes=13", nil) + maxBytes, err = ExtractServerlessParams(r) + require.NoError(t, err) + assert.Equal(t, 13, maxBytes) + + r = httptest.NewRequest("GET", "http://example.com?maxBytes=blerg", nil) + _, err = ExtractServerlessParams(r) + assert.Error(t, err) +} diff --git a/pkg/tempopb/tempo.pb.go b/pkg/tempopb/tempo.pb.go index 8f0fd70df91..f39b8b4ee07 100644 --- a/pkg/tempopb/tempo.pb.go +++ b/pkg/tempopb/tempo.pb.go @@ -522,6 +522,7 @@ type SearchMetrics struct { InspectedBytes uint64 `protobuf:"varint,2,opt,name=inspectedBytes,proto3" json:"inspectedBytes,omitempty"` InspectedBlocks uint32 `protobuf:"varint,3,opt,name=inspectedBlocks,proto3" json:"inspectedBlocks,omitempty"` SkippedBlocks uint32 `protobuf:"varint,4,opt,name=skippedBlocks,proto3" json:"skippedBlocks,omitempty"` + SkippedTraces uint32 `protobuf:"varint,5,opt,name=skippedTraces,proto3" json:"skippedTraces,omitempty"` } func (m *SearchMetrics) Reset() { *m = SearchMetrics{} } @@ -585,6 +586,13 @@ func (m *SearchMetrics) GetSkippedBlocks() uint32 { return 0 } +func (m *SearchMetrics) GetSkippedTraces() uint32 { + if m != nil { + return m.SkippedTraces + } + return 0 +} + type SearchTagsRequest struct { } @@ -992,75 +1000,75 @@ func init() { func init() { proto.RegisterFile("pkg/tempopb/tempo.proto", fileDescriptor_f22805646f4f62b6) } var fileDescriptor_f22805646f4f62b6 = []byte{ - // 1076 bytes of a gzipped FileDescriptorProto + // 1083 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x36, 0x25, 0xd9, 0x32, 0xc7, 0x92, 0x7f, 0x36, 0x89, 0xcd, 0x32, 0x86, 0x6c, 0x10, 0x46, - 0xab, 0x43, 0x23, 0x27, 0x4a, 0xda, 0xb4, 0xb9, 0x14, 0x15, 0xec, 0xa6, 0x06, 0xaa, 0xc0, 0xa5, - 0x5c, 0xdf, 0x57, 0xe4, 0x46, 0x26, 0x2c, 0x71, 0x19, 0x72, 0x65, 0xd8, 0x7d, 0x80, 0x9e, 0x8a, - 0xa2, 0xaf, 0xd0, 0x47, 0xe8, 0x5b, 0xe4, 0xd0, 0x02, 0x39, 0x16, 0x3d, 0x04, 0x85, 0xfd, 0x1e, - 0x45, 0xb1, 0xbf, 0x22, 0xe9, 0x9f, 0x43, 0x73, 0x12, 0xe7, 0x9b, 0x6f, 0x67, 0x67, 0xbe, 0x9d, - 0xd9, 0x15, 0x6c, 0x24, 0xa7, 0xa3, 0x5d, 0x46, 0x26, 0x09, 0x4d, 0x86, 0xf2, 0xb7, 0x93, 0xa4, - 0x94, 0x51, 0x54, 0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24, - 0x0e, 0x68, 0x18, 0xc5, 0x23, 0xd5, 0x80, 0xc6, 0xe6, 0x11, 0xa2, 0x38, 0x24, 0xe7, 0x3c, 0xdc, - 0x20, 0xfa, 0x91, 0x28, 0x6d, 0x8a, 0x20, 0xef, 0x10, 0x46, 0x19, 0x1e, 0xfb, 0x24, 0xa0, 0x69, - 0x98, 0x39, 0x75, 0xd9, 0x21, 0x79, 0x8c, 0x73, 0x42, 0xcc, 0xf0, 0xbe, 0xde, 0x69, 0x51, 0xec, - 0x54, 0xc0, 0x78, 0x9d, 0x67, 0x24, 0xcd, 0x22, 0x1a, 0x3b, 0xb6, 0xac, 0x53, 0x99, 0xde, 0x39, - 0x2c, 0x6b, 0x75, 0xd4, 0x10, 0x3c, 0x83, 0x05, 0xd1, 0xe7, 0xba, 0xc3, 0x36, 0x8b, 0xdd, 0x2d, - 0xd9, 0x7d, 0xc2, 0x30, 0xdf, 0xc1, 0x57, 0x5c, 0xf4, 0xb8, 0x3c, 0x14, 0x65, 0xf5, 0xaf, 0x4d, - 0xc4, 0x9f, 0x16, 0xdc, 0xbb, 0x21, 0x62, 0xf9, 0x36, 0xb0, 0x67, 0xb7, 0x41, 0x1b, 0x56, 0x52, - 0x4a, 0xd9, 0x80, 0xa4, 0x67, 0x51, 0x40, 0x5e, 0xe1, 0x89, 0x6e, 0x8f, 0x32, 0xcc, 0xd5, 0xe5, - 0x90, 0x08, 0x2f, 0x78, 0xf2, 0x72, 0x28, 0x82, 0xe8, 0x53, 0x58, 0x13, 0x47, 0x7a, 0x14, 0x4d, - 0xc8, 0x0f, 0x71, 0x74, 0xfe, 0x0a, 0xc7, 0x54, 0x9c, 0x64, 0xcd, 0xbf, 0xee, 0xe0, 0x77, 0x51, - 0x38, 0x1b, 0x09, 0xd9, 0xde, 0x39, 0xc4, 0xfb, 0xdd, 0xd2, 0x93, 0xaa, 0xe7, 0xbb, 0x0d, 0x2b, - 0x51, 0x9c, 0x25, 0x24, 0x60, 0x24, 0x3c, 0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1, 0xa2, 0xf8, 0x6f, 0xf9, 0xf4, 0xbf, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x9e, 0x0d, 0x2e, 0x59, 0xc4, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1868,6 +1876,11 @@ func (m *SearchMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SkippedTraces != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.SkippedTraces)) + i-- + dAtA[i] = 0x28 + } if m.SkippedBlocks != 0 { i = encodeVarintTempo(dAtA, i, uint64(m.SkippedBlocks)) i-- @@ -2404,6 +2417,9 @@ func (m *SearchMetrics) Size() (n int) { if m.SkippedBlocks != 0 { n += 1 + sovTempo(uint64(m.SkippedBlocks)) } + if m.SkippedTraces != 0 { + n += 1 + sovTempo(uint64(m.SkippedTraces)) + } return n } @@ -3888,6 +3904,25 @@ func (m *SearchMetrics) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SkippedTraces", wireType) + } + m.SkippedTraces = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SkippedTraces |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) diff --git a/pkg/tempopb/tempo.proto b/pkg/tempopb/tempo.proto index af59a2e1d15..cce518f076e 100644 --- a/pkg/tempopb/tempo.proto +++ b/pkg/tempopb/tempo.proto @@ -83,6 +83,7 @@ message SearchMetrics { uint64 inspectedBytes = 2; uint32 inspectedBlocks = 3; uint32 skippedBlocks = 4; + uint32 skippedTraces = 5; } message SearchTagsRequest {