Streaming read of log entries as they are received. Until the stream is terminated, it will continue reading logs.
HTTP request
POST https://logging.googleapis.com/v2/entries:tail
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "resourceNames": [ string ], "filter": string, "bufferWindow": string } |
Fields | |
---|---|
resource |
Required. Name of a parent resource from which to retrieve log entries:
May alternatively be one or more views:
Authorization requires one or more of the following IAM permissions on the specified resource
|
filter |
Optional. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in |
buffer |
Optional. The amount of time to buffer log entries at the server before being returned to prevent out of order results due to late arriving log entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 milliseconds. A duration in seconds with up to nine fractional digits, ending with ' |
Response body
Result returned from entries.tail
.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "entries": [ { object ( |
Fields | |
---|---|
entries[] |
A list of log entries. Each response in the stream will order entries with increasing values of |
suppression |
If entries that otherwise would have been included in the session were not sent back to the client, counts of relevant entries omitted from the session with the reason that they were not included. There will be at most one of each reason per response. The counts represent the number of suppressed entries since the last streamed response. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/logging.read
https://www.googleapis.com/auth/logging.admin
https://www.googleapis.com/auth/cloud-platform.read-only
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
SuppressionInfo
Information about entries that were omitted from the session.
JSON representation |
---|
{
"reason": enum ( |
Fields | |
---|---|
reason |
The reason that entries were omitted from the session. |
suppressed |
A lower bound on the count of entries omitted due to |
Reason
An indicator of why entries were omitted.
Enums | |
---|---|
REASON_UNSPECIFIED |
Unexpected default. |
RATE_LIMIT |
Indicates suppression occurred due to relevant entries being received in excess of rate limits. For quotas and limits, see Logging API quotas and limits. |
NOT_CONSUMED |
Indicates suppression occurred due to the client not consuming responses quickly enough. |