Skip to content

[feature request] [Instrumentation.StackExchangeRedis] should support Sdk.SuppressInstrumentation. #3371

@pengweiqhca

Description

@pengweiqhca

Component

OpenTelemetry.Instrumentation.StackExchangeRedis

Is your feature request related to a problem?

using (SuppressInstrumentationScope.Begin())
{
database.StringGet("1"); // Can't suppress activity.
}

What is the expected behavior?

Activity can be suppressed in SuppressInstrumentationScope

Which alternative solutions or features have you considered?

-if (parent == null || parent.IdFormat != ActivityIdFormat.W3C)
+if (parent == null || parent.IdFormat != ActivityIdFormat.W3C || Sdk.SuppressInstrumentation)
{
    return this.defaultSession;
}

Additional context

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

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