Skip to content

Enable Trace Propagation#65

Open
AnthonySuper wants to merge 1 commit into
riverqueue:masterfrom
AnthonySuper:enable-trace-propagation
Open

Enable Trace Propagation#65
AnthonySuper wants to merge 1 commit into
riverqueue:masterfrom
AnthonySuper:enable-trace-propagation

Conversation

@AnthonySuper

Copy link
Copy Markdown

When the configuration parameter EnableTracePropagation is enabled, the traces generated by river workers will be linked to the traces that enqueued them. This is done by use of metadata parameters, following the example in River's documentation for the middleware functionality (https://riverqueue.com/docs/middleware).

This uses a link instead of directly making a child span which is semantically more correct—if a parent span is used, you get weird situations where a POST request that returns in 50ms somehow contains a trace that starts two hours later and takes 10 minutes. River jobs are async, after all.

Fixes #41 (I believe, at least).

When the configuration parameter `EnableTracePropagation` is enabled,
the traces generated by river workers will be *linked* to the traces
that enqueued them. This is done by use of metadata parameters,
following the example in River's documentation for the middleware
functionality (https://riverqueue.com/docs/middleware).

This uses a *link* instead of directly making a child span which is
semantically more correct.

Fixes riverqueue#41 (I believe, at least).
@brandur

brandur commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@codex review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Persist trace context in job metadata

2 participants