# How It Works

##

Sentry uses code-mappings to determine the repository and default branch for the stack trace frame to query Codecov's coverage report endpoint. The endpoint gives Sentry the coverage state for each line so that it can be applied to the stack trace in the UI. This makes it possible for users to see the untested code that's causing errors, including whether it's partially or fully covered directly in the stack trace. This helps you avoid similar errors in the future.

[![Codecov in Sentry](/_next/image/?url=%2Fmdx-images%2Fcodecov-read-timeout-M3V6PKST.png%231400x589\&w=3840\&q=75)](/mdx-images/codecov-read-timeout-M3V6PKST.png)
