microsoft / durabletask-go

The Durable Task Framework is a lightweight, embeddable engine for writing durable, fault-tolerant business logic (orchestrations) as ordinary code.
Apache License 2.0
178 stars 25 forks source link

Distributed tracing updates #43

Closed cgillum closed 8 months ago

cgillum commented 8 months ago

This project was using a fork of durabletask-protobuf as a submodule and had diverged from the main branch. This PR aligns with the durabletask-protobuf main branch, which includes some changes to the distributed tracing protobuf contract. This misalignment was pointed out in https://github.com/microsoft/durabletask-go/issues/31.

One notable change was the change to TraceContext, which previously defined traceID and spanID as distinct values. However, the latest durabletask-protobuf reduced these to just traceParent to be closer to the HTTP protocol. To make this non-breaking, I simply renamed traceID to traceParent and deprecated the spanID value without removing it. I also added some code that should try to handle this transition gracefully. This should hopefully allow any orchestrations created with the old schema to continue working with the new schema.

We don't yet have any external SDKs that are taking advantage of the distributed tracing feature, so this is not expected to break any existing SDKs.

Lastly, this PR also happens to contain a new test, Test_RecreateCompletedOrchestration. However, it's currently skipped as it requires additional feature work (probably could have gone into a separate PR but I'm being a bit lazy).