Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ed1cb82
add last_updated information to develop docs
dingsdax Dec 1, 2025
16ad85f
fix TS null vs undefined
dingsdax Dec 1, 2025
4e916b6
Lint
dingsdax Dec 1, 2025
2fa50bb
Merge branch 'master' into develop_doc_last_updated
dingsdax Dec 1, 2025
928a878
[getsentry/action-github-commit] Auto commit
getsantry[bot] Dec 1, 2025
60325f6
[getsentry/action-github-commit] Auto commit
getsantry[bot] Dec 1, 2025
2261774
Fix for only showing on develop docs
dingsdax Dec 1, 2025
353c895
[getsentry/action-github-commit] Auto commit
getsantry[bot] Dec 1, 2025
f387289
return new object copies, preventing reference sharing in cached meta…
dingsdax Dec 1, 2025
df13418
[getsentry/action-github-commit] Auto commit
getsantry[bot] Dec 1, 2025
af1d879
Add some debug code
dingsdax Dec 2, 2025
6733525
Update getGitMetadata.ts
dingsdax Dec 2, 2025
dbee391
Capture queue time docs
dingsdax Jan 15, 2026
8a1891a
Merge branch 'master' into queue-time-metric
dingsdax Jan 15, 2026
340aa90
[getsentry/action-github-commit] Auto commit
getsantry[bot] Jan 15, 2026
d421c30
[getsentry/action-github-commit] Auto commit
getsantry[bot] Jan 15, 2026
72c0502
remove unrelated code
dingsdax Jan 16, 2026
de260a4
Merge branch 'master' into queue-time-metric
dingsdax Jan 16, 2026
9dec483
Apply suggestions from code review
dingsdax Jan 23, 2026
f7ddb6f
Fix attribute name, simplify options
dingsdax Jan 23, 2026
7381a33
Merge branch 'master' into queue-time-metric
dingsdax Feb 24, 2026
1d55734
Merge branch 'master' into queue-time-metric
dingsdax Feb 24, 2026
100bfc5
docs(ruby): Review and fix queue time capture docs
dingsdax Feb 24, 2026
5894dc4
fix(ruby): Use PlatformLink for queue time capture reference in options
dingsdax Feb 24, 2026
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
16 changes: 15 additions & 1 deletion docs/platforms/ruby/common/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,20 @@ config.trace_ignore_status_codes = [404, (502..511)]

</SdkOption>

<SdkOption name="capture_queue_time" type="Boolean" defaultValue="true">

Automatically capture how long requests wait in the web server queue before processing begins. The SDK reads the `X-Request-Start` header set by reverse proxies (Nginx, HAProxy, Heroku) and attaches queue time to transactions as `http.server.request.time_in_queue`.

This helps identify when requests are delayed due to insufficient worker threads or server capacity, which is especially useful under load. Learn more about <PlatformLink to="/tracing/instrumentation/performance-metrics/#automatic-queue-time-capture">automatic queue time capture</PlatformLink>.

To disable queue time capture:

```ruby
config.capture_queue_time = false
```

</SdkOption>

<SdkOption name="instrumenter" type="Symbol" defaultValue=":sentry">

The instrumenter to use, `:sentry` or `:otel` for [use with OpenTelemetry](../../tracing/instrumentation/opentelemetry).
Expand Down Expand Up @@ -466,7 +480,7 @@ end

<SdkOption name="spotlight" type="Boolean | String" defaultValue="false">

Whether to also capture events and traces into [Spotlight](https://spotlightjs.com/setup/other/).
Whether to also capture events and traces into [Spotlight](https://spotlightjs.com/).

If you set this to true, Sentry will send events and traces to the local Sidecar proxy at `http://localhost:8969/stream`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ Spans are instrumented for the following operations within a transaction:
- Outgoing HTTP requests made with `Net::HTTP`
- Redis operations

The SDK also captures **queue time** as transaction data (not a child span) when a `X-Request-Start` header is present from your reverse proxy (Nginx, HAProxy, or Heroku). See <PlatformLink to="/tracing/instrumentation/performance-metrics/#automatic-queue-time-capture">Automatic Queue Time Capture</PlatformLink> for setup instructions.

Spans are only created within an existing transaction. If you're not using any of the supported frameworks, you'll need to <PlatformLink to="/tracing/instrumentation/custom-instrumentation/">create transactions manually</PlatformLink>.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Sentry supports adding arbitrary custom units, but we recommend using one of the

<Include name="custom-measurements-units-disclaimer.mdx" />

<PlatformContent includePath="performance/queue-time-capture" />

## Supported Measurement Units

Units augment measurement values by giving meaning to what otherwise might be abstract numbers. Adding units also allows Sentry to offer controls - unit conversions, filters, and so on - based on those units. For values that are unitless, you can supply an empty string or `none`.
Expand Down
46 changes: 46 additions & 0 deletions platform-includes/performance/queue-time-capture/ruby.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## Automatic Queue Time Capture

The Ruby SDK automatically captures queue time for Rack-based applications when the `X-Request-Start` header is present. This measures how long requests wait in the web server queue (e.g., waiting for a Puma thread) before your application begins processing them.

Queue time is attached to transactions as the `http.server.request.time_in_queue` attribute and helps identify server capacity issues. Tracing must be enabled for queue time to be captured.

### Setup

Configure your reverse proxy to add the `X-Request-Start` header:

**Nginx:**

```nginx
location / {
proxy_pass http://your-app;
proxy_set_header X-Request-Start "t=${msec}";
}
```

**HAProxy:**

```haproxy
frontend http-in
http-request set-header X-Request-Start t=%Ts%ms
```

**Heroku:** The header is automatically set by Heroku's router.

### How It Works

The SDK:

1. Reads the `X-Request-Start` header timestamp from your reverse proxy
2. Calculates the time difference between the header timestamp and when the request reaches your application
3. Subtracts `puma.request_body_wait` (if present) to exclude time spent waiting for slow client uploads
4. Attaches the result as `http.server.request.time_in_queue` to the transaction

### Disable Queue Time Capture

If you don't want queue time captured, disable it in your configuration:

```ruby
Sentry.init do |config|
config.capture_queue_time = false
end
```
1 change: 1 addition & 0 deletions src/mdx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ export async function getDevDocsFrontMatterUncached(): Promise<FrontMatter[]> {

const source = await readFile(file, 'utf8');
const {data: frontmatter} = matter(source);

return {
...(frontmatter as FrontMatter),
slug: fileName.replace(/\/index.mdx?$/, '').replace(/\.mdx?$/, ''),
Expand Down
3 changes: 2 additions & 1 deletion src/types/frontmatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ export interface FrontMatter {
* A list of keywords for indexing with search.
*/
keywords?: string[];

/**
* Set this to true to show a "new" badge next to the title in the sidebar
*/
new?: boolean;

/**
* The next page in the bottom pagination navigation.
*/
Expand All @@ -53,6 +53,7 @@ export interface FrontMatter {
* takes precedence over children when present
*/
next_steps?: string[];

/**
* Set this to true to disable indexing (robots, algolia) of this content.
*/
Expand Down
Loading