Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
© 2022 Yandex.Cloud LLC
Yandex Cloud Logging
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Adding records
    • Reading records
    • Managing log groups
      • Creating a log group
      • Managing rights to access log groups
      • Updating the record retention period
      • Getting a list of log groups
      • Monitoring
      • Deleting a log group
  • Practical guidelines
    • All tutorials
    • Transmitting the Managed Service for Kubernetes cluster logs to Cloud Logging
    • Transferring logs from a VM instance to Cloud Logging
    • Transferring logs from COI to Cloud Logging
  • Concepts
    • Log group
    • Filter expression language
    • Quotas and limits
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • LogGroupService
      • LogIngestionService
      • LogReadingService
      • OperationService
    • REST
      • Overview
      • LogGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listAccessBindings
        • listOperations
        • listResources
        • setAccessBindings
        • stats
        • update
        • updateAccessBindings
  • Questions and answers
  1. API reference
  2. gRPC
  3. LogReadingService

LogReadingService

Written by
Yandex Cloud
  • Calls LogReadingService
  • Read
    • ReadRequest
    • Criteria
    • ReadResponse
    • LogEntry
    • LogEntryResource

A set of methods for reading from log groups. To make a request use reader.logging.yandexcloud.net.

Call Description
Read Read log entries from the specified log group.

Calls LogReadingService

Read

Read log entries from the specified log group.

rpc Read (ReadRequest) returns (ReadResponse)

ReadRequest

Field Description
selector oneof: page_token or criteria
Read selector.
  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.
  criteria Criteria
Read criteria.
See Criteria for details.

Criteria

Field Description
log_group_id string
Required. ID of the log group to return.
To get a log group ID make a LogGroupService.List request. The maximum string length in characters is 64.
resource_types[] string
List of resource types to limit log entries to.
Empty list disables filter. Each value must match the regular expression |[a-zA-Z][-a-zA-Z0-9_.]{0,63}. The maximum number of elements is 100.
resource_ids[] string
List of resource IDs to limit log entries to.
Empty list disables filter. Each value must match the regular expression |[a-zA-Z0-9][-a-zA-Z0-9_.]{0,63}. The maximum number of elements is 100.
since google.protobuf.Timestamp
Lower bound of log entries timestamps.
until google.protobuf.Timestamp
Upper bound of log entries timestamps.
levels[] LogLevel.Level
List of log levels to limit log entries to.
Empty list disables filter. The maximum number of elements is 10.
filter string
Filter expression. For details about filtering, see documentation. The maximum string length in characters is 1000.
stream_names[] string
List of stream names to limit log entries to.
Empty list disables filter. Each value must match the regular expression |[a-zA-Z][-a-zA-Z0-9_.]{0,63}. The maximum number of elements is 100.
page_size int64
The maximum number of results per page to return. Acceptable values are 1 to 1000, inclusive.
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 Acceptable values are 0 to 10485760, inclusive.

ReadResponse

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.

LogEntry

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 LogLevel.Level
Entry severity.
See LogLevel.Level for details.
message string
Entry text message.
json_payload google.protobuf.Struct
Entry annotation.
stream_name string
Entry stream name. Value must match the regular expression |[a-zA-Z][-a-zA-Z0-9_.]{0,63}.

LogEntryResource

Field Description
type string
Resource type, i.e., serverless.function Value must match the regular expression ([a-zA-Z][-a-zA-Z0-9_.]{0,63})?.
id string
Resource ID, i.e., ID of the function producing logs. Value must match the regular expression ([a-zA-Z0-9][-a-zA-Z0-9_.]{0,63})?.

Was the article helpful?

Language / Region
© 2022 Yandex.Cloud LLC
In this article:
  • Calls LogReadingService
  • Read
  • ReadRequest
  • Criteria
  • ReadResponse
  • LogEntry
  • LogEntryResource