private static function getBodyStrategy()

in src/OpenTelemetry.php [75:89]


    private static function getBodyStrategy(): string
    {
        $strategy = getenv(self::ENV_VARIABLE_BODY_STRATEGY);
        if (false === $strategy) {
            $strategy = self::DEFAULT_BODY_STRATEGY;
        }
        if (!in_array($strategy, self::ALLOWED_BODY_STRATEGIES)) {
            throw new InvalidArgumentException(sprintf(
                'The body strategy specified %s is not valid. The available strategies are %s',
                $strategy,
                implode(',', self::ALLOWED_BODY_STRATEGIES)
            ));
        }
        return $strategy;
    }