Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Logging
  • Getting started
  • Access management
  • Pricing policy
  • Terraform reference
    • API authentication
      • Overview
        • Overview
        • Read
  • Monitoring metrics
  • Audit Trails events
  • FAQ

In this article:

  • gRPC request
  • ReadRequest
  • Criteria
  • ReadResponse
  • LogEntry
  • LogEntryResource
  1. API reference
  2. gRPC
  3. LogReading
  4. Read

Cloud Logging Service, gRPC: LogReadingService.Read

Written by
Yandex Cloud
Updated at November 26, 2024
  • gRPC request
  • ReadRequest
  • Criteria
  • ReadResponse
  • LogEntry
  • LogEntryResource

Read log entries from the specified log group.

gRPC requestgRPC request

rpc Read (ReadRequest) returns (ReadResponse)

ReadRequestReadRequest

{
  // Includes only one of the fields `page_token`, `criteria`
  "page_token": "string",
  "criteria": {
    "log_group_id": "string",
    "resource_types": [
      "string"
    ],
    "resource_ids": [
      "string"
    ],
    "since": "google.protobuf.Timestamp",
    "until": "google.protobuf.Timestamp",
    "levels": [
      "Level"
    ],
    "filter": "string",
    "stream_names": [
      "string"
    ],
    "page_size": "int64",
    "max_response_size": "int64"
  }
  // end of the list of possible fields
}

Field

Description

page_token

string

Page token. To get the next page of results, set page_token to the
ReadResponse.next_page_token or ReadResponse.previous_page_token returned by a previous read request.

Includes only one of the fields page_token, criteria.

Read selector.

criteria

Criteria

Read criteria.

See Criteria for details.

Includes only one of the fields page_token, criteria.

Read selector.

CriteriaCriteria

Read criteria. Should be used in initial ReadRequest.

Field

Description

log_group_id

string

Required field. ID of the log group to return.

To get a log group ID make a LogGroupService.List request.

resource_types[]

string

List of resource types to limit log entries to.

Empty list disables filter.

resource_ids[]

string

List of resource IDs to limit log entries to.

Empty list disables filter.

since

google.protobuf.Timestamp

Lower bound of log entries timestamps.

until

google.protobuf.Timestamp

Upper bound of log entries timestamps.

levels[]

enum Level

List of log levels to limit log entries to.

Empty list disables filter.

  • LEVEL_UNSPECIFIED: Default log level.

    Equivalent to not specifying log level at all.

  • TRACE: Trace log level.

    Possible use case: verbose logging of some business logic.

  • DEBUG: Debug log level.

    Possible use case: debugging special cases in application logic.

  • INFO: Info log level.

    Mostly used for information messages.

  • WARN: Warn log level.

    May be used to alert about significant events.

  • ERROR: Error log level.

    May be used to alert about errors in infrastructure, logic, etc.

  • FATAL: Fatal log level.

    May be used to alert about unrecoverable failures and events.

filter

string

Filter expression. For details about filtering, see documentation.

stream_names[]

string

List of stream names to limit log entries to.

Empty list disables filter.

page_size

int64

The maximum number of results per page to return.

max_response_size

int64

Limits response to maximum size in bytes. Prevents gRPC resource exhaustion.

Default value for max response size is 3.5 MiB

ReadResponseReadResponse

{
  "log_group_id": "string",
  "entries": [
    {
      "uid": "string",
      "resource": {
        "type": "string",
        "id": "string"
      },
      "timestamp": "google.protobuf.Timestamp",
      "ingested_at": "google.protobuf.Timestamp",
      "saved_at": "google.protobuf.Timestamp",
      "level": "Level",
      "message": "string",
      "json_payload": "google.protobuf.Struct",
      "stream_name": "string"
    }
  ],
  "next_page_token": "string",
  "previous_page_token": "string"
}

Field

Description

log_group_id

string

Log group ID the read was performed from.

entries[]

LogEntry

List of matching log entries.

next_page_token

string

Token for getting the next page of the log entries.

After getting log entries initially with Criteria, you can use next_page_token as the value
for the ReadRequest.page_token parameter in the next read request.

Each subsequent page will have its own next_page_token to continue paging through the results.

previous_page_token

string

Token for getting the previous page of the log entries.

After getting log entries initially with Criteria, you can use previous_page_token as the value
for the ReadRequest.page_token parameter in the next read request.

Each subsequent page will have its own next_page_token to continue paging through the results.

LogEntryLogEntry

Field

Description

uid

string

Unique entry ID.

Useful for logs deduplication.

resource

LogEntryResource

Entry resource specification.

May contain information about source service and resource ID.
Also may be provided by the user.

timestamp

google.protobuf.Timestamp

Timestamp of the entry.

ingested_at

google.protobuf.Timestamp

Entry ingestion time observed by LogIngestionService.

saved_at

google.protobuf.Timestamp

Entry save time.

Entry is ready to be read since this moment.

level

enum Level

Entry severity.

See LogLevel.Level for details.

  • LEVEL_UNSPECIFIED: Default log level.

    Equivalent to not specifying log level at all.

  • TRACE: Trace log level.

    Possible use case: verbose logging of some business logic.

  • DEBUG: Debug log level.

    Possible use case: debugging special cases in application logic.

  • INFO: Info log level.

    Mostly used for information messages.

  • WARN: Warn log level.

    May be used to alert about significant events.

  • ERROR: Error log level.

    May be used to alert about errors in infrastructure, logic, etc.

  • FATAL: Fatal log level.

    May be used to alert about unrecoverable failures and events.

message

string

Entry text message.

json_payload

google.protobuf.Struct

Entry annotation.

stream_name

string

Entry stream name.

LogEntryResourceLogEntryResource

Log entry resource specification.

May be used either by services and by user.

Field

Description

type

string

Resource type, i.e., serverless.function

id

string

Resource ID, i.e., ID of the function producing logs.

Was the article helpful?

Previous
Overview
Next
Overview
© 2025 Direct Cursus Technology L.L.C.