Skip to content

gRPC instrumentation not checking for suppress_instrumentation in context #476

@aabmass

Description

@aabmass

opentelemetry-instrumentation-grpc is not checking for the special suppress_instrumentation context key before creating spans. This causes a recursion loop and stack overflow if you use SimpleSpanProcessor and a gRPC based exporter (like OTLP or Cloud Monitoring).

Describe your environment
opentelemetry-instrumentation-grpc 0.20b0

Steps to reproduce
Using SimpleSpanProcessor and OTLP exporter

What is the expected behavior?
Spans should not be created while suppress_instrumentation is in context

What is the actual behavior?
Spans get created and it create noise or causes stack overflow

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions