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.
This comment has been minimized.
This comment has been minimized.
2237035 to
a069172
Compare
This comment has been minimized.
This comment has been minimized.
a069172 to
76f3cf9
Compare
This comment has been minimized.
This comment has been minimized.
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.
463b6e5 to
c7cbf9c
Compare
This comment has been minimized.
This comment has been minimized.
# Conflicts: # workflow/internal/observability/observability_test.go
Head branch was pushed to by a user without write access
Parity Review — ✅ No IssuesThis PR is limited to Parity finding: The change improves cross-repo consistency by aligning the OTel span attribute key with the canonical value used in both sibling SDKs:
Go previously emitted No
|
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.