OTel ActorContextDecorator should support all ReenterAfter overloads #2138
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.
Description
Currently only 2 of the 5 overloads for ReenterAfter is supported by the OpenTelemetryActorContextDecorator. This causes telemetry to be lost when using the unsupported variants.
We encountered problems with our system where we had to manually re-set the Baggage, because we called one of the unsupported ReenterAfter overloads. With this fix it should mean we don't have to do this anymore.
I have added tests that cover each of the overloads (expectedly 3 out of 5 failed before the fix).
Suggestions for naming and improvements to the tests are welcome, I just made the simplest tests i could think of to test the problem.
However since I am making changes to the ActorContextDecorator base class, it may have implications for all other decorators. It might be necessary to take a look and see if those need updating to make sure they implement the missing overloads too.
Purpose
This pull request is a:
Checklist