Flow PHP

SpanLimits

Read onlyYes
FinalYes

Configuration limits for span data.

SpanLimits provides bounds on the amount of data a span can collect, preventing unbounded memory growth and ensuring reasonable span sizes.

Example usage:

$limits = new SpanLimits(
    attributeCountLimit: 32,
    eventCountLimit: 128,
    linkCountLimit: 32,
);

// Use defaults
$defaultLimits = SpanLimits::default();

Properties

$attributeCountLimit  : int
$attributePerEventCountLimit  : int
$attributePerLinkCountLimit  : int
$attributeValueLengthLimit  : int|null
$eventCountLimit  : int
$linkCountLimit  : int

Methods

__construct()  : mixed
default()  : self
Create SpanLimits with default values.
unlimited()  : self
Create SpanLimits with unlimited values (for development/debugging).

Properties

$attributeCountLimit

public int $attributeCountLimit = self::DEFAULT_ATTRIBUTE_COUNT_LIMIT

$attributePerEventCountLimit

public int $attributePerEventCountLimit = self::DEFAULT_ATTRIBUTE_PER_EVENT_COUNT_LIMIT

$attributePerLinkCountLimit

public int $attributePerLinkCountLimit = self::DEFAULT_ATTRIBUTE_PER_LINK_COUNT_LIMIT

$attributeValueLengthLimit

public int|null $attributeValueLengthLimit = null

$eventCountLimit

public int $eventCountLimit = self::DEFAULT_EVENT_COUNT_LIMIT

$linkCountLimit

public int $linkCountLimit = self::DEFAULT_LINK_COUNT_LIMIT

Methods

__construct()

public __construct([int $attributeCountLimit = self::DEFAULT_ATTRIBUTE_COUNT_LIMIT ][, int $eventCountLimit = self::DEFAULT_EVENT_COUNT_LIMIT ][, int $linkCountLimit = self::DEFAULT_LINK_COUNT_LIMIT ][, int $attributePerEventCountLimit = self::DEFAULT_ATTRIBUTE_PER_EVENT_COUNT_LIMIT ][, int $attributePerLinkCountLimit = self::DEFAULT_ATTRIBUTE_PER_LINK_COUNT_LIMIT ][, null|int $attributeValueLengthLimit = null ]) : mixed
Parameters
$attributeCountLimit : int = self::DEFAULT_ATTRIBUTE_COUNT_LIMIT

Maximum number of attributes per span

$eventCountLimit : int = self::DEFAULT_EVENT_COUNT_LIMIT

Maximum number of events per span

$linkCountLimit : int = self::DEFAULT_LINK_COUNT_LIMIT

Maximum number of links per span

$attributePerEventCountLimit : int = self::DEFAULT_ATTRIBUTE_PER_EVENT_COUNT_LIMIT

Maximum number of attributes per event

$attributePerLinkCountLimit : int = self::DEFAULT_ATTRIBUTE_PER_LINK_COUNT_LIMIT

Maximum number of attributes per link

$attributeValueLengthLimit : null|int = null

Maximum length for string attribute values (null = unlimited)

default()

Create SpanLimits with default values.

public static default() : self
Return values
self

unlimited()

Create SpanLimits with unlimited values (for development/debugging).

public static unlimited() : self
Return values
self

        
On this page

Search results