A small application built in TypeScript for integrating Sentry with Mattermost. This adapter reformats Sentry event messages to be compatible with Mattermost webhooks, enabling smooth, automated notifications and updates from Sentry to your Mattermost chats.
- Problem Statement
- Solution Overview
- Technologies Used
- Installation
- Usage
- Development
- Production Deployment
- Logging
- Contributing
- License
- Sentry does not provide direct integration with Mattermost.
- Mattermost webhooks do not support the payload format sent by Sentry.
This adapter serves as an intermediary service to solve the above issues:
- The adapter receives an event from Sentry.
- It converts the message to a format compatible with Mattermost.
- It sends the formatted message to a specified Mattermost channel using a webhook.
- TypeScript
- Express
- Winston
- Axios
To get started, clone the repository and install dependencies.
git clone https://github.com/your-username/adapter-mattermost-sentry.git
cd adapter-mattermost-sentry
npm install
- Set up environment variables by creating a
.env
file in the root directory:PORT=4045 URL_WEBHOOK=https://mattermost.example.com/hooks/your-webhook-url
- Adjust
PORT
andURL_WEBHOOK
as necessary.
For local development:
npm run dev
This will start the server using nodemon
on the specified port in ./src/app.ts
.
- Install
pm2
globally for process management:npm install pm2 -g
- Start the application in production mode:
npm run start
To view running processes managed by pm2
:
pm2 list
Logs are stored in the ./logs
directory after the application starts.
all.log
- Contains all log messages.error.log
- Contains only error messages.
We welcome contributions! Here’s how you can help:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Make your changes and commit them with descriptive messages.
- Push to your branch:
git push origin feature-name
- Open a pull request and describe your changes.
Please ensure your code follows existing patterns and includes necessary tests.
This project is licensed under the MIT License. See the LICENSE file for details.