I have installed sentry on-premise using docker in a ec2 server,
Then I have another ec2 server which has the basic flask application from sentry get started
In project for dsn it showing some ip,i guess its public ip of instance.
Is my understanding right?
import sentry_sdk from flask import Flask from sentry_sdk.integrations.flask import FlaskIntegration sentry_sdk.init( dsn="http://token@public-ip:9000/2", integrations=[FlaskIntegration()], # Set traces_sample_rate to 1.0 to capture 100% # of transactions for performance monitoring. # We recommend adjusting this value in production. traces_sample_rate=1.0 ) app = Flask(__name__) @app.route('/debug-sentry') def trigger_error(): division_by_zero = 1 / 0
If i run flask run and do a curl request to /debug-sentry from other terminal,I am getting the entry in which flask is running
127.0.0.1 - - [18/May/2021 04:44:25] “GET /debug-sentry HTTP/1.1” 500 -
If i stop the flask app
Sentry is attempting to send N pending error messages Waiting up to 2 seconds Press Ctrl-C to quit
But if I check the sentry project means it is not showing the log
Note: Sentry instance have security groups open for port 9000