Skip to content

Tracing SDK - Processors get clone of SpanData which is incorrect #2726

Open
@cijothomas

Description

@cijothomas

https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-sdk/src/trace/span.rs#L232-L233

Each processor gets a clone

  1. This violates the spec as changes done by one Processor is not reflected in the next.
  2. Performance issues due to clone.

Log SDK has changed the design to pass &mut instead which is performant and is spec-compliant. Cloning can be done for any processor (like BatchProcessor), if it want to store it for batching purposes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions