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

Breadcrumb

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

function TraceState::with

Overrides TraceStateInterface::with

File

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

Class

TraceState

Namespace

OpenTelemetry\API\Trace

Code

public function with(string $key, string $value) : TraceStateInterface {
    if (!self::validateMember($this->traceState, $key, $value)) {
        self::logWarning('Invalid tracestate key/value for: ' . $key);
        return $this;
    }
    $clone = clone $this;
    $clone->traceState = [
        $key => $value,
    ] + $this->traceState;
    return $clone;
}

API Navigation

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