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

Breadcrumb

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

class Process

Same name in this branch
  1. 11.1.x vendor/php-tuf/composer-stager/src/Internal/Process/Service/Process.php \PhpTuf\ComposerStager\Internal\Process\Service\Process
  2. 11.1.x vendor/composer/xdebug-handler/src/Process.php \Composer\XdebugHandler\Process
  3. 11.1.x vendor/symfony/process/Process.php \Symfony\Component\Process\Process

Hierarchy

  • class \OpenTelemetry\SDK\Resource\Detectors\Process implements \OpenTelemetry\SDK\Resource\ResourceDetectorInterface

Expanded class hierarchy of Process

See also

https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8…

20 string references to 'Process'
ConfigSingleImportForm::submitForm in core/modules/config/src/Form/ConfigSingleImportForm.php
Form submission handler.
ConfigSync::submitForm in core/modules/config/src/Form/ConfigSync.php
Form submission handler.
d6_block.yml in core/modules/block/migrations/d6_block.yml
core/modules/block/migrations/d6_block.yml
d6_comment.yml in core/modules/comment/migrations/d6_comment.yml
core/modules/comment/migrations/d6_comment.yml
d6_taxonomy_term.yml in core/modules/taxonomy/migrations/d6_taxonomy_term.yml
core/modules/taxonomy/migrations/d6_taxonomy_term.yml

... See full list

File

vendor/open-telemetry/sdk/Resource/Detectors/Process.php, line 18

Namespace

OpenTelemetry\SDK\Resource\Detectors
View source
final class Process implements ResourceDetectorInterface {
    
    /**
     * @psalm-suppress PossiblyUndefinedArrayOffset
     */
    public function getResource() : ResourceInfo {
        $attributes = [];
        $attributes[ResourceAttributes::PROCESS_PID] = getmypid();
        $attributes[ResourceAttributes::PROCESS_EXECUTABLE_PATH] = PHP_BINARY;
        
        /**
         * @psalm-suppress PossiblyUndefinedArrayOffset
         */
        if ($_SERVER['argv'] ?? null) {
            $attributes[ResourceAttributes::PROCESS_COMMAND] = $_SERVER['argv'][0];
            $attributes[ResourceAttributes::PROCESS_COMMAND_ARGS] = $_SERVER['argv'];
        }
        
        /** @phan-suppress-next-line PhanTypeComparisonFromArray */
        if (extension_loaded('posix') && ($user = \posix_getpwuid(\posix_geteuid())) !== false) {
            $attributes[ResourceAttributes::PROCESS_OWNER] = $user['name'];
        }
        return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
Process::getResource public function @psalm-suppress PossiblyUndefinedArrayOffset Overrides ResourceDetectorInterface::getResource

API Navigation

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