Class MetricArgs
Inherited Members
Namespace: Pulumi.Gcp.Logging
Assembly: Pulumi.Gcp.dll
Syntax
public sealed class MetricArgs : ResourceArgs
Constructors
View SourceMetricArgs()
Declaration
public MetricArgs()
Properties
View SourceBucketOptions
The bucketOptions are required when the logs-based metric is using a DISTRIBUTION value type and it describes the bucket boundaries used to create a histogram of the extracted values. Structure is documented below.
Declaration
public Input<MetricBucketOptionsArgs> BucketOptions { get; set; }
Property Value
| Type | Description |
|---|---|
| Input<MetricBucketOptionsArgs> |
Description
A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters.
Declaration
public Input<string> Description { get; set; }
Property Value
| Type | Description |
|---|---|
| Input<System.String> |
Filter
An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced-filters) which is used to match log entries.
Declaration
public Input<string> Filter { get; set; }
Property Value
| Type | Description |
|---|---|
| Input<System.String> |
LabelExtractors
A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the valueExtractor field.
Declaration
public InputMap<string> LabelExtractors { get; set; }
Property Value
| Type | Description |
|---|---|
| InputMap<System.String> |
MetricDescriptor
The metric descriptor associated with the logs-based metric. Structure is documented below.
Declaration
public Input<MetricMetricDescriptorArgs> MetricDescriptor { get; set; }
Property Value
| Type | Description |
|---|---|
| Input<MetricMetricDescriptorArgs> |
Name
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.
Declaration
public Input<string> Name { get; set; }
Property Value
| Type | Description |
|---|---|
| Input<System.String> |
Project
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Declaration
public Input<string> Project { get; set; }
Property Value
| Type | Description |
|---|---|
| Input<System.String> |
ValueExtractor
A valueExtractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction - EXTRACT(field) or REGEXP_EXTRACT(field, regex). The argument are 1. field - The name of the log entry field from which the value is to be extracted. 2. regex - A regular expression using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group.
Declaration
public Input<string> ValueExtractor { get; set; }
Property Value
| Type | Description |
|---|---|
| Input<System.String> |