Skip to content

Add temporalActivityAttempt attribute to RunActivity spans - #1851

Open
DABH wants to merge 1 commit into
mainfrom
otel-activity-attempt
Open

Add temporalActivityAttempt attribute to RunActivity spans#1851
DABH wants to merge 1 commit into
mainfrom
otel-activity-attempt

Conversation

@DABH

@DABH DABH commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

RunActivity spans are created once per Activity attempt, but nothing on the span said which attempt it was, so tracing backends showed identical-looking sibling spans whenever an Activity retried. This adds a temporalActivityAttempt attribute (the ActivityInfo.attempt number) next to temporalActivityID on RunActivity spans, in both OpenTelemetryPlugin and the older TracingInterceptor.

Tests: a new plugin test runs an Activity that fails on its first attempt and asserts two RunActivity spans carrying attempts 1 and 2, the first with error status. The existing comprehensive interceptor test now also asserts the attempt numbers on its retried activity. Changelog entry added under Unreleased / Added.

Motivated by the Arize Phoenix tracing sample (AI-411), which otherwise has to derive the attempt number in a custom span processor.

@DABH
DABH requested a review from a team as a code owner September 11, 2026 05:21
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.

1 participant