Skip to content
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

Fix delayed message null activity #7264

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jpalac
Copy link
Contributor

@jpalac jpalac commented Jan 20, 2025

Addresses #7209

@jpalac jpalac added the Bug label Jan 20, 2025
@jpalac jpalac self-assigned this Jan 20, 2025
@jpalac
Copy link
Contributor Author

jpalac commented Jan 21, 2025

There is a sample provided to test this scenario: https://github.com/jonesr-out/nservicebus-otel-bug

It seems that when the StartActivity runs with default values, there is no active listener so a null activity is returned from this call.

This PR makes a change to pass in the traceFlags of the spanContext into the new root activity context. It seems to solve the issue reported in the sample.

I have created a test to try and reproduce the issue, however I was unable to get the StartActivity code to return null the way it does in the demo.
I believe that may be due to our testing setup of the activity listener.
I'm not sure if there's another way that this could be setup to be tested.

@lailabougria @SzymonPobiega can you see anything wrong with the proposed solution here? Any possible side effects?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant