Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ You can identify the root cause of your N+1 API Call problems by looking at thre

- Transaction name
- Repeating spans - This is the URL that's receiving the repeated network calls
- Parameters - These are the query parameters that vary between the network calls
- Query and Path Parameters - These are the parameters that vary between the network calls
- Waterfall trace view - Shows the parent span in which the issue occurred

![N+1 API Calls span evidence](./img/n-plus-one-api-calls-evidence.png)

View it by going to the **Issues** page in Sentry, clicking on the N+1 API Call error you want to examine, then scrolling down to the "Span Evidence" section in the "Details" tab.
View it by going to the **Issues** page in Sentry, clicking on the N+1 API Call error you want to examine, then scrolling down to the "Span Evidence" section.

## Fingerprinting

Expand All @@ -64,9 +65,7 @@ const Book({ id }) => {
};
```

If the list has 100 books in it, the page will make 100 network calls simultaneously. The number 100 is the "N" in "N+1 API Call". This effect is visible in the span waterfall, which shows all the simultaneous network requests:

![N+1 API Calls in an example application](./img/n-plus-one-api-calls-in-book-application.png)
If the list has 100 books in it, the page will make 100 network calls simultaneously. The number 100 is the "N" in "N+1 API Call". This effect is visible in the span waterfall, which shows all the simultaneous network requests.

## Fixing N+1 API Call Issues

Expand Down
Loading