Logging in GCP
Deploying your application or infrastructure in Google Cloud Platform (GCP)? Stream your logs to highlight to see everything in one place.
Check out the following examples of setting up logs streaming in these services:
GCP Cloud Logging with Pub/Sub export
-
Setup the Google Ops Agent to send your infrastructure or compute logs to Google Cloud Logging.
-
Create a Cloud Pub/Sub topic for exporting your Google cloud logs.
-
Setup a Log Router Sink in Google Cloud Logging
-
Setup a Pub/Sub Subscription to export to highlight.io over HTTPS. Set the delivery type to
Push
. Ensure theEnable payload unwrapping
option is checked to send the payload deserialized rather than as a base64 encoded string. Set the endpoint URL depending on the structure of your logs. If your logs are structured asJSON
, set the endpoint to https://pub.highlight.io/v1/logs/json?project=YOUR_PROJECT_ID&service=backend-service. Otherwise, for unstructured text logs, set the endpoint to https://pub.highlight.io/v1/logs/raw?project=YOUR_PROJECT_ID&service=backend-service
At this point, your infrastructure / service logs should show up in highlight!