Next is being able to start capturing our metrics. So getting probotic capture are built events is made possible because of the Travis CI integration with the checks API system, like I said before. The checks API system, if we go back to that, that was a little bit back here is made up of two components. The first is check suites, which is going to be a collection of the checks that are in the checks tab for given build. A check suites will contain several check runs. If we click on the check runs, there is a description here of what's available with the check runs and the different states that they'll go through, along with all of the types of data that is going to be available here. So we'll be able to leverage any of this data in our metrics collection system as well. So when Travis triggers a build, because we get a pull request, then when Travis completes the build, it will update to check runs API, and then that will trigger an event that our Probot app will capture, and they will be able to use that event to collect this data and insert it into our Prometheus server, or into our scraper so that our Prometheus server can later on come and scrape that data and collect those metrics. So going back to building on our Probot app, if you don't have that up and running, go back to your user account on GitHub.com, click on your username, go to your repositories, and then find that Probot app. We'll be building on one of the branches, so hopefully you still have the heroku_production branch, which contains a docker file for building your app. Let's make sure that you clone and download that into your GitHub desktop. We should already have that in our GitHub desktop. So if you click on the Probot Hello app and then choose the current branches, the Heroku production branch, and just refresh that branch to make sure that you have the current copy. Then we should be able to base our new branch off of that branch. So let's verify that we have that branch. Now, create a new branch with the current branch and choose new branch, and choose the Heroku production branch. We'll call this branch probot_prom, and choose the create branch button, and so that should give us a new branch, and then choose repositories open an atom. Let's see, could not find file. Okay. Let's look at that real quick. All right. Repositories. All right. I just had a little issue there. We're going to open this up, an atom. So we should have the atom up and running right now, and there should be a docker file in this directory. Also there should be a travis.yaml file, this is the Travis file that we'd be using to build and publish our Probot app. So if we take a quick look at that, we'll see that we have the docker build commands, along with the testing and lent, along with our Heroku publishing steps for deployment. So that when we publish onto the heroku_production branch, we get a new version of this particular Heroku app. So the very first thing we're going to have to do is update our package.json. So let's double-click on that and make sure that we update our package.json. Let's pump the version here so that we can tell we're using a new version of Probot. If we go back to our web browser and we click on the Probot app, so I'm going to just close a couple of windows here and find our Probot app again. Let's click on this. Okay. Here's our Probot app. Okay. We should see that we have version 1.0. Now, we're going to use this client. This is the the Simon prom-client to configure our application. So it's important that we have this particular library installed into our applications, so that's done in the package.json by adding a new dependency to our application so that we can do that by adding that dependency. Let's see if we can find the right place for it. Those are our scripts. These are our dependencies. So we can add it in this section. We'll do it right after Probot. The first one is the client. So let's do prom-client, and I happen to know that the latest version of the client is 11.2.0, and then we're going to need a HTTP router, so we're going to use a library called Express, and make sure that you add Express, otherwise you won't be able to get some routes configured. We'll use version 14.13.3 for that, don't forget your commas at the end, and then let's just save that. Okay. So the other thing we're going to do here is just make sure we're using a fixed version of node. So I'm going to lock in our version of node to be 8.3.0. This will help us avoid some errors that might be generated. Let's just go back to the terminal and CD into this particular web app, 1066 Probot hello. Okay. So we're in the web 1066 Probot hello directory here. So we're going to just run a quick tests, actually an NPM install to make sure that we didn't make any mistakes here. Oh, it looks like I have some mistakes here. Oh yeah, I don't have the NPM client. That's okay. The docker file helps us test that, so we could actually run docker build, and say dot for the current directory, and we'll just do a docker build minus t test to make sure that this build is okay. So that's going to take a second, and it'll run the NPM install for us and give us any errors if there's any errors locally. So I'll pause the video here and let that finish. Okay. We can see the NPM install happening here. So if this throws any errors, we'll go back and modify our package.json to correct any issues. Okay. Our Probot application built successfully. So we know that the changes that we made to the package.json are going to be good. Now, we do use this testing two code Jest, and I discovered a little later on that there was a bug with the Jest configuration that I hadn't accounted for. So if you can just take a minute and update your package.json to include the additional Jest configuration by adding a comma to line 44, and then quoting a key value called Jest, and then we'll make a colon here and add a brace, and so the brace will open up another brace. Then the configuration value is called test environment, and we'll add a colon here and say node. So what this does is it allows our test cases to use node as it's testing tool, so that we don't get errors. When we're working with mocking some of the data, and that we'll do later on.