Emit the canonical OTel executor.type span attribute instead of executor.implementation.id#646
Conversation
There was a problem hiding this comment.
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.idto the canonicalexecutor.type(value emitted unchanged). - Updated
StartExecutorProcessto emit the executor type underexecutor.type. - Added a black-box test asserting
executor.typeis present andexecutor.implementation.idis 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), |
This comment has been minimized.
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.
2237035 to
a069172
Compare
Parity Review — ✅ No Issues FoundThis PR is a cross-repo parity fix, not a divergence. Change: Renames the internal OTel span attribute key from Upstream alignment confirmed:
Scope: The changed package is The Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
What
The
executor.processspan inworkflow/internal/observabilityrecorded the executor type under the keyexecutor.implementation.id. This PR renames the constant toTagExecutorTypewith the canonical valueexecutor.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:Tags.ExecutorType = "executor.type", set viaSetTag(Tags.ExecutorType, executorType).EXECUTOR_TYPE = "executor.type".Neither defines
executor.implementation.id. Because Go diverged on only the key name, cross-language OTel dashboards filtering onexecutor.typefound 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
StartExecutorProcessthrough a fakeTracer/Spancapturing attributes, and asserts the span carriesexecutor.type(with the executor-type value) and does NOT carryexecutor.implementation.id. The test fails before the change and passes after.go build ./...,go vet ./workflow/internal/observability/..., andgo test ./workflow/internal/observability/...all pass.