Skip to content

Commit

Permalink
add new cache page (#9949)
Browse files Browse the repository at this point in the history
* add new cache page

* Update docs/product/performance/cache-monitoring/index.mdx

* Update docs/product/performance/cache-monitoring/index.mdx

* Update docs/product/performance/cache-monitoring/index.mdx

* Update docs/product/performance/cache-monitoring/index.mdx

* Update docs/product/performance/cache-monitoring/index.mdx

Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com>

* update link

* update link

* Update docs/product/performance/caches/index.mdx

* custom instrumentation

* add django cache_spans option

* update

---------

Co-authored-by: Dominik Buszowiecki <44422760+DominikB2014@users.noreply.github.com>
Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com>
Co-authored-by: Dominik Buszowiecki <DominikB2014@gmail.com>
  • Loading branch information
4 people committed May 22, 2024
1 parent fb9d30a commit 0d61933
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 9 deletions.
29 changes: 29 additions & 0 deletions docs/product/performance/caches/cache-page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: "Cache Page"
sidebar_order: 55
description: "Learn more about Sentry's Cache page, which provides insights into cache utilization and latency, so you can investigate potential cache performance issues."
---

The **Caches** page gives an overview of cache performance across all endpoints for currently selected backend projects with summary graphs for **Miss Rate** and **Requests Per Minute** (throughput). You can use these as a starting point to see if there are any potential cache performance issues, for example, a higher than expected Miss Rate percentage.

If you see an anomaly or want to investigate a time range further, click and drag to select a range directly in the graph and data will be filtered for that specific time range only.

The transaction table shows a list of endpoints that contain at least one `cache.get` span along with:

- Its average value size (the bytes being fetched from cache)
- Throughput
- Average transaction duration
- Miss rate percentage (how often did a lookup did not return a value)
- Time spent (total time your application spent on a given transaction)

By default, this table is sorted by most time spent. This means that endpoints at the top are usually really slow, requested very frequently, or both. You can change the sort order to view top transactions by throughput, miss rate percentage, average value size, or average transaction duration.

To investigate a specific endpoint, click on it to open a sidebar showing some sample events and additional duration metrics.

## Sample List

To help you compare the performances of cache hits (where a value was found in the cache) versus misses (where no value corresponding to the key was found in the cache) over time, Sentry automatically surfaces a distribution of both samples for the timeframe selected from the **Caches** page.

These sample events are shown as triangles in the average duration graphs at the top. These sample events are also listed in the table below, along with their spans, key, transaction duration, and hit/miss status.

From the sample list, you can drill down to specific good, average, or bad examples of cache performance within an endpoint. To view the detailed trace that contained the span operation, click on a **Span ID**.
33 changes: 33 additions & 0 deletions docs/product/performance/caches/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: "Caches"
sidebar_order: 50
description: "Learn more about cache monitoring with Sentry and how it can help improve your application's performance."
---

<Include name="feature-stage-alpha.mdx" />

A cache can be used to speed up data retrieval, thereby improving application performance. A cache stores data temporarily to speed up subsequent access to that data. This allows your application to get data from cached memory (if it is available) instead having to download that data again or retrieving it from a potentially slow data layer. Caching can speed up read-heavy workloads for applications like Q&A portals, gaming, media sharing, and social networking.

A successful cache results in a high hit rate which means the data was present when fetched. A cache miss occurs when the data fetched was not present in the cache. If you have performance monitoring enabled and your application uses caching, you can see how your caches are performing with Sentry.

Sentry's cache monitoring provides insights into cache utilization and latency so that you can improve the performance of the endpoints that interact with caches.

Starting with the [Cache page](https://sentry.io/orgredirect/organizations/:orgslug/performance/caches/), you get an overview of the transactions within your application that are making at least one lookup against a cache. From there, you can dig into specific cache span operations by clicking a transaction and viewing its sample list.

## Instrumentation

Cache monitoring currently supports [auto instrumentation](/platform-redirect/?next=%2Fperformance%2Finstrumentation%2Fautomatic-instrumentation) for [Django's cache framework](https://docs.djangoproject.com/en/5.0/topics/cache/) when the [cache_spans option](https://docs.sentry.io/platforms/python/integrations/django/#options) is set to `True`. Other frameworks require custom instrumentation.

### Custom instrumentation

If available, custom instrumentation is documented on an environment-by-environment basis as listed below:

- [Python SDK](/platforms/python/performance/instrumentation/custom-instrumentation/caches-module/)
- [JavaScript SDKs](/platforms/javascript/performance/instrumentation/custom-instrumentation/caches-module/)
- [Laravel SDK](/platforms/php/guides/laravel/performance/instrumentation/custom-instrumentation/)
- [Java SDK](/platforms/java/performance/instrumentation/custom-instrumentation/)
- [Ruby SDK](/platforms/ruby/performance/instrumentation/custom-instrumentation/)
- [.NET SDK](/platforms/dotnet/performance/instrumentation/custom-instrumentation/)
- [Symfony SDK](/platforms/php/guides/symfony/performance/instrumentation/custom-instrumentation/)

To see what cache data can be set on spans, see the [Cache Module Developer Specification](https://develop.sentry.dev/sdk/performance/modules/caches/).
2 changes: 1 addition & 1 deletion docs/product/performance/metrics.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Performance Metrics"
sidebar_order: 90
sidebar_order: 110
description: "Learn more about Sentry's Performance metrics such as Apdex, failure rate, throughput, and latency, and the user experience insights about your application that they provide."
---

Expand Down
2 changes: 1 addition & 1 deletion docs/product/performance/mobile-vitals/app-starts.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "App Starts"
sidebar_order: 50
sidebar_order: 20
description: "Learn how to monitor your mobile application's performance by using App Starts to identify slow or regressed screens."
---

Expand Down
2 changes: 1 addition & 1 deletion docs/product/performance/mobile-vitals/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Mobile Vitals"
sidebar_order: 70
sidebar_order: 100
description: "Learn more about Mobile Vitals in Sentry, and how they give you a better understanding of your mobile application's health."
---

Expand Down
2 changes: 1 addition & 1 deletion docs/product/performance/performance-overhead.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Performance Overhead
sidebar_order: 95
sidebar_order: 120
description: "Learn more about how enabling Performance Monitoring in Sentry impacts the performance of your application."
---

Expand Down
2 changes: 1 addition & 1 deletion docs/product/performance/queries.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Queries
sidebar_order: 50
sidebar_order: 60
description: "Monitor the performance of your database queries and drill into samples to investigate further."
---

Expand Down
2 changes: 1 addition & 1 deletion docs/product/performance/requests.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Requests
sidebar_order: 55
sidebar_order: 80
description: "Track the performance of your application's HTTP requests and drill into the domains serving those requests."
---

Expand Down
2 changes: 1 addition & 1 deletion docs/product/performance/resources.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Resources
sidebar_order: 50
sidebar_order: 70
description: "Learn more about browser resource performance monitoring, which allows you to debug the performance of loading JavaScript and CSS on your frontend."
---

Expand Down
2 changes: 1 addition & 1 deletion docs/product/performance/retention-priorities/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Retention Priorities
sidebar_order: 100
sidebar_order: 130
description: "Learn how Sentry determines retention priorities and how to update them."
---

Expand Down
2 changes: 1 addition & 1 deletion docs/product/performance/web-vitals/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Web Vitals"
sidebar_order: 60
sidebar_order: 90
description: "Understand your application's performance score and how each web vital contributes to it. Drill in to explore opportunities to improve your app's overall performance."
---

Expand Down

0 comments on commit 0d61933

Please sign in to comment.