Skip to content

Add OpenTracing interceptor for standalone activities#2909

Open
444am wants to merge 2 commits into
temporalio:masterfrom
444am:444am/activity-client-otel-interceptor
Open

Add OpenTracing interceptor for standalone activities#2909
444am wants to merge 2 commits into
temporalio:masterfrom
444am:444am/activity-client-otel-interceptor

Conversation

@444am

@444am 444am commented Jun 11, 2026

Copy link
Copy Markdown

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.

@444am 444am requested a review from a team as a code owner June 11, 2026 12:33
@CLAassistant

CLAassistant commented Jun 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@444am 444am force-pushed the 444am/activity-client-otel-interceptor branch from e6a59c7 to ee62c8f Compare June 11, 2026 12:38
SpanCreationContext context =
SpanCreationContext.newBuilder()
.setSpanOperationType(operationType)
.setActionName("StandaloneActivity")

@444am 444am Jun 11, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

2 participants