Skip to content

Add Context to SpanProcessor methods #1811

@as-polyakov

Description

@as-polyakov

Is your feature request related to a problem? Please describe.
I would like to use information from Context (Baggage in particular) in SpanProcessor's methods. Currently SpanProcessor's methods don't take Context

Describe the solution you'd like

public interface SpanProcessor {

  void onStart(Context ctx, ReadWriteSpan span);

  void onEnd(Context ctx, ReadableSpan span);
...
}

Describe alternatives you've considered
The only option is to rely on Context.current() in SpanProcessor which is not the right thing when in all cases - for example parent is explicitly set to the specific Context (and also, this will not work for e.g. Go version where there's no Context.current())

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions