 Hi, everyone. I'm Kadeshia. And today we'll be looking at how to use the new deployment protection rules feature with GitHub Actions. I have software engineer Bo with me today from Datadog who will be showing us how to use their new GitHub app to add an extra layer of protection to your deployment environments. Bo, take it away. Thanks, Kadeshia. I'm a software engineer at Datadog. And one of the most stressful parts of my job is production deployments. I have messed up many deployments and brought down many a prod. Any additional bit of certainty I can get from my CI CD process is so valuable to me. And to that end, we've made it so that Datadog monitors can now act as a pass or fail gate for GitHub deployment pipelines, which means that unless a Datadog monitor is in an OK state, the deployment pipeline will not execute. So let's get started and go through first how to enable this feature. It's very simple. From the Datadog integrations page, you can search for the GitHub tile. For customers that already have their GitHub app installed with Datadog, you can just select your GitHub app here and make sure there's a green check mark next to the deployment protection rules. If there isn't, not to worry, you can go ahead over to the GitHub UI and under the GitHub app settings for permissions and events, you can go ahead and check the deployment protection rule here. Alternatively, if you want to either create a new GitHub app or you don't have an app already registered with Datadog, you have to click this button here, the Create GitHub app button, and just make sure that the deployment protection rule is checked from the feature list. So for this demo, we will be using an existing GitHub app, the Datadog DD Sandbox app. And this app has access to a single repository, the GitHub Gate Service. And the goal of this demo is to deploy or attempt to deploy the GitHub Gate Service to production and hope that our Datadog monitor protects us from doing so because this is going to be a bad deployment. So first things first, let's go ahead and create a new monitor that will protect us. Any Datadog monitor can be used as a deployment gate. I'm going to be using the Composite Monitor. And I find that the best monitors for production deployments are pre-production monitors because pre-production is the staging ground for production. As you can see, one of my monitors that I made before is an alerting stage that is on purpose and will play a role later. So I'm putting some demo text here, but the very, very important thing to note is the tags of this monitor. The way that Datadog knows that a monitor should be evaluated given a GitHub deployment pipeline is through the monitor tags, and specifically two very important tag key names. The first being git underscore m. For our purposes, it is going to be prod. And the second very important tag key name is git underscore repo, which is a combination of the owner, which for our case is DD Sandbox, the org, forward slash, and then the repo name, which is going to be GitHub Gate Service. So once we hit Create for this monitor, we are hypothetically now protected from executing any bad deployment for production. But let us test that theory. I'm going to go ahead and navigate to my actual repo here. As you can see, the git repo here is DD Sandbox slash GitHub Gate Service. And just to double check the MF, we can go here to Settings. And under Environments, we have a single MF configured called prod with one protection rule. OK, let's go ahead and actually attempt to deploy to prod. I'm going to execute my deploy to prod workflow on the main branch. And we're going to watch it go. OK, so as you can see, our deployment failed because it didn't satisfy other protection rules. And fortunately, we can see exactly what protection rules that was from this comment. If we click this link here, it will actually take us to the monitor that we created just two minutes ago. And as we knew before, we do have elevated 500 type errors from our service. We should not deploy to production until that is resolved. Thank you for watching. We're really excited to see what people use this feature for. Keep in mind that monitors and deployment rules have a many to many relationship. You can have as many monitors as you want configured for a single deployment protection rule. And you can have as many rules as you want all reading from the same monitor. The sky's the limit. Thank you so much. And thank you to the GitHub team for making this so fun to integrate with. Thank you for watching. Thank you so much, Bo, for taking the time to show us how to use the new DataDog GitHub app to add deployment protection rules to our environments. If you have questions about this feature, be sure to check out the GitHub community and leave us your feedback and comments. Be sure to like this video and subscribe to our channel so you don't miss any of our future videos. And until next time, bye.