Skip to content

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

Open
PratikDhanave wants to merge 1 commit into
microsoft:mainfrom
PratikDhanave:emit-canonical-executor-type-span-attr
Open

Emit the canonical OTel executor.type span attribute instead of executor.implementation.id#646
PratikDhanave wants to merge 1 commit into
microsoft:mainfrom
PratikDhanave: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 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.

span.SetAttributes(
workflowobservability.StringAttribute(TagExecutorID, executorID),
workflowobservability.StringAttribute(TagImplementationID, implementationID),
workflowobservability.StringAttribute(TagExecutorType, implementationID),
@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
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 force-pushed the emit-canonical-executor-type-span-attr branch from 2237035 to a069172 Compare July 23, 2026 15:42
@github-actions

Copy link
Copy Markdown
Contributor

Parity Review — ✅ No Issues Found

This PR is a cross-repo parity fix, not a divergence.

Change: Renames the internal OTel span attribute key from executor.implementation.id to executor.type (constant TagImplementationIDTagExecutorType) in workflow/internal/observability.

Upstream alignment confirmed:

  • .NET: Tags.ExecutorType = "executor.type" (used via SetTag(Tags.ExecutorType, executorType))
  • Python: EXECUTOR_TYPE = "executor.type"
  • Go was the only SDK emitting executor.implementation.id; this aligns it with both upstream implementations.

Scope: The changed package is workflow/internal/ — no exported Go APIs change. The only user-visible effect is the corrected OTel span attribute key, which now matches .NET and Python.

The parity-approved label is appropriate. No further parity action required.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by Go API Consistency Review Agent · 25.1 AIC · ⌖ 3.95 AIC · ⊞ 5.7K ·

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.

2 participants