Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/develop/go/observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,16 @@ map[string]interface{}{
}
```

When upserting Search Attributes in existing Workflows, versioning prevents failures caused by [non-determinism errors](/workflows#non-deterministic-change).
```go
version := workflow.GetVersion(ctx, "adding-to-existing-workflows", workflow.DefaultVersion, 0)
if version == workflow.DefaultVersion {
// Do nothing
} else {
workflow.UpsertTypedSearchAttributes(ctx, searchAttributeUpdate...)
}
```

### Remove a Search Attribute from a Workflow {#remove-search-attribute}

**How to remove a Search Attribute from a Workflow using the Go SDK.**
Expand Down