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.
This topic explains how to create a Google Cloud Pub/Sub destination.
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 picking the topic, you can find the projectId and topicId.
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:
firstname.lastname@example.org 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.
Verify you see the LaunchDarkly Service account email as a Pub/Sub Publisher.
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.
Click on the Google Cloud Pub/Sub card or 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.
topicId as noted from Google Cloud. Choose an appropriate name and environment.
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.
Send a test event to your topic