Flow PHP

AttributeLimitsEnforcer

Read onlyYes
FinalYes

Stateless service that enforces attribute limits per OpenTelemetry specification.

Applies two types of limits:

  • Count limit: keeps first N attributes, drops the rest
  • Value length limit: truncates string values using UTF-8 safe substring
Tags
see
https://opentelemetry.io/docs/specs/otel/common/

Methods

enforce()  : EnforcedAttributes
Enforce limits on attributes.

Methods

enforce()

Enforce limits on attributes.

public enforce(Attributes $attributes, int $countLimit, null|int $valueLengthLimit) : EnforcedAttributes
Parameters
$attributes : Attributes

The attributes to enforce limits on

$countLimit : int

Maximum number of attributes to keep

$valueLengthLimit : null|int

Maximum length for string values (null = unlimited)

Return values
EnforcedAttributes

        
On this page

Search results