class LogMetric extends Message

Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.

Protobuf type Google\Logging\V2\LogMetric

Methods

__construct()

No description

string
getName()

Required. The client-assigned metric identifier.

setName(string $var)

Required. The client-assigned metric identifier.

string
getDescription()

Optional. A description of this metric, which is used in documentation.

setDescription(string $var)

Optional. A description of this metric, which is used in documentation.

string
getFilter()

Required. An advanced logs filter which is used to match log entries.

setFilter(string $var)

Required. An advanced logs filter which is used to match log entries.

int
getVersion()

Output only. The API version that created or updated this metric.

setVersion(int $var)

Output only. The API version that created or updated this metric.

Details

at line 62
__construct()

at line 85
string getName()

Required. The client-assigned metric identifier.

Examples: "error_count", "nginx/requests". Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name. The metric identifier in this field must not be URL-encoded. However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".

Generated from protobuf field string name = 1;

Return Value

string

at line 108
setName(string $var)

Required. The client-assigned metric identifier.

Examples: "error_count", "nginx/requests". Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name. The metric identifier in this field must not be URL-encoded. However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".

Generated from protobuf field string name = 1;

Parameters

string $var

at line 120
string getDescription()

Optional. A description of this metric, which is used in documentation.

Generated from protobuf field string description = 2;

Return Value

string

at line 131
setDescription(string $var)

Optional. A description of this metric, which is used in documentation.

Generated from protobuf field string description = 2;

Parameters

string $var

at line 147
string getFilter()

Required. An advanced logs filter which is used to match log entries.

Example: "resource.type=gae_app AND severity>=ERROR" The maximum length of the filter is 20000 characters.

Generated from protobuf field string filter = 3;

Return Value

string

at line 162
setFilter(string $var)

Required. An advanced logs filter which is used to match log entries.

Example: "resource.type=gae_app AND severity>=ERROR" The maximum length of the filter is 20000 characters.

Generated from protobuf field string filter = 3;

Parameters

string $var

at line 176
int getVersion()

Output only. The API version that created or updated this metric.

The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.

Generated from protobuf field .google.logging.v2.LogMetric.ApiVersion version = 4;

Return Value

int

at line 189
setVersion(int $var)

Output only. The API version that created or updated this metric.

The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.

Generated from protobuf field .google.logging.v2.LogMetric.ApiVersion version = 4;

Parameters

int $var