private function filterStackTrace($stackTrace)
    {
        return array_values(
            array_filter($stackTrace, function ($st) {
                return !array_key_exists('class', $st) || substr($st['class'], 0, 16) != 'OpenCensus\Trace';
            })
        );
    }