diff --git a/src/SDK/Sdk.php b/src/SDK/Sdk.php index 78f541f64..7d5fd67a9 100644 --- a/src/SDK/Sdk.php +++ b/src/SDK/Sdk.php @@ -35,6 +35,9 @@ public static function isDisabled(): bool */ public static function isInstrumentationDisabled(string $name): bool { + if (static::isDisabled()) { + return true; + } $disabledInstrumentations = Configuration::getList(Variables::OTEL_PHP_DISABLED_INSTRUMENTATIONS); return [self::OTEL_PHP_DISABLED_INSTRUMENTATIONS_ALL] === $disabledInstrumentations || in_array($name, $disabledInstrumentations);