function AttributeValidator::validate
Validate whether a value is a primitive, or a homogeneous array of primitives (treating int/double as equivalent).
Overrides AttributeValidatorInterface::validate
See also
https://github.com/open-telemetry/opentelemetry-specification/blob/v1.2…
File
-
vendor/
open-telemetry/ sdk/ Common/ Attribute/ AttributeValidator.php, line 24
Class
Namespace
OpenTelemetry\SDK\Common\AttributeCode
public function validate($value) : bool {
if (is_array($value)) {
return $this->validateArray($value);
}
return in_array(gettype($value), self::PRIMITIVES);
}