Logging/src/LoggingClient.php
public function metrics(array $options = [])
    {
        $resultLimit = $this->pluck('resultLimit', $options, false);

        return new ItemIterator(
            new PageIterator(
                function (array $metric) {
                    return new Metric($this->connection, $metric['name'], $this->projectId, $metric);
                },
                [$this->connection, 'listMetrics'],
                $options + ['parent' => $this->formattedProjectName],
                [
                    'itemsKey' => 'metrics',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function metrics(array $options = [])
    {
        $resultLimit = $this->pluck('resultLimit', $options, false);

        return new ItemIterator(
            new PageIterator(
                function (array $metric) {
                    return new Metric($this->connection, $metric['name'], $this->projectId, $metric);
                },
                [$this->connection, 'listMetrics'],
                $options + ['parent' => $this->formattedProjectName],
                [
                    'itemsKey' => 'metrics',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function metrics ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( array $ metric ) { return new Metric ( $ this -> connection , $ metric [ 'name' ] , $ this -> projectId , $ metric ) ; } , [ $ this -> connection , 'listMetrics' ] , $ options + [ 'parent' => $ this -> formattedProjectName ] , [ 'itemsKey' => 'metrics' , 'resultLimit' => $ resultLimit ] ) ) ; }
Fetches metrics associated with your project.

Example:
```
$metrics = $logging->metrics();

foreach ($metrics as $metric) {
echo $metric->name() . PHP_EOL;
}
```

@codingStandardsIgnoreStart
@see https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/list projects.metrics list API documentation.
@codingStandardsIgnoreEnd

@param array $options [optional] {
Configuration options.

@type int $pageSize The maximum number of results to return per
request.
@type int $resultLimit Limit the number of results returned in total.
**Defaults to** `0` (return all results).
@type string $pageToken A previously-returned page token used to
resume the loading of results from a specific point.
}
@return ItemIterator<Metric>
Fetches metrics associated with your project .