Skip to content

CHASM/Standalone Activity telemetry#9764

Open
stephanos wants to merge 1 commit intomainfrom
stephanos/chasm-otel-event
Open

CHASM/Standalone Activity telemetry#9764
stephanos wants to merge 1 commit intomainfrom
stephanos/chasm-otel-event

Conversation

@stephanos
Copy link
Copy Markdown
Contributor

@stephanos stephanos commented Apr 1, 2026

What changed?

(1) Add OTEL integration to CHASM.
(2) Emit log tags for SAA.

Why?

Aid debugging.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)


WorkflowIDKey = "temporalWorkflowID"
WorkflowRunIDKey = "temporalRunID"
RunIDKey = "temporalRunID"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Re-using this for all entities.

@stephanos stephanos force-pushed the stephanos/chasm-otel-event branch 12 times, most recently from c46e253 to b567c9c Compare April 2, 2026 01:24
attrs = append(attrs, attribute.String("chasm.transition.error", retErr.Error()))
}
span := trace.SpanFromContext(ctx.goContext())
span.AddEvent("chasm.transition", trace.WithAttributes(attrs...))
Copy link
Copy Markdown
Contributor Author

@stephanos stephanos Apr 2, 2026

Choose a reason for hiding this comment

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

main change (1): emit new OTEL event for CHASM transitions (only in debug mode)

attribute.Key(idKey).String(entityID),
attribute.Key(telemetry.RunIDKey).String(e.GetRunID()),
attribute.Key("queue.task.type").String(e.GetType().String()),
attribute.Key("queue.task.id").Int64(e.GetTaskID()))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

main change (2): support CHASM for task execution telemetry

@stephanos stephanos force-pushed the stephanos/chasm-otel-event branch 4 times, most recently from fd13b5b to cd52584 Compare April 2, 2026 01:38
if len(taskToken.ComponentRef) > 0 && taskToken.ActivityId != "" {
tags = append(tags, tag.ActivityID(taskToken.ActivityId))
}
return tags
Copy link
Copy Markdown
Contributor Author

@stephanos stephanos Apr 2, 2026

Choose a reason for hiding this comment

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

main change (3): allow multiple tags and draw them from ComponentRef, too

(OTEL re-uses the log tagging and converts them to OTEL tags)

Copy link
Copy Markdown
Contributor Author

@stephanos stephanos Apr 2, 2026

Choose a reason for hiding this comment

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

PS: bonus side effect - this also now tags SAA with an activity ID cc @dandavison

@stephanos stephanos force-pushed the stephanos/chasm-otel-event branch 10 times, most recently from 1b7d4b1 to 05fbf40 Compare April 2, 2026 03:20
if !excluded {
pd.TaskTokenGetter = "GetTaskToken()"
}
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

main change (4): also extract activity ID when workflow ID is present

@stephanos stephanos force-pushed the stephanos/chasm-otel-event branch 2 times, most recently from 9d050a6 to b276629 Compare April 2, 2026 03:26
@stephanos stephanos changed the title CHASM telemetry CHASM/Standalone activity telemetry Apr 2, 2026
@stephanos stephanos force-pushed the stephanos/chasm-otel-event branch from b276629 to f2b4fac Compare April 2, 2026 03:35
@stephanos stephanos requested review from dandavison and yycptt April 2, 2026 03:37
@stephanos stephanos marked this pull request as ready for review April 2, 2026 03:37
@stephanos stephanos requested review from a team as code owners April 2, 2026 03:37
@stephanos stephanos changed the title CHASM/Standalone activity telemetry CHASM/Standalone Activity telemetry Apr 2, 2026
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