Module metric (1.12.1)

Define Stackdriver Logging API Metrics.

Classes

Metric

Metric(name, filter_=None, client=None, description="")

Metrics represent named filters for log entries.

See https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics

Parameters
Name Description
name str

the name of the metric

filter_ str

the advanced logs filter expression defining the entries tracked by the metric. If not passed, the instance should already exist, to be refreshed via reload.

client Client

A client which holds credentials and project configuration for the metric (which requires a project).

description str

an optional description of the metric.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.