Description: Webhook for Sentry which allows sending notification via Telegram messenger.
- Nodejs 18+ (recommend: 20+)
$ npm install
Name | Is Require | Type | Note | Value |
---|---|---|---|---|
LANGUAGE | Yes | string | The language of message when send | vi,en |
TELEGRAM_BOT_TOKEN | Yes | string | The token from @BotFather telegram check HERE for see how to get this. | |
TELEGRAM_GROUP_ID | Yes | number | The id of your telegram group. You can use telegram API for check that through Postman. Check HERE for more detail. Normally, that start with -100... | |
TELEGRAM_TOPIC_ID | No | number | The id of you topic if you enable Topics in group setting. | |
SENTRY_INTEGRATION_TOKEN | Yes | string | The token that geneate by sentry. Check HERE for more detail. | |
SENTRY_ORGANIZATION_SLUG | Yes | string | The organization slug in your sentry organization setting |
- After you create the new integration then you need config some part like below image
Note: <your-server-here.domain>
is your webhooks server. If you are running locally. You can use Ngrok for generate this.
- And permission, that allow you trigger to you webhook.
-
Clone
.env.template
filecp .env.template .env
-
Edit
.env
file with your value.LANGUAGE=en TELEGRAM_BOT_TOKEN=<get from bot father> TELEGRAM_GROUP_ID=<your telegram group id or telegram channel id> TELEGRAM_TOPIC_ID=<not require - your telegram topic (when enable Topics in group setting)> SENTRY_INTEGRATION_TOKEN=<token in Custom Integrations in Sentry Setting> SENTRY_ORGANIZATION_SLUG=<your Sentry org slug>
-
Run with npm
# development $ npm run start # watch mode $ npm run start:dev # production mode $ npm run start:prod
Note: You don't need run npm install
and setup nodejs.
- Run direct from docker hub: (don't need clone the repository)
-
create the compose file with below information. More details HERE.
services: app: image: tuanngocptn/sentry-telegram-webhook:latest environment: - LANGUAGE=en - TELEGRAM_BOT_TOKEN=<get from bot father> - TELEGRAM_GROUP_ID=<your telegram group id or telegram channel id> - TELEGRAM_TOPIC_ID=<not require - your telegram topic (when enable Topics in group setting)> - SENTRY_INTEGRATION_TOKEN=<token in Custom Integrations in Sentry Setting> - SENTRY_ORGANIZATION_SLUG=<your Sentry org slug> ports: - 3000:3000 volumes: - ./logs:/code/logs
- For running locally (debug):
-
Clone
docker-compose-template.yml
cp docker-compose-template.yml docker-compose.yml
-
Edit environment variables:
environment: - LANGUAGE=en - TELEGRAM_BOT_TOKEN=<get from bot father> - TELEGRAM_GROUP_ID=<your telegram group id or telegram channel id> - TELEGRAM_TOPIC_ID=<not require - your telegram topic (when enable Topics in group setting)> - SENTRY_INTEGRATION_TOKEN=<token in Custom Integrations in Sentry Setting> - SENTRY_ORGANIZATION_SLUG=<your Sentry org slug>
-
Run with docker:
docker compose up
- For running production (release):
-
Clone
docker-compose-prod-template.yml
cp docker-compose-prod-template.yml docker-compose.yml
-
Edit environment variables:
environment: - LANGUAGE=en - TELEGRAM_BOT_TOKEN=<get from bot father> - TELEGRAM_GROUP_ID=<your telegram group id or telegram channel id> - TELEGRAM_TOPIC_ID=<not require - your telegram topic (when enable Topics in group setting)> - SENTRY_INTEGRATION_TOKEN=<token in Custom Integrations in Sentry Setting> - SENTRY_ORGANIZATION_SLUG=<your Sentry org slug>
-
Run with docker:
docker compose up
Nest is MIT licensed.