Closed valkum closed 3 months ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
What was changed
This PR expands OpenTelemetry support in the Rust SDK. The workflow and activity futures get instrumented using tracing (similar to other places in the code). To follow other SDKs such as the python one, the spans use "otel.name" (special keyword from
tracing-opentelemtry
to create a span name with the type name of the workflow/activity.Why?
Currently, these futures get spawned and thus don't have a root span. To get a root span boilerplate code is required in all workflow and activity functions. To have less boilerplate and to follow the naming conventions more strictly first party support is desired. I plan on expanding this with support for propagation.
Discussion
This currently relies on internals of the
tracing-opentelemetry
crate (otel.name
andotel.kind
resource names). Also, this is currently not configurable. Other crates in the workspace already use thetracing
crate and/or the OpenTelemetry crates. I think this is a far better state than relying on copied boilerplate especially when adding propagation support.Checklist
Closes n/a
How was this tested: This was tested using a local Jaeger instance. The generated span based on one of our workflows looks like this in Jaeger UI.
Any docs updates needed?
Unsure if needed due to the non-official nature of the Rust SDK.