Google Cloud Pub/Sub
Read time: 2 minutes
Last edited: Jul 29, 2020
This topic explains how to create a Google Cloud Pub/Sub destination.
Google Cloud Pub/Sub destinations let you export all of the flag evaluation and event data generated by LaunchDarkly SDKs into a Google Cloud Pub/Sub topic. This export behavior is referred to as publishing.
In order for LaunchDarkly to send events to your Google Cloud Pub/Sub topic, you need the
topicId for the Google Cloud Pub/Sub topic to which you want us to publish.
Find this information in the Google Cloud Pub/Sub topic list, as pictured below.
After you identify the Pub/Sub topic you wish to publish to, you must grant LaunchDarkly's Google Cloud Service Account publish access to that topic.
To grant publish access:
- In your Google Cloud Console, navigate to the Pub/Sub topic list.
- Select a topic by clicking the checkboxes to the left of each topic name. Once you choose a topic, Permissions options appear.
- Paste LaunchDarkly’s Service Account email:
email@example.com the Add Members field.
- Click the Select a Role dropdown and choose "Pub/Sub Publisher".
- Click Add.
If you configured your account correctly, our Service Account email appears as a Pub/Sub Publisher, as pictured below.
The final step is to connect your topic to LaunchDarkly.
- Log into LaunchDarkly.
- Click into the Integrations page.
- Click on the Google Cloud Pub/Sub icon or, if this is not your first destination, click the Add Destination drop down.
- Enter a Name for the destination.
- Choose an Environment from the drop-down list.
- Enter the Topic ID.
- Enter the Project ID.
- Click Save Destination.
After you've saved the destination, send a test event to confirm that the destination is configured properly.
- In the Send a test event section, click Send Event.
- If you have configured the destination correctly, an event is logged in the Google Cloud Pub/Sub destination.
After you create a data export destination, you must start sending flag or environment event data to it. You can enable data export for individual flags, or for all the flags in an environment.
To learn more about exporting event data from flags and environments, read Exporting event data for flags and environments.
You can delete a data export destination from the Integrations screen.
To delete a destination:
- Navigate to the Integrations screen.
- Find the destination you wish to delete and click Edit. The "Create a destination" screen opens.
- Click Delete Destination.