Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SdkAutoloader.php

function SdkAutoloader::isExcludedUrl

Test whether a request URI is set, and if it matches the excluded urls configuration option

@internal

1 call to SdkAutoloader::isExcludedUrl()
SdkAutoloader::autoload in vendor/open-telemetry/sdk/SdkAutoloader.php

File

vendor/open-telemetry/sdk/SdkAutoloader.php, line 246

Class

SdkAutoloader
@psalm-suppress RedundantCast

Namespace

OpenTelemetry\SDK

Code

public static function isExcludedUrl() : bool {
    $excludedUrls = Configuration::getList(Variables::OTEL_PHP_EXCLUDED_URLS, []);
    if ($excludedUrls === []) {
        return false;
    }
    $url = $_SERVER['REQUEST_URI'] ?? null;
    if (!$url) {
        return false;
    }
    foreach ($excludedUrls as $excludedUrl) {
        if (preg_match(sprintf('|%s|', $excludedUrl), (string) $url) === 1) {
            return true;
        }
    }
    return false;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal