-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
The purpose and use-cases of the new component
This component receives notifications from Pub/Sub, and decodes the messages given the encoding.
The component has support for notifications that:
- Directly contain a log placed in Pub/Sub
- Contain a reference to an object placed in Google Cloud Storage, in which case the receiver fetches the object, parses it, and passes it to the new consumer.
Roughly, the architecture is like this:
Difference to the current google pub sub receiver
The main difference between the current googlecloudpubsub receiver and the proposed new receiver lies in how they receive messages from Google Pub/Sub. The existing receiver uses a pull subscription model, where the receiver itself initiates requests to Pub/Sub to fetch new messages. This means it must regularly poll for new data, which can introduce delays between when a log is published and when it is received. In contrast, the proposed receiver is designed for push subscriptions, where Pub/Sub actively pushes messages to the receiver as soon as they are available. This allows for near real-time delivery, as the receiver is immediately notified and can process logs right away. In essence, the pull model is receiver-initiated and may be delayed, while the push model is Pub/Sub-initiated and enables immediate, event-driven log ingestion. You can read more about Pull/Push subscriptions in the official documentation.
| Receiver Type | Who Initiates? | Delivery Speed | Use Case Example |
|---|---|---|---|
| Pull (current google pub sub receiver) | Receiver | Polling/Delayed | Periodic log collection |
| Push (new proposed receiver) | Pub/Sub | Immediate/Real-time | Event-driven log ingest |
Example configuration for the component
An example configuration is:
receivers:
googlepubsubpush:
endpoint: :8080
encoding: googlecloudlogentry_encoding
exporters:
otlphttp:
endpoint: "https://my-backend:443"
extensions:
googlecloudlogentry_encoding:
service:
extensions:
- googlecloudlogentry_encoding
pipelines:
logs:
receivers: [googlepubsubpush]
exporters:
- otlphttp
telemetry:
logs:
level: warnThis means that logs received by googlepubsubpush are parsed using googlecloudlogentry_encoding, and then forward to otlphttp.
Telemetry data types supported
It will start with support for logs.
Later we may want to add metrics.
Code Owner(s)
Sponsor (optional)
Additional context
We use this internally at Elastic to parse logs placed in GCS or sent directly to Pub/Sub.
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.