Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

from opentelemetry import trace
from opentelemetry.context import attach, detach
from opentelemetry.instrumentation.utils import is_instrumentation_enabled
from opentelemetry.propagate import extract
from opentelemetry.semconv._incubating.attributes.net_attributes import (
NET_PEER_IP,
Expand Down Expand Up @@ -279,7 +280,9 @@ def _start_span(
)

def intercept_service(self, continuation, handler_call_details):
if self._filter is not None and not self._filter(handler_call_details):
if (
self._filter is not None and not self._filter(handler_call_details)
) or not is_instrumentation_enabled():
return continuation(handler_call_details)

def telemetry_wrapper(behavior, request_streaming, response_streaming):
Expand Down