google.logging. v2
Enumerations
ApiVersion
number
Logging API version.
Value |
|
---|---|
V2 |
Logging API v2. |
V1 |
Logging API v1. |
ApiVersion
number
Logging API version.
Value |
|
---|---|
V2 |
Logging API v2. |
V1 |
Logging API v1. |
VersionFormat
number
Available log entry formats. Log entries can be written to Logging in either format and can be exported in either format. Version 2 is the preferred format.
Value |
|
---|---|
VERSION_FORMAT_UNSPECIFIED |
An unspecified format version that will default to V2. |
V2 |
|
V1 |
|
VersionFormat
number
Available log entry formats. Log entries can be written to Logging in either format and can be exported in either format. Version 2 is the preferred format.
Value |
|
---|---|
VERSION_FORMAT_UNSPECIFIED |
An unspecified format version that will default to V2. |
V2 |
|
V1 |
|
Properties
ApiVersion
number
Logging API version.
Value |
|
---|---|
V2 |
Logging API v2. |
V1 |
Logging API v1. |
ApiVersion
number
Logging API version.
Value |
|
---|---|
V2 |
Logging API v2. |
V1 |
Logging API v1. |
VersionFormat
number
Available log entry formats. Log entries can be written to Logging in either format and can be exported in either format. Version 2 is the preferred format.
Value |
|
---|---|
VERSION_FORMAT_UNSPECIFIED |
An unspecified format version that will default to V2. |
V2 |
|
V1 |
|
VersionFormat
number
Available log entry formats. Log entries can be written to Logging in either format and can be exported in either format. Version 2 is the preferred format.
Value |
|
---|---|
VERSION_FORMAT_UNSPECIFIED |
An unspecified format version that will default to V2. |
V2 |
|
V1 |
|
Abstract types
CreateExclusionRequest
The parameters to CreateExclusion
.
Properties
Parameter |
|
---|---|
parent |
string Required. The parent resource in which to create the exclusion:
Examples: |
exclusion |
Object Required. The new exclusion, whose This object should have the same structure as LogExclusion |
CreateExclusionRequest
The parameters to CreateExclusion
.
Properties
Parameter |
|
---|---|
parent |
string Required. The parent resource in which to create the exclusion:
Examples: |
exclusion |
Object Required. The new exclusion, whose This object should have the same structure as LogExclusion |
CreateLogMetricRequest
The parameters to CreateLogMetric.
Properties
Parameter |
|
---|---|
parent |
string The resource name of the project in which to create the metric:
The new metric must be provided in the request. |
metric |
Object The new logs-based metric, which must not have an identifier that already exists. This object should have the same structure as LogMetric |
CreateLogMetricRequest
The parameters to CreateLogMetric.
Properties
Parameter |
|
---|---|
parent |
string The resource name of the project in which to create the metric:
The new metric must be provided in the request. |
metric |
Object The new logs-based metric, which must not have an identifier that already exists. This object should have the same structure as LogMetric |
CreateSinkRequest
The parameters to CreateSink
.
Properties
Parameter |
|
---|---|
parent |
string Required. The resource in which to create the sink:
Examples: |
sink |
Object Required. The new sink, whose This object should have the same structure as LogSink |
uniqueWriterIdentity |
boolean Optional. Determines the kind of IAM identity returned as If this field is set to true, or if the sink is owned by a non-project
resource such as an organization, then the value of |
CreateSinkRequest
The parameters to CreateSink
.
Properties
Parameter |
|
---|---|
parent |
string Required. The resource in which to create the sink:
Examples: |
sink |
Object Required. The new sink, whose This object should have the same structure as LogSink |
uniqueWriterIdentity |
boolean Optional. Determines the kind of IAM identity returned as If this field is set to true, or if the sink is owned by a non-project
resource such as an organization, then the value of |
DeleteExclusionRequest
The parameters to DeleteExclusion
.
Property
Parameter |
|
---|---|
name |
string Required. The resource name of an existing exclusion to delete:
Example: |
DeleteExclusionRequest
The parameters to DeleteExclusion
.
Property
Parameter |
|
---|---|
name |
string Required. The resource name of an existing exclusion to delete:
Example: |
DeleteLogMetricRequest
The parameters to DeleteLogMetric.
Property
Parameter |
|
---|---|
metricName |
string The resource name of the metric to delete:
|
DeleteLogMetricRequest
The parameters to DeleteLogMetric.
Property
Parameter |
|
---|---|
metricName |
string The resource name of the metric to delete:
|
DeleteLogRequest
The parameters to DeleteLog.
Property
Parameter |
|
---|---|
logName |
string Required. The resource name of the log to delete:
|
DeleteLogRequest
The parameters to DeleteLog.
Property
Parameter |
|
---|---|
logName |
string Required. The resource name of the log to delete:
|
DeleteSinkRequest
The parameters to DeleteSink
.
Property
Parameter |
|
---|---|
sinkName |
string Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:
Example: |
DeleteSinkRequest
The parameters to DeleteSink
.
Property
Parameter |
|
---|---|
sinkName |
string Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:
Example: |
GetExclusionRequest
The parameters to GetExclusion
.
Property
Parameter |
|
---|---|
name |
string Required. The resource name of an existing exclusion:
Example: |
GetExclusionRequest
The parameters to GetExclusion
.
Property
Parameter |
|
---|---|
name |
string Required. The resource name of an existing exclusion:
Example: |
GetLogMetricRequest
The parameters to GetLogMetric.
Property
Parameter |
|
---|---|
metricName |
string The resource name of the desired metric:
|
GetLogMetricRequest
The parameters to GetLogMetric.
Property
Parameter |
|
---|---|
metricName |
string The resource name of the desired metric:
|
GetSinkRequest
The parameters to GetSink
.
Property
Parameter |
|
---|---|
sinkName |
string Required. The resource name of the sink:
Example: |
GetSinkRequest
The parameters to GetSink
.
Property
Parameter |
|
---|---|
sinkName |
string Required. The resource name of the sink:
Example: |
ListExclusionsRequest
The parameters to ListExclusions
.
Properties
Parameter |
|
---|---|
parent |
string Required. The parent resource whose exclusions are to be listed.
|
pageToken |
string Optional. If present, then retrieve the next batch of results from the
preceding call to this method. |
pageSize |
number Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of |
ListExclusionsRequest
The parameters to ListExclusions
.
Properties
Parameter |
|
---|---|
parent |
string Required. The parent resource whose exclusions are to be listed.
|
pageToken |
string Optional. If present, then retrieve the next batch of results from the
preceding call to this method. |
pageSize |
number Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of |
ListExclusionsResponse
Result returned from ListExclusions
.
Properties
Parameter |
|
---|---|
exclusions |
Array of Object A list of exclusions. This object should have the same structure as LogExclusion |
nextPageToken |
string If there might be more results than appear in this response, then
|
ListExclusionsResponse
Result returned from ListExclusions
.
Properties
Parameter |
|
---|---|
exclusions |
Array of Object A list of exclusions. This object should have the same structure as LogExclusion |
nextPageToken |
string If there might be more results than appear in this response, then
|
ListLogEntriesRequest
The parameters to ListLogEntries
.
Properties
Parameter |
|
---|---|
projectIds |
Array of string Deprecated. Use |
resourceNames |
Array of string Required. Names of one or more parent resources from which to retrieve log entries:
Projects listed in the |
filter |
string Optional. A filter that chooses which log entries to return. See Advanced
Logs Filters. Only log entries that
match the filter are returned. An empty filter matches all log entries in
the resources listed in |
orderBy |
string Optional. How the results should be sorted. Presently, the only permitted
values are |
pageSize |
number Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of |
pageToken |
string Optional. If present, then retrieve the next batch of results from the
preceding call to this method. |
ListLogEntriesRequest
The parameters to ListLogEntries
.
Properties
Parameter |
|
---|---|
projectIds |
Array of string Deprecated. Use |
resourceNames |
Array of string Required. Names of one or more parent resources from which to retrieve log entries:
Projects listed in the |
filter |
string Optional. A filter that chooses which log entries to return. See Advanced
Logs Filters. Only log entries that
match the filter are returned. An empty filter matches all log entries in
the resources listed in |
orderBy |
string Optional. How the results should be sorted. Presently, the only permitted
values are |
pageSize |
number Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of |
pageToken |
string Optional. If present, then retrieve the next batch of results from the
preceding call to this method. |
ListLogEntriesResponse
Result returned from ListLogEntries
.
Properties
Parameter |
|
---|---|
entries |
Array of Object A list of log entries. If This object should have the same structure as LogEntry |
nextPageToken |
string If there might be more results than those appearing in this response, then
If a value for |
ListLogEntriesResponse
Result returned from ListLogEntries
.
Properties
Parameter |
|
---|---|
entries |
Array of Object A list of log entries. If This object should have the same structure as LogEntry |
nextPageToken |
string If there might be more results than those appearing in this response, then
If a value for |
ListLogMetricsRequest
The parameters to ListLogMetrics.
Properties
Parameter |
|
---|---|
parent |
string Required. The name of the project containing the metrics:
|
pageToken |
string Optional. If present, then retrieve the next batch of results from the
preceding call to this method. |
pageSize |
number Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of |
ListLogMetricsRequest
The parameters to ListLogMetrics.
Properties
Parameter |
|
---|---|
parent |
string Required. The name of the project containing the metrics:
|
pageToken |
string Optional. If present, then retrieve the next batch of results from the
preceding call to this method. |
pageSize |
number Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of |
ListLogMetricsResponse
Result returned from ListLogMetrics.
Properties
Parameter |
|
---|---|
metrics |
Array of Object A list of logs-based metrics. This object should have the same structure as LogMetric |
nextPageToken |
string If there might be more results than appear in this response, then
|
ListLogMetricsResponse
Result returned from ListLogMetrics.
Properties
Parameter |
|
---|---|
metrics |
Array of Object A list of logs-based metrics. This object should have the same structure as LogMetric |
nextPageToken |
string If there might be more results than appear in this response, then
|
ListLogsRequest
The parameters to ListLogs.
Properties
Parameter |
|
---|---|
parent |
string Required. The resource name that owns the logs:
|
pageSize |
number Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of |
pageToken |
string Optional. If present, then retrieve the next batch of results from the
preceding call to this method. |
ListLogsRequest
The parameters to ListLogs.
Properties
Parameter |
|
---|---|
parent |
string Required. The resource name that owns the logs:
|
pageSize |
number Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of |
pageToken |
string Optional. If present, then retrieve the next batch of results from the
preceding call to this method. |
ListLogsResponse
Result returned from ListLogs.
Properties
Parameter |
|
---|---|
logNames |
Array of string A list of log names. For example,
|
nextPageToken |
string If there might be more results than those appearing in this response, then
|
ListLogsResponse
Result returned from ListLogs.
Properties
Parameter |
|
---|---|
logNames |
Array of string A list of log names. For example,
|
nextPageToken |
string If there might be more results than those appearing in this response, then
|
ListMonitoredResourceDescriptorsRequest
The parameters to ListMonitoredResourceDescriptors
Properties
Parameter |
|
---|---|
pageSize |
number Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of |
pageToken |
string Optional. If present, then retrieve the next batch of results from the
preceding call to this method. |
ListMonitoredResourceDescriptorsRequest
The parameters to ListMonitoredResourceDescriptors
Properties
Parameter |
|
---|---|
pageSize |
number Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of |
pageToken |
string Optional. If present, then retrieve the next batch of results from the
preceding call to this method. |
ListMonitoredResourceDescriptorsResponse
Result returned from ListMonitoredResourceDescriptors.
Properties
Parameter |
|
---|---|
resourceDescriptors |
Array of Object A list of resource descriptors. This object should have the same structure as MonitoredResourceDescriptor |
nextPageToken |
string If there might be more results than those appearing in this response, then
|
ListMonitoredResourceDescriptorsResponse
Result returned from ListMonitoredResourceDescriptors.
Properties
Parameter |
|
---|---|
resourceDescriptors |
Array of Object A list of resource descriptors. This object should have the same structure as MonitoredResourceDescriptor |
nextPageToken |
string If there might be more results than those appearing in this response, then
|
ListSinksRequest
The parameters to ListSinks
.
Properties
Parameter |
|
---|---|
parent |
string Required. The parent resource whose sinks are to be listed:
|
pageToken |
string Optional. If present, then retrieve the next batch of results from the
preceding call to this method. |
pageSize |
number Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of |
ListSinksRequest
The parameters to ListSinks
.
Properties
Parameter |
|
---|---|
parent |
string Required. The parent resource whose sinks are to be listed:
|
pageToken |
string Optional. If present, then retrieve the next batch of results from the
preceding call to this method. |
pageSize |
number Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of |
ListSinksResponse
Result returned from ListSinks
.
Properties
Parameter |
|
---|---|
sinks |
Array of Object A list of sinks. This object should have the same structure as LogSink |
nextPageToken |
string If there might be more results than appear in this response, then
|
ListSinksResponse
Result returned from ListSinks
.
Properties
Parameter |
|
---|---|
sinks |
Array of Object A list of sinks. This object should have the same structure as LogSink |
nextPageToken |
string If there might be more results than appear in this response, then
|
LogEntry
An individual entry in a log.
Properties
Parameter |
|
---|---|
logName |
string Required. The resource name of the log to which this log entry belongs:
A project number may optionally be used in place of PROJECT_ID. The
project number is translated to its corresponding PROJECT_ID internally
and the For backward compatibility, if |
resource |
Object Required. The primary monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error. This object should have the same structure as MonitoredResource |
protoPayload |
Object The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads. This object should have the same structure as Any |
textPayload |
string The log entry payload, represented as a Unicode string (UTF-8). |
jsonPayload |
Object The log entry payload, represented as a structure that is expressed as a JSON object. This object should have the same structure as Struct |
timestamp |
Object Optional. The time the event described by the log entry occurred. This time is used to compute the log entry's age and to enforce the logs retention period. If this field is omitted in a new log entry, then Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is displayed. Incoming log entries should have timestamps that are no more than
the logs retention period in the past,
and no more than 24 hours in the future. Log entries outside those time
boundaries will not be available when calling This object should have the same structure as Timestamp |
receiveTimestamp |
Object Output only. The time the log entry was received by Logging. This object should have the same structure as Timestamp |
severity |
number Optional. The severity of the log entry. The default value is
The number should be among the values of LogSeverity |
insertId |
string Optional. A unique identifier for the log entry. If you provide a value,
then Logging considers other log entries in the same project,
with the same |
httpRequest |
Object Optional. Information about the HTTP request associated with this log entry, if applicable. This object should have the same structure as HttpRequest |
labels |
Object with string properties Optional. A set of user-defined (key, value) data that provides additional information about the log entry. |
metadata |
Object Output only. Additional metadata about the monitored resource.
Only This object should have the same structure as MonitoredResourceMetadata |
operation |
Object Optional. Information about an operation associated with the log entry, if applicable. This object should have the same structure as LogEntryOperation |
trace |
string Optional. Resource name of the trace associated with the log entry, if any.
If it contains a relative resource name, the name is assumed to be relative
to |
spanId |
string Optional. The span ID within the trace associated with the log entry.
For Trace spans, this is the same format that the Trace
API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
as |
traceSampled |
boolean Optional. The sampling decision of the trace associated with the log entry.
True means that the trace resource name in the |
sourceLocation |
Object Optional. Source code location information associated with the log entry, if any. This object should have the same structure as LogEntrySourceLocation |
LogEntry
An individual entry in a log.
Properties
Parameter |
|
---|---|
logName |
string Required. The resource name of the log to which this log entry belongs:
A project number may optionally be used in place of PROJECT_ID. The
project number is translated to its corresponding PROJECT_ID internally
and the For backward compatibility, if |
resource |
Object Required. The primary monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error. This object should have the same structure as MonitoredResource |
protoPayload |
Object The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads. This object should have the same structure as Any |
textPayload |
string The log entry payload, represented as a Unicode string (UTF-8). |
jsonPayload |
Object The log entry payload, represented as a structure that is expressed as a JSON object. This object should have the same structure as Struct |
timestamp |
Object Optional. The time the event described by the log entry occurred. This time is used to compute the log entry's age and to enforce the logs retention period. If this field is omitted in a new log entry, then Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is displayed. Incoming log entries should have timestamps that are no more than
the logs retention period in the past,
and no more than 24 hours in the future. Log entries outside those time
boundaries will not be available when calling This object should have the same structure as Timestamp |
receiveTimestamp |
Object Output only. The time the log entry was received by Logging. This object should have the same structure as Timestamp |
severity |
number Optional. The severity of the log entry. The default value is
The number should be among the values of LogSeverity |
insertId |
string Optional. A unique identifier for the log entry. If you provide a value,
then Logging considers other log entries in the same project,
with the same |
httpRequest |
Object Optional. Information about the HTTP request associated with this log entry, if applicable. This object should have the same structure as HttpRequest |
labels |
Object with string properties Optional. A set of user-defined (key, value) data that provides additional information about the log entry. |
metadata |
Object Output only. Additional metadata about the monitored resource.
Only This object should have the same structure as MonitoredResourceMetadata |
operation |
Object Optional. Information about an operation associated with the log entry, if applicable. This object should have the same structure as LogEntryOperation |
trace |
string Optional. Resource name of the trace associated with the log entry, if any.
If it contains a relative resource name, the name is assumed to be relative
to |
spanId |
string Optional. The span ID within the trace associated with the log entry.
For Trace spans, this is the same format that the Trace
API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
as |
traceSampled |
boolean Optional. The sampling decision of the trace associated with the log entry.
True means that the trace resource name in the |
sourceLocation |
Object Optional. Source code location information associated with the log entry, if any. This object should have the same structure as LogEntrySourceLocation |
LogEntryOperation
Additional information about a potentially long-running operation with which a log entry is associated.
Properties
Parameter |
|
---|---|
id |
string Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation. |
producer |
string Optional. An arbitrary producer identifier. The combination of
|
first |
boolean Optional. Set this to True if this is the first log entry in the operation. |
last |
boolean Optional. Set this to True if this is the last log entry in the operation. |
LogEntryOperation
Additional information about a potentially long-running operation with which a log entry is associated.
Properties
Parameter |
|
---|---|
id |
string Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation. |
producer |
string Optional. An arbitrary producer identifier. The combination of
|
first |
boolean Optional. Set this to True if this is the first log entry in the operation. |
last |
boolean Optional. Set this to True if this is the last log entry in the operation. |
LogEntrySourceLocation
Additional information about the source code location that produced the log entry.
Properties
Parameter |
|
---|---|
file |
string Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name. |
line |
number Optional. Line within the source file. 1-based; 0 indicates no line number available. |
function |
string Optional. Human-readable name of the function or method being invoked, with
optional context such as the class or package name. This information may be
used in contexts such as the logs viewer, where a file and line number are
less meaningful. The format can vary by language. For example:
|
LogEntrySourceLocation
Additional information about the source code location that produced the log entry.
Properties
Parameter |
|
---|---|
file |
string Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name. |
line |
number Optional. Line within the source file. 1-based; 0 indicates no line number available. |
function |
string Optional. Human-readable name of the function or method being invoked, with
optional context such as the class or package name. This information may be
used in contexts such as the logs viewer, where a file and line number are
less meaningful. The format can vary by language. For example:
|
LogExclusion
Specifies a set of log entries that are not to be stored in Logging. If your project receives a large volume of logs, you might be able to use exclusions to reduce your chargeable logs. Exclusions are processed after log sinks, so you can export log entries before they are excluded. Audit log entries and log entries from Amazon Web Services are never excluded.
Properties
Parameter |
|
---|---|
name |
string Required. A client-assigned identifier, such as
|
description |
string Optional. A description of this exclusion. |
filter |
string Required. An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. For example, the following filter matches 99% of low-severity log entries from load balancers: |
disabled |
boolean Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can use exclusions.patch to change the value of this field. |
LogExclusion
Specifies a set of log entries that are not to be stored in Logging. If your project receives a large volume of logs, you might be able to use exclusions to reduce your chargeable logs. Exclusions are processed after log sinks, so you can export log entries before they are excluded. Audit log entries and log entries from Amazon Web Services are never excluded.
Properties
Parameter |
|
---|---|
name |
string Required. A client-assigned identifier, such as
|
description |
string Optional. A description of this exclusion. |
filter |
string Required. An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. For example, the following filter matches 99% of low-severity log entries from load balancers: |
disabled |
boolean Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can use exclusions.patch to change the value of this field. |
LogMetric
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.
Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options.
Properties
Parameter |
|
---|---|
name |
string Required. The client-assigned metric identifier.
Examples: Metric identifiers are limited to 100 characters and can include
only the following characters: The metric identifier in this field must not be
URL-encoded.
However, when the metric identifier appears as the |
description |
string Optional. A description of this metric, which is used in documentation. |
filter |
string Required. An advanced logs filter which is used to match log entries. Example:
The maximum length of the filter is 20000 characters. |
metricDescriptor |
Object Optional. The metric descriptor associated with the logs-based metric.
If unspecified, it uses a default metric descriptor with a DELTA metric
kind, INT64 value type, with no labels and a unit of "1". Such a metric
counts the number of log entries matching the The To create a logs-based metric that records a distribution of log values, a
DELTA metric kind with a DISTRIBUTION value type must be used along with
a Each label in the metric descriptor must have a matching label
name as the key and an extractor expression as the value in the
The This object should have the same structure as MetricDescriptor |
valueExtractor |
string Optional. A
The result of the extraction must be convertible to a double type, as the distribution always records double values. If either the extraction or the conversion to double fails, then those values are not recorded in the distribution. Example: |
labelExtractors |
Object with string properties Optional. 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 The extracted value is converted to the type defined in the label
descriptor. If the either the extraction or the type conversion fails,
the label will have a default value. The default value for a string
label is an empty string, for an integer label its 0, and for a boolean
label its Note that there are upper bounds on the maximum number of labels and the number of active time series that are allowed in a project. |
bucketOptions |
Object Optional. The This object should have the same structure as BucketOptions |
version |
number Deprecated. The API version that created or updated this metric. The v2 format is used by default and cannot be changed. The number should be among the values of ApiVersion |
LogMetric
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.
Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options.
Properties
Parameter |
|
---|---|
name |
string Required. The client-assigned metric identifier.
Examples: Metric identifiers are limited to 100 characters and can include
only the following characters: The metric identifier in this field must not be
URL-encoded.
However, when the metric identifier appears as the |
description |
string Optional. A description of this metric, which is used in documentation. |
filter |
string Required. An advanced logs filter which is used to match log entries. Example:
The maximum length of the filter is 20000 characters. |
metricDescriptor |
Object Optional. The metric descriptor associated with the logs-based metric.
If unspecified, it uses a default metric descriptor with a DELTA metric
kind, INT64 value type, with no labels and a unit of "1". Such a metric
counts the number of log entries matching the The To create a logs-based metric that records a distribution of log values, a
DELTA metric kind with a DISTRIBUTION value type must be used along with
a Each label in the metric descriptor must have a matching label
name as the key and an extractor expression as the value in the
The This object should have the same structure as MetricDescriptor |
valueExtractor |
string Optional. A
The result of the extraction must be convertible to a double type, as the distribution always records double values. If either the extraction or the conversion to double fails, then those values are not recorded in the distribution. Example: |
labelExtractors |
Object with string properties Optional. 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 The extracted value is converted to the type defined in the label
descriptor. If the either the extraction or the type conversion fails,
the label will have a default value. The default value for a string
label is an empty string, for an integer label its 0, and for a boolean
label its Note that there are upper bounds on the maximum number of labels and the number of active time series that are allowed in a project. |
bucketOptions |
Object Optional. The This object should have the same structure as BucketOptions |
version |
number Deprecated. The API version that created or updated this metric. The v2 format is used by default and cannot be changed. The number should be among the values of ApiVersion |
LogSink
Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder.
Properties
Parameter |
|
---|---|
name |
string Required. The client-assigned sink identifier, unique within the
project. Example: |
destination |
string Required. The export destination:
The sink's |
filter |
string Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. For example:
|
outputVersionFormat |
number Deprecated. The log entry format to use for this sink's exported log entries. The v2 format is used by default and cannot be changed. The number should be among the values of VersionFormat |
writerIdentity |
string Output only. An IAM identity—a service account or group—under
which Logging writes the exported log entries to the sink's
destination. This field is set by
sinks.create
and
sinks.update,
based on the setting of Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity. |
includeChildren |
boolean Optional. This field applies only to sinks owned by organizations and
folders. If the field is false, the default, only the logs owned by the
sink's parent resource are available for export. If the field is true, then
logs from all the projects, folders, and billing accounts contained in the
sink's parent resource are also available for export. Whether a particular
log entry from the children is exported depends on the sink's filter
expression. For example, if this field is true, then the filter
|
startTime |
Object Deprecated. This field is ignored when creating or updating sinks. This object should have the same structure as Timestamp |
endTime |
Object Deprecated. This field is ignored when creating or updating sinks. This object should have the same structure as Timestamp |
LogSink
Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder.
Properties
Parameter |
|
---|---|
name |
string Required. The client-assigned sink identifier, unique within the
project. Example: |
destination |
string Required. The export destination:
The sink's |
filter |
string Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. For example:
|
outputVersionFormat |
number Deprecated. The log entry format to use for this sink's exported log entries. The v2 format is used by default and cannot be changed. The number should be among the values of VersionFormat |
writerIdentity |
string Output only. An IAM identity—a service account or group—under
which Logging writes the exported log entries to the sink's
destination. This field is set by
sinks.create
and
sinks.update,
based on the setting of Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity. |
includeChildren |
boolean Optional. This field applies only to sinks owned by organizations and
folders. If the field is false, the default, only the logs owned by the
sink's parent resource are available for export. If the field is true, then
logs from all the projects, folders, and billing accounts contained in the
sink's parent resource are also available for export. Whether a particular
log entry from the children is exported depends on the sink's filter
expression. For example, if this field is true, then the filter
|
startTime |
Object Deprecated. This field is ignored when creating or updating sinks. This object should have the same structure as Timestamp |
endTime |
Object Deprecated. This field is ignored when creating or updating sinks. This object should have the same structure as Timestamp |
UpdateExclusionRequest
The parameters to UpdateExclusion
.
Properties
Parameter |
|
---|---|
name |
string Required. The resource name of the exclusion to update:
Example: |
exclusion |
Object Required. New values for the existing exclusion. Only the fields specified
in This object should have the same structure as LogExclusion |
updateMask |
Object Required. A nonempty list of fields to change in the existing exclusion.
New values for the fields are taken from the corresponding fields in the
LogExclusion included in this request. Fields not mentioned in
For example, to change the filter and description of an exclusion,
specify an This object should have the same structure as FieldMask |
UpdateExclusionRequest
The parameters to UpdateExclusion
.
Properties
Parameter |
|
---|---|
name |
string Required. The resource name of the exclusion to update:
Example: |
exclusion |
Object Required. New values for the existing exclusion. Only the fields specified
in This object should have the same structure as LogExclusion |
updateMask |
Object Required. A nonempty list of fields to change in the existing exclusion.
New values for the fields are taken from the corresponding fields in the
LogExclusion included in this request. Fields not mentioned in
For example, to change the filter and description of an exclusion,
specify an This object should have the same structure as FieldMask |
UpdateLogMetricRequest
The parameters to UpdateLogMetric.
Properties
Parameter |
|
---|---|
metricName |
string The resource name of the metric to update:
The updated metric must be provided in the request and it's
|
metric |
Object The updated metric. This object should have the same structure as LogMetric |
UpdateLogMetricRequest
The parameters to UpdateLogMetric.
Properties
Parameter |
|
---|---|
metricName |
string The resource name of the metric to update:
The updated metric must be provided in the request and it's
|
metric |
Object The updated metric. This object should have the same structure as LogMetric |
UpdateSinkRequest
The parameters to UpdateSink
.
Properties
Parameter |
|
---|---|
sinkName |
string Required. The full resource name of the sink to update, including the parent resource and the sink identifier:
Example: |
sink |
Object Required. The updated sink, whose name is the same identifier that appears
as part of This object should have the same structure as LogSink |
uniqueWriterIdentity |
boolean Optional. See
sinks.create
for a description of this field. When updating a sink, the effect of this
field on the value of
|
updateMask |
Object Optional. Field mask that specifies the fields in An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error. For a detailed Example: This object should have the same structure as FieldMask |
UpdateSinkRequest
The parameters to UpdateSink
.
Properties
Parameter |
|
---|---|
sinkName |
string Required. The full resource name of the sink to update, including the parent resource and the sink identifier:
Example: |
sink |
Object Required. The updated sink, whose name is the same identifier that appears
as part of This object should have the same structure as LogSink |
uniqueWriterIdentity |
boolean Optional. See
sinks.create
for a description of this field. When updating a sink, the effect of this
field on the value of
|
updateMask |
Object Optional. Field mask that specifies the fields in An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error. For a detailed Example: This object should have the same structure as FieldMask |
WriteLogEntriesPartialErrors
Error details for WriteLogEntries with partial success.
Property
Parameter |
|
---|---|
logEntryErrors |
Object with number keys and Object properties When Failed requests for which no entries are written will not include per-entry errors. |
WriteLogEntriesRequest
The parameters to WriteLogEntries.
Properties
Parameter |
|
---|---|
logName |
string Optional. A default log resource name that is assigned to all log entries
in
The permission |
resource |
Object Optional. A default monitored resource object that is assigned to all log
entries in
See LogEntry. This object should have the same structure as MonitoredResource |
labels |
Object with string properties Optional. Default labels that are added to the |
entries |
Array of Object Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
If the Log entries with timestamps that are more than the
logs retention period in the past or more than
24 hours in the future will not be available when calling To improve throughput and to avoid exceeding the
quota limit for calls to This object should have the same structure as LogEntry |
partialSuccess |
boolean Optional. Whether valid entries should be written even if some other
entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
entry is not written, then the response status is the error associated
with one of the failed entries and the response includes error details
keyed by the entries' zero-based index in the |
dryRun |
boolean Optional. If true, the request should expect normal response, but the entries won't be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data. |
WriteLogEntriesRequest
The parameters to WriteLogEntries.
Properties
Parameter |
|
---|---|
logName |
string Optional. A default log resource name that is assigned to all log entries
in
The permission |
resource |
Object Optional. A default monitored resource object that is assigned to all log
entries in
See LogEntry. This object should have the same structure as MonitoredResource |
labels |
Object with string properties Optional. Default labels that are added to the |
entries |
Array of Object Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
If the Log entries with timestamps that are more than the
logs retention period in the past or more than
24 hours in the future will not be available when calling To improve throughput and to avoid exceeding the
quota limit for calls to This object should have the same structure as LogEntry |
partialSuccess |
boolean Optional. Whether valid entries should be written even if some other
entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
entry is not written, then the response status is the error associated
with one of the failed entries and the response includes error details
keyed by the entries' zero-based index in the |
dryRun |
boolean Optional. If true, the request should expect normal response, but the entries won't be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data. |
WriteLogEntriesResponse
Result returned from WriteLogEntries. empty
WriteLogEntriesResponse
Result returned from WriteLogEntries. empty