Skip to main content

Google Cloud Pub/Sub

Overview

Google Cloud Pub/Sub pulls messages from a GCP Pub/Sub subscription. Supports GCP Cloud Logging, raw text, and OTLP protocols.

Supported platforms

  • Linux: Logs
  • Windows: Logs
  • macOS: Logs

Authentication Configuration

Google Cloud Pub/Sub supports optional authentication via GCP ADC.

ParameterTypeDescription
Credential Typeoptionenv for GCP ADC (recommended): Set GOOGLE_APPLICATION_CREDENTIALS env var to service account JSON path.

Basic Configuration

ParameterTypeDefault ValueRequiredDescription
subscriptionstringnoneYesFully qualified resource name of the Pub/Sub subscription in format projects/project-id/subscriptions/your-sub-name.
encodingstringgooglecloudlogentryYesLog Format (Encoding): The format of the messages arriving in the Pub/Sub topic (Enum: googlecloudlogentry, text, otlp_proto_log, otlp_proto_metric, otlp_proto_trace).
timeoutstring60sNoTimeout for the Pub/Sub client to wait for messages.
client_idstringnoneNoClient ID used by Pub/Sub for load balancing decisions.
user_agentstringnoneNoUser agent used by the Pub/Sub client to connect to the service.

Example Configuration

{
"subscription": "projects/my-project/subscriptions/my-sub", // required
"encoding": "googlecloudlogentry", // required, default: "googlecloudlogentry"
"timeout": "60s", // default: "60s"

"client_id": "", // default: none
"user_agent": "", // default: none
}