adjusts the limit based on provided config
(limit, defaultLimit, maxLimit uint32)
| 163 | |
| 164 | // adjusts the limit based on provided config |
| 165 | func adjustLimit(limit, defaultLimit, maxLimit uint32) (uint32, error) { |
| 166 | if limit == 0 { |
| 167 | return defaultLimit, nil |
| 168 | } |
| 169 | |
| 170 | if maxLimit != 0 && limit > maxLimit { |
| 171 | return 0, fmt.Errorf("limit %d exceeds max limit %d", limit, maxLimit) |
| 172 | } |
| 173 | |
| 174 | return limit, nil |
| 175 | } |
| 176 | |
| 177 | func logResult(ctx context.Context, logger log.Logger, tenantID string, durationSeconds float64, req *tempopb.SearchRequest, resp *tempopb.SearchResponse, httpResp *http.Response, err error) { |
| 178 | traceID, _ := tracing.ExtractTraceID(ctx) |
no outgoing calls