-
Notifications
You must be signed in to change notification settings - Fork 375
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
[Experimental] Pubsub distributed tracing #2938
base: master
Are you sure you want to change the base?
Conversation
+1, would love to see this added! |
Thank you so much for the contribution, @davidgm0! 🙇 Our team will review it shortly. |
As a general question, does the gRPC handling of the Pubsub message happen before or after the I ask because the distributed tracing The same goes for |
It's great that there's a Docker image that can simulate the backend required for testing. For testing, we'll probably need it. I suggest following how our most recent integration, OpenSearch, added a docker image for their own testing: https://github.com/DataDog/dd-trace-rb/pull/2940/files#diff-e45e45baeda1c1e73482975a664062aa56f20c03dd9d64a827aba57775bed0d3 You can make similar changes to add |
What does this PR do?
Adds pubsub distributed tracing, which was asked in #2556. This is an early try, but I wanted to see if there was interest in this to continue and add tests, etc. The tests were a bit complicated to set up locally, so if someone else wants to help happy to get some extra commits. Otherwise I can take a deeper look, if the PR would be accepted with tests
listen
. There is a 'pull' method that isn't covered, since we don't use it.Motivation
Pubsub is an important way of distributed communication so it would be really good to have it.
Additional Notes
This is how it looks:
The resources are the topic and the subscription respectively.
Publisher spans info:
Consumer span info:
How to test the change?
I've directly tested it with the gem 'google-cloud-pubsub'. It is possible to setup locally with an emulator, which you can use with docker with the image
messagebird/gcloud-pubsub-emulator
.Code could be something like: