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

Breadcrumb

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

function TraceState::validateKey

The Key is opaque string that is an identifier for a vendor. It can be up to 256 characters and MUST begin with a lowercase letter or a digit, and can only contain lowercase letters (a-z), digits (0-9), underscores (_), dashes (-), asterisks (*), and forward slashes (/). For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.

See also

https://www.w3.org/TR/trace-context/#key

1 call to TraceState::validateKey()
TraceState::validateMember in vendor/open-telemetry/api/Trace/TraceState.php

File

vendor/open-telemetry/api/Trace/TraceState.php, line 169

Class

TraceState

Namespace

OpenTelemetry\API\Trace

Code

private static function validateKey(string $key) : bool {
    return preg_match(self::VALID_KEY_REGEX, $key) !== 0;
}

API Navigation

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