Skip to content

Emit the canonical OTel executor.type span attribute instead of executor.implementation.id - #646

Merged
George Adams (gdams) merged 3 commits into
microsoft:mainfrom
PratikDhanaveFork:emit-canonical-executor-type-span-attr
Aug 7, 2026
Merged

Emit the canonical OTel executor.type span attribute instead of executor.implementation.id#646
George Adams (gdams) merged 3 commits into
microsoft:mainfrom
PratikDhanaveFork:emit-canonical-executor-type-span-attr

Conversation

@PratikDhanave

Copy link
Copy Markdown
Contributor

What

The executor.process span in workflow/internal/observability recorded the executor type under the key executor.implementation.id. This PR renames the constant to TagExecutorType with the canonical value executor.type. The emitted value (the Go implementation identity, the correct Go analog of executor type) is unchanged.

Why

Both sibling SDKs emit this exact attribute under executor.type:

  • .NET: Tags.ExecutorType = "executor.type", set via SetTag(Tags.ExecutorType, executorType).
  • Python: EXECUTOR_TYPE = "executor.type".

Neither defines executor.implementation.id. Because Go diverged on only the key name, cross-language OTel dashboards filtering on executor.type found nothing on Go workflow traces. This aligns Go with the .NET/Python convention.

How tested

Added a black-box test in the package's canonical test file that drives StartExecutorProcess through a fake Tracer/Span capturing attributes, and asserts the span carries executor.type (with the executor-type value) and does NOT carry executor.implementation.id. The test fails before the change and passes after.

go build ./..., go vet ./workflow/internal/observability/..., and go test ./workflow/internal/observability/... all pass.

@PratikDhanave
PratikDhanave (PratikDhanave) requested a review from a team as a code owner July 23, 2026 07:29
Copilot AI review requested due to automatic review settings July 23, 2026 07:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Aligns Go workflow telemetry with the canonical OpenTelemetry span attribute key for executor type so cross-language dashboards can filter consistently across Go/.NET/Python traces.

Changes:

  • Renamed the executor-type attribute constant from executor.implementation.id to the canonical executor.type (value emitted unchanged).
  • Updated StartExecutorProcess to emit the executor type under executor.type.
  • Added a black-box test asserting executor.type is present and executor.implementation.id is not.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
workflow/internal/observability/observability.go Switches the emitted span attribute key to canonical executor.type.
workflow/internal/observability/observability_test.go Adds a tracer/span stub test to assert the new attribute key behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread workflow/internal/observability/observability.go Outdated
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added the parity-approved Go API consistency review found no parity issues label Jul 23, 2026
@PratikDhanave
PratikDhanave (PratikDhanave) force-pushed the emit-canonical-executor-type-span-attr branch from 2237035 to a069172 Compare July 23, 2026 15:42
@github-actions

This comment has been minimized.

@PratikDhanave
PratikDhanave (PratikDhanave) force-pushed the emit-canonical-executor-type-span-attr branch from a069172 to 76f3cf9 Compare July 24, 2026 01:41
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

The executor.process span emitted the executor type under the
non-canonical key executor.implementation.id. Both the .NET
(Tags.ExecutorType) and Python (EXECUTOR_TYPE) SDKs emit this same
value under executor.type, so cross-language OTel dashboards filtering
on executor.type found nothing on Go workflow traces.

Rename the constant to TagExecutorType with value executor.type; the
emitted value (the Go implementation identity) is unchanged.
@PratikDhanave
PratikDhanave (PratikDhanave) force-pushed the emit-canonical-executor-type-span-attr branch from 463b6e5 to c7cbf9c Compare July 24, 2026 09:36
@github-actions

This comment has been minimized.

@gdams
George Adams (gdams) added this pull request to the merge queue Jul 29, 2026
@gdams
George Adams (gdams) removed this pull request from the merge queue due to a manual request Jul 29, 2026
# Conflicts:
#	workflow/internal/observability/observability_test.go
auto-merge was automatically disabled August 4, 2026 05:54

Head branch was pushed to by a user without write access

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Parity Review — ✅ No Issues

This PR is limited to workflow/internal/observability/ (an internal package). No exported Go API surface changed.

Parity finding: The change improves cross-repo consistency by aligning the OTel span attribute key with the canonical value used in both sibling SDKs:

  • .NET: Tags.ExecutorType = "executor.type"
  • Python: EXECUTOR_TYPE = "executor.type"

Go previously emitted executor.implementation.id; after this PR it emits executor.type, which is the correct aligned value.

No public-api-change label needed (internal package only). parity-approved label is correctly set.

Generated by Go API Consistency Review Agent · sonnet46 · 12.4 AIC · ⌖ 5.61 AIC · ⊞ 5.7K ·

@gdams
George Adams (gdams) added this pull request to the merge queue Aug 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 5, 2026
@gdams
George Adams (gdams) added this pull request to the merge queue Aug 7, 2026
Merged via the queue into microsoft:main with commit 80f957c Aug 7, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parity-approved Go API consistency review found no parity issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants