Skip to content

Publish context #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

rhhammond
Copy link

@rhhammond rhhammond commented Apr 8, 2025

ThreeDotsLabs/watermill#445

Motivation / Background

I would like to instrument watermill-sql interactions with the database using open telemetry. Automatic instrumentation requires propagating context from callers to the database client.

Details

Message.SetContext() can be used to propagate context to the framework, and defaults to context.Background() it has not been set.

Alternative approaches considered (if applicable)

I considered updating the signature of Publish to take a context parameter, but that would be a breaking change to watermill and all supported vendors.

Checklist

The resources of our team are limited. There are a couple of things that you can do to help us merge your PR faster:

  • I wrote tests for the changes.
  • All tests are passing.
    • If you are testing a Pub/Sub, you can start Docker with make up.
    • You can start with make test_short for a quick check.
    • If you want to run all tests, use make test.
  • Code has no breaking changes.
  • (If applicable) documentation on watermill.io is updated.

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.

1 participant