Make sure you have installed Serverless framework and configured the AWS CLI tool. To post to Slack, we would just need a simple incoming web hook. Example: How to retrieve an entry in FaunaDB Slack This key will be used to authenticate our function to FaunaDB servers. This will automatically delete instances older than the TTL value.įinally, you will need to create a server key for the questions class. If you are concerned about your database usage, you can add TTL to the questions class. This will let us query the questions class by the Stack Overflow id. We will also add an index questions_by_id on terms data and question_id. Example: How to create an entry in FaunaDBįor this app, you will need a database, with a questions class. But it comes with more features, which makes it easier for example to query the database. If you are familiar with Firebase, you will recognize a similar data structure and routes to access resources. Capacity is metered and available on demand, so you only pay for what you use. FaunaDB is a globally distributed database that doesn’t require any provisioning. They present themselves as the first serverless database engine. I discovered FaunaDB a few months ago at Gluecon. If a Stack Overflow question is not in our database, we add it to the database and send details to Slack. We will store the questions in a database to keep track of the ones we already sent to Slack and avoid duplicates. We will use the Schedule Events feature offered natively by Lambda, it’s a similar behavior as a cron job. Our function will regularly call this endpoint to check if there are new questions posted. You should create a key to access Stack Exchange API here. In the example, we will search in all attributes. You can look for a term in tags, in the title, in the body of the question or all at the same time. Stack Exchange API has an endpoint to search for questions. Slack to be notified when a new question is asked The logic⚙️ Serverless Framework to simplify deployments AWS Lambda to host the logic of our app To fit in 2017 trend, we will only use serverless technologies, which will make this tool free to use: I want to share this project, so you too can monitor Stack Overflow directly in Slack. The support team can jump on it and answer quickly. It monitors questions about 3scale and posts them on our #support Slack channel. I recently rewrote it using serverless technologies. To be more reactive, I hacked together something for our team at 3scale a long time ago. It covers more than Stack Overflow, but it’s not instantaneous. This might not cover all the questions posted about your API. In my experience, you can only receive notifications when there are new questions on a particular tag. What happens when someone is posting a question there? You are hijacking a community for your own needs instead of contributing to it. I would not encourage companies to redirect all their support questions there or pushing for their brand tags, this is just bad. If you don’t have a forum for your product, developers may end up asking questions directly on Stack Overflow. Others could say that Stack Overflow questions give a good sense of an API popularity. And Ash Hathaway shares her thoughts here. One could argue that GitHub ⭐️’s on repositories are great. By Nicolas Grenié How to Monitor Stack Overflow Activity in Slack Powered by a complete serverless stack Group of Developer Advocates watching developers coding - Credits: Pixabayĭeveloper Advocates or Evangelists are often asked how they measure success.
0 Comments
Leave a Reply. |