
Google Cloud LogExporter
CertifiedEnterprise EditionWrite logs to Google Cloud Storage
Google Cloud LogExporter
Write logs to Google Cloud Storage
Streams Kestra log records into GCS objects in JSON or ION, splitting files after a configurable line count (default 100,000) and buffering writes in chunks (default 1000). Uses service account credentials or impersonation; requires bucket write permission and emits request/file/log metrics.
type: io.kestra.plugin.ee.gcp.gcs.LogExporterExamples
Ship logs to GCP
id: log_shipper
namespace: company.team
triggers:
- id: daily
type: io.kestra.plugin.core.trigger.Schedule
cron: "@daily"
tasks:
- id: log_export
type: io.kestra.plugin.ee.core.log.LogShipper
logLevelFilter: INFO
lookbackPeriod: P1D
logExporters:
- id: GCPLogExporter
type: io.kestra.plugin.ee.gcp.gcs.LogExporter
projectId: myProjectId
format: JSON
maxLinesPerFile:10000
bucket: my-bucket
logFilePrefix: kestra-log-file
chunk: 1000
Properties
bucket *Requiredstring
Target GCS bucket
Existing bucket receiving the log objects; caller must have write access.
id *RequiredNon-dynamicstring
^[a-zA-Z0-9][a-zA-Z0-9_-]*1chunk integerstring
1000Batch size per upload request
Number of log lines buffered before writing to GCS; defaults to 1000. Lower to reduce memory or request payload.
format string
JSONIONJSONFile serialization format
Choose JSON or ION output; defaults to JSON.
impersonatedServiceAccount string
The GCP service account to impersonate
Service account email to impersonate for API calls.
For Cloud Run runner, this value applies to API calls used to create and run the job (--impersonate-service-account equivalent).
It does not set the job execution identity (--service-account).
logFilePrefix string
kestra-log-fileLog object name prefix
Prefix applied to each object name; final name is prefix-<timestamp>.json|ion. Defaults to kestra-log-file.
maxLinesPerFile integerstring
100000Maximum lines per file
Rotates to a new object after this many log lines; defaults to 100,000.
projectId string
The GCP project ID
scopes array
["https://www.googleapis.com/auth/cloud-platform"]The GCP scopes to be used
serviceAccount string
The GCP service account key
Service account JSON key used to authenticate API calls.
For Cloud Run runner job execution identity, this value is used as a fallback for --service-account
when runtimeServiceAccount is not provided.
Metrics
files.count counter
Number of files
logs counter
Number of logs
requests.count counter
Number of requests
requests.duration timer
Duration of requests