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

Breadcrumb

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

function Host::getLinuxId

File

vendor/open-telemetry/sdk/Resource/Detectors/Host.php, line 50

Class

Host

Namespace

OpenTelemetry\SDK\Resource\Detectors

Code

private function getLinuxId() : ?string {
    $paths = [
        self::PATH_ETC_MACHINEID,
        self::PATH_VAR_LIB_DBUS_MACHINEID,
    ];
    foreach ($paths as $path) {
        $file = $this->dir . $path;
        if (is_file($file) && is_readable($file)) {
            return trim(file_get_contents($file));
        }
    }
    return null;
}

API Navigation

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