Skip to content

fealone/sentry-alert-to-slack-with-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sentry-alert-to-slack-with-functions

Deploy for GCP

poetry export -f requirements.txt > requirements.txt
gcloud functions deploy sentry-alert-to-slack-with-functions \
    --runtime python37 \
    --trigger-http \
    --entry-point entry_point \
    --region {region} \
    --set-env-vars SLACK_ENDPOINT={SLACK_WEBHOOK_ENDPOINT} \
    --set-env-vars PLATFORM=GCP

Deploy for AWS

  • Packaging
poetry export -f requirements.txt > requirements.txt
mkdir dist \
    && cp main.py dist/ \
    && pip install -r requirements.txt -t dist/ \
    && cd dist \
    && zip -r ../dist.zip * \
    && cd ../ \
    && rm -rf dist
  • Deploy
aws lambda create-function \
    --function-name sentry-alert-to-slack-with-functions \
    --runtime python3.7 \
    --role {LambdaExecuteRole} \
    --handler main.entry_point \
    --zip-file fileb://dist.zip \
    --environment "Variables={SLACK_ENDPOINT={SLACK_WEBHOOK_ENDPOINT},PLATFORM=AWS}"
  • Configure API Gateway
    • Supported REST API only

Example alert

An error occurred, for details from the issue below url.
https://sentry.io/organizations/{project_name}/issues/{id}/?referrer=webhooks_plugin

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages