Flow PHP

InstrumentationScope

Read onlyYes
FinalYes
Tags
see
https://opentelemetry.io/docs/specs/otel/glossary/#instrumentation-scope
import-type

TAttributeValue from Attributes

TAttributeValueMap from Attributes

Properties

$attributes  : Attributes
$name  : string
$schemaUrl  : string|null
$version  : string

Methods

__construct()  : mixed
fromArray()  : self
Create an InstrumentationScope from a normalized array representation.
normalize()  : array{name: string, version: string, schemaUrl: null|string, attributes: array}
Normalize the scope to an array representation for serialization.
withAttributes()  : self
Create a new scope with additional attributes merged with existing ones.
withSchemaUrl()  : self
Create a new scope with a specific schema URL.

Properties

Methods

__construct()

public __construct(string $name[, string $version = 'unknown' ][, null|string $schemaUrl = null ][, Attributes $attributes = new Attributes() ]) : mixed
Parameters
$name : string

The name of the instrumentation scope (typically library or service name)

$version : string = 'unknown'

The version of the instrumentation scope

$schemaUrl : null|string = null

The schema URL for semantic conventions used by this scope

$attributes : Attributes = new Attributes()

Additional scope attributes

fromArray()

Create an InstrumentationScope from a normalized array representation.

public static fromArray(array{name: string, version?: string, schemaUrl?: null|string, attributes?: array} $data) : self
Parameters
$data : array{name: string, version?: string, schemaUrl?: null|string, attributes?: array}
Return values
self

normalize()

Normalize the scope to an array representation for serialization.

public normalize() : array{name: string, version: string, schemaUrl: null|string, attributes: array}
Return values
array{name: string, version: string, schemaUrl: null|string, attributes: array}

withAttributes()

Create a new scope with additional attributes merged with existing ones.

public withAttributes(TAttributeValueMap|Attributes $attributes) : self
Parameters
$attributes : TAttributeValueMap|Attributes
Return values
self

withSchemaUrl()

Create a new scope with a specific schema URL.

public withSchemaUrl(string $schemaUrl) : self
Parameters
$schemaUrl : string
Return values
self
On this page

Search results