Skip to content

Skip span creation when parent span is not recording #3760

@Udhayarajan

Description

@Udhayarajan

Problem

Right now, even though span is not recording, redisotel creates new span and still tracing out the information. Can we have someway of skipping?

We do have filter I'm aware of it. But irrespective of any command, if we want to have ability to skip spanning based on the recording state of the span in context at the root/call-site level, there is not option for it.

Proposed Solutions

  1. adding a flag on options, that says skip trace if span not recording. (SkipSpanIfNotRecording)
  2. adding a context parm to the filter functions (filterProcess , filterProcessPipeline), so that let users create a span from context and check if it is recording and should they skip it.
  3. hard respect the span recording (yeah it is quite odd, but otelsql already doing it)

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