Members
(static) ApiVersion :number
Logging API version.
Properties:
Name | Type | Description |
---|---|---|
V2 |
number |
Logging API v2. |
V1 |
number |
Logging API v1. |
(static) 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.
Properties:
Name | Type | Description |
---|---|---|
VERSION_FORMAT_UNSPECIFIED |
number |
An unspecified format version that will default to V2. |
V2 |
number |
|
V1 |
number |
|
Type Definitions
CreateExclusionRequest
The parameters to CreateExclusion
.
Properties:
Name | Type | Description |
---|---|---|
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 |
- Source:
- See:
CreateLogMetricRequest
The parameters to CreateLogMetric.
Properties:
Name | Type | Description |
---|---|---|
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 |
- Source:
- See:
CreateSinkRequest
The parameters to CreateSink
.
Properties:
Name | Type | Description |
---|---|---|
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 |
- Source:
- See:
DeleteExclusionRequest
The parameters to DeleteExclusion
.
Properties:
Name | Type | Description |
---|---|---|
name |
string |
Required. The resource name of an existing exclusion to delete:
Example: |
- Source:
- See:
DeleteLogMetricRequest
The parameters to DeleteLogMetric.
Properties:
Name | Type | Description |
---|---|---|
metricName |
string |
The resource name of the metric to delete:
|
- Source:
- See:
DeleteLogRequest
The parameters to DeleteLog.
Properties:
Name | Type | Description |
---|---|---|
logName |
string |
Required. The resource name of the log to delete:
|
- Source:
- See:
DeleteSinkRequest
The parameters to DeleteSink
.
Properties:
Name | Type | Description |
---|---|---|
sinkName |
string |
Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:
Example: |
- Source:
- See:
GetExclusionRequest
The parameters to GetExclusion
.
Properties:
Name | Type | Description |
---|---|---|
name |
string |
Required. The resource name of an existing exclusion:
Example: |
- Source:
- See:
GetLogMetricRequest
The parameters to GetLogMetric.
Properties:
Name | Type | Description |
---|---|---|
metricName |
string |
The resource name of the desired metric:
|
- Source:
- See:
GetSinkRequest
The parameters to GetSink
.
Properties:
Name | Type | Description |
---|---|---|
sinkName |
string |
Required. The resource name of the sink:
Example: |
- Source:
- See:
ListExclusionsRequest
The parameters to ListExclusions
.
Properties:
Name | Type | Description |
---|---|---|
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 |
- Source:
- See:
ListExclusionsResponse
Result returned from ListExclusions
.
Properties:
Name | Type | Description |
---|---|---|
exclusions |
Array.<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
|
- Source:
- See:
ListLogEntriesRequest
The parameters to ListLogEntries
.
Properties:
Name | Type | Description |
---|---|---|
projectIds |
Array.<string> |
Deprecated. Use |
resourceNames |
Array.<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. |
- Source:
- See:
ListLogEntriesResponse
Result returned from ListLogEntries
.
Properties:
Name | Type | Description |
---|---|---|
entries |
Array.<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 |
- Source:
- See:
ListLogMetricsRequest
The parameters to ListLogMetrics.
Properties:
Name | Type | Description |
---|---|---|
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 |
- Source:
- See:
ListLogMetricsResponse
Result returned from ListLogMetrics.
Properties:
Name | Type | Description |
---|---|---|
metrics |
Array.<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
|
- Source:
- See:
ListLogsRequest
The parameters to ListLogs.
Properties:
Name | Type | Description |
---|---|---|
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. |
- Source:
- See:
ListLogsResponse
Result returned from ListLogs.
Properties:
Name | Type | Description |
---|---|---|
logNames |
Array.<string> |
A list of log names. For example,
|
nextPageToken |
string |
If there might be more results than those appearing in this response, then
|
- Source:
- See:
ListMonitoredResourceDescriptorsRequest
The parameters to ListMonitoredResourceDescriptors
Properties:
Name | Type | Description |
---|---|---|
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. |
- Source:
- See:
ListMonitoredResourceDescriptorsResponse
Result returned from ListMonitoredResourceDescriptors.
Properties:
Name | Type | Description |
---|---|---|
resourceDescriptors |
Array.<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
|
- Source:
- See:
ListSinksRequest
The parameters to ListSinks
.
Properties:
Name | Type | Description |
---|---|---|
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 |
- Source:
- See:
ListSinksResponse
Result returned from ListSinks
.
Properties:
Name | Type | Description |
---|---|---|
sinks |
Array.<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
|
- Source:
- See:
LogEntry
An individual entry in a log.
Properties:
Name | Type | Description |
---|---|---|
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.<string, string> |
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 |
- Source:
- See:
LogEntryOperation
Additional information about a potentially long-running operation with which a log entry is associated.
Properties:
Name | Type | Description |
---|---|---|
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. |
- Source:
- See:
LogEntrySourceLocation
Additional information about the source code location that produced the log entry.
Properties:
Name | Type | Description |
---|---|---|
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:
|
- Source:
- See:
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:
Name | Type | Description |
---|---|---|
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. |
- Source:
- See:
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:
Name | Type | Description |
---|---|---|
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.<string, string> |
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 |
- Source:
- See:
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:
Name | Type | Description |
---|---|---|
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 |
- Source:
- See:
UpdateExclusionRequest
The parameters to UpdateExclusion
.
Properties:
Name | Type | Description |
---|---|---|
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 |
- Source:
- See:
UpdateLogMetricRequest
The parameters to UpdateLogMetric.
Properties:
Name | Type | Description |
---|---|---|
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 |
- Source:
- See:
UpdateSinkRequest
The parameters to UpdateSink
.
Properties:
Name | Type | Description |
---|---|---|
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 |
- Source:
- See:
WriteLogEntriesRequest
The parameters to WriteLogEntries.
Properties:
Name | Type | Description |
---|---|---|
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.<string, string> |
Optional. Default labels that are added to the |
entries |
Array.<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. |
- Source:
- See:
WriteLogEntriesResponse
Result returned from WriteLogEntries. empty