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

Breadcrumb

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

function ResourceInfo::mergeSchemaUrl

Merge the schema URLs from the old and updating resource.

See also

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

1 call to ResourceInfo::mergeSchemaUrl()
ResourceInfo::merge in vendor/open-telemetry/sdk/Resource/ResourceInfo.php
Merge current resource with an updating resource, combining all attributes. If a key exists on both the old and updating resource, the value of the updating resource MUST be picked (even if the updated value is empty)

File

vendor/open-telemetry/sdk/Resource/ResourceInfo.php, line 76

Class

ResourceInfo
A Resource is an immutable representation of the entity producing telemetry. For example, a process producing telemetry that is running in a container on Kubernetes has a Pod name, it is in a namespace and possibly is part of a Deployment which also…

Namespace

OpenTelemetry\SDK\Resource

Code

private static function mergeSchemaUrl(?string $old, ?string $updating) : ?string {
    if (empty($old)) {
        return $updating;
    }
    if (empty($updating)) {
        return $old;
    }
    if ($old === $updating) {
        return $old;
    }
    self::logWarning('Merging resources with different schema URLs', [
        'old' => $old,
        'updating' => $updating,
    ]);
    return null;
}

API Navigation

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