add metrics to every route in queries, search, and trending#798
Merged
Conversation
Member
|
Awesome! Looks good. I think there are a couple more spots in search & trending, but if you follow the same pattern LGTM! thank you :) |
raymondjacobson
approved these changes
Sep 3, 2020
raymondjacobson
added a commit
that referenced
this pull request
Jun 1, 2026
## Summary
- advance Latest feed pagination by the number of mixed feed items
returned, not only tracks
- align the client offset with the API contract for /v1/users/{id}/feed,
which applies OFFSET over tracks + collections
- prevents overlapping/repeated pages when collections are present in
the feed
## Context
Past commits introduced mixed feed rendering and then changed Latest
feed pagination to count only track entries. That makes the client
request page 2 with an offset that is too small whenever page 1 includes
collections. Example: 6 tracks + 4 collections with limit 10 requests
offset 6 instead of 10, so the next API page overlaps already-rendered
items and can make pagination feel stuck.
The API history also shows separate server-side feed perf fixes (#798
for Latest feed planner cliffs, #805/#806/#817 for For You timeouts).
This PR addresses the current client-side mixed-item offset mismatch.
## Testing
- git diff --check
Could not run TypeScript locally because this worktree has no
node_modules and the shell has node but no npm/npx installed.
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.
Trello Card Link
https://trello.com/c/0OifTiUk/1527-api-add-route-metrics-logging-to-each-endpoint
Description
Add metrics logging for every route in
queries.pyServices
Does it touch a critical flow like Discovery indexing, Creator Node track upload, Creator Node gateway, or Creator Node file system?
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.
Include log analysis if applicable.
@record_metricsannotationsNote my previous visits to
/users,/tracks:After refreshing the page at
/tracks: