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
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Cloud Logging
  • Getting started
  • Access management
  • Pricing policy
  • Terraform reference
    • API authentication
      • Overview
        • Overview
        • Write
  • Monitoring metrics
  • Audit Trails events
  • FAQ

In this article:

  • gRPC request
  • WriteRequest
  • Destination
  • LogEntryResource
  • IncomingLogEntry
  • LogEntryDefaults
  • WriteResponse
  1. API reference
  2. gRPC
  3. LogIngestion
  4. Write

Cloud Logging Service, gRPC: LogIngestionService.Write

Written by
Yandex Cloud
Updated at December 17, 2024
  • gRPC request
  • WriteRequest
  • Destination
  • LogEntryResource
  • IncomingLogEntry
  • LogEntryDefaults
  • WriteResponse

Write log entries to specified destination.

gRPC requestgRPC request

rpc Write (WriteRequest) returns (WriteResponse)

WriteRequestWriteRequest

{
  "destination": {
    // Includes only one of the fields `log_group_id`, `folder_id`
    "log_group_id": "string",
    "folder_id": "string"
    // end of the list of possible fields
  },
  "resource": {
    "type": "string",
    "id": "string"
  },
  "entries": [
    {
      "timestamp": "google.protobuf.Timestamp",
      "level": "Level",
      "message": "string",
      "json_payload": "google.protobuf.Struct",
      "stream_name": "string"
    }
  ],
  "defaults": {
    "level": "Level",
    "json_payload": "google.protobuf.Struct",
    "stream_name": "string"
  }
}

Field

Description

destination

Destination

Required field. Log entries destination.

See Destination for details.

resource

LogEntryResource

Common resource (type, ID) specification for log entries.

entries[]

IncomingLogEntry

List of log entries.

defaults

LogEntryDefaults

Log entries defaults.

See LogEntryDefaults for details.

DestinationDestination

Field

Description

log_group_id

string

Entry should be written to log group resolved by ID.

Includes only one of the fields log_group_id, folder_id.

Entry destination.

folder_id

string

Entry should be written to default log group for the folder.

Includes only one of the fields log_group_id, folder_id.

Entry destination.

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.

IncomingLogEntryIncomingLogEntry

Field

Description

timestamp

google.protobuf.Timestamp

Required field. Timestamp of the entry.

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.

LogEntryDefaultsLogEntryDefaults

Field

Description

level

enum Level

Default entry severity.
Will be applied if entry level is unspecified.

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.

json_payload

google.protobuf.Struct

Default entry annotation.
Will be merged with entry annotation.
Any conflict will be resolved in favor of entry own annotation.

stream_name

string

Entry stream name.

WriteResponseWriteResponse

{
  "errors": "map<int64, google.rpc.Status>"
}

Field

Description

errors

object (map<int64, google.rpc.Status>)

The error result of the operation in case of failure or cancellation.

Was the article helpful?

Previous
Overview
Next
Overview
Yandex project
© 2025 Yandex.Cloud LLC