Repository navigation
feat: propagate job context on queue v0.2 - #40
Merged
Merged
Conversation
cmilesio
marked this pull request as ready for review
November 11, 2026 16:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add optional context propagation to queue v0.2 so a job can continue the trace that dispatched it.
ContextPropagatorcontract, with no new OpenTelemetry SDK dependency.Why
GoForj supports Go 1.26, while queue v0.3 requires Go 1.27. This maintenance backport keeps the current framework minimum and the existing message payload/schema.
The review also removed a duplicate metadata decode, saving five allocations per traced logical dispatch. Disabled and empty-carrier allocation counts stay unchanged.
Root and Redis race suites pass on Go 1.26; the root minimum-Go check passes on Go 1.24.4. Concurrent distinct carriers, failure/retry/archive contexts, both adapter layers, unsupported-worker cleanup, and concurrent startup are covered. The full standalone module script passes. Maintenance CI and mechanical driver/example test repairs are separate commits.
Publish the root module and Redis adapter together. When the new propagation option is enabled, Redis worker startup requires an adapter with early context preparation and returns a clear capability error for older adapters. Publisher-only queues remain usable, and queues without a propagator keep their existing worker behavior.
Driver-owned retry-publication diagnostics on NATS, RabbitMQ, and SQS still retain worker context. Receiving handlers and normal retry delivery retain propagated context.