Google Cloud Pub/Sub
Read time: 2 minutes
Last edited: Oct 26, 2021
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.
Verify you see the LaunchDarkly Service account email as a Pub/Sub Publisher. If you configured your account correctly, LaunchDarkly's Service Account email appears as a Pub/Sub Publisher.
Here is an image of the Pub/Sub topic list:
The final step is to connect your topic to LaunchDarkly. To do this:
- Log into LaunchDarkly.
- Navigate to the Integrations page and find the Google Cloud Pub/Sub card.
- Click + Integration. The integration screen appears.
- (Optional) Enter a Name for the destination.
- Choose an environment from the Environment 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.
- From the Integrations page, click the edit button on the GoogleCloud Sub/Pub card. The Edit destination screen appears.
- 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: