Add OpenTracing interceptor for standalone activities#2909
Conversation
|
|
e6a59c7 to
ee62c8f
Compare
| SpanCreationContext context = | ||
| SpanCreationContext.newBuilder() | ||
| .setSpanOperationType(operationType) | ||
| .setActionName("StandaloneActivity") |
There was a problem hiding this comment.
ActionName has to be set for getSpanName(), but ActivityType is not provided in GetActivityResultInput / DescribeActivityInput etc. To minimize the cardinality I'm using a fixed placeholder here as of now. Let me know if you believe repeatedly using activityId for distinction would be better.
|
Hey, thanks for this PR! I think we should merge this but we should bring it inline with the other SDKs first.
so the span builder would change to be something like this:
Does that all sound reasonable? Lmk if you have more feedback or if you aren't able to make the changes and I can get to it sometime in the next few days. Again, appreciate the PR! |
|
Hi @cconstable , thanks for the comments, those make sense. I've updated my PR to address your comments. For README, I also changed previous "Client configuration" to "Workflow Client configuration". LMK if that aligns with your convention. |
What was changed
Added OpenTracing support for standalone activity client operations.
Why?
Standalone activities can be started and managed through ActivityClient, but the OpenTracing contrib module did not trace those client operations. This adds tracing
coverage consistent with the existing workflow client and worker tracing patterns.
Standalone activity execution also needs its own worker-side run span because standalone activities do not have workflow IDs or workflow run IDs.
How was this tested:
See 2 UT files for Client and Worker respectively.