File tree 3 files changed +32
-1
lines changed
3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -105,3 +105,24 @@ def user_configuration():
105
105
"default_selected_modules" : "all" , # or select one or multiple (e.g. ftp/strong_password,ssh/strong_password)
106
106
"default_excluded_modules" : None # or any module name separated with comma
107
107
}
108
+
109
+
110
+ def sentry_configuration () -> dict :
111
+ """
112
+ sentry configuration
113
+
114
+ Returns:
115
+ JSON/Dict sentry configuration
116
+ """
117
+ return {
118
+ "sentry_monitoring" : False ,
119
+ # Enter your Sentry Project URL here.
120
+ "sentry_dsn_url" : "" ,
121
+ # Enter Trace Rate Here.
122
+ "sentry_trace_rate" : 1
123
+ # Set sentry_trace_rate to 1.0 to capture 100%
124
+ # of transactions for performance monitoring.
125
+ # sentry_trace_rate is ratio of errors being
126
+ # reported to the number of issues which arise.
127
+
128
+ }
Original file line number Diff line number Diff line change 2
2
# -*- coding: utf-8 -*-
3
3
4
4
import sys
5
+
6
+ from config import sentry_configuration
5
7
from core .load import load_honeypot_engine
8
+ import sentry_sdk
6
9
7
10
if __name__ == "__main__" :
11
+ config = sentry_configuration ()
12
+ if config ["sentry_monitoring" ]:
13
+ sentry_sdk .init (
14
+ dsn = config ["sentry_dsn_url" ],
15
+ traces_sample_rate = config ["sentry_trace_rate" ],
16
+ )
8
17
sys .exit (0 if load_honeypot_engine () is True else 1 )
Original file line number Diff line number Diff line change @@ -9,4 +9,5 @@ oschmod==0.3.12
9
9
argparse == 1.4.0
10
10
PyYAML == 5.4.1 # library_name=yaml
11
11
flask-swagger == 0.2.14 # library_name=flask_swagger
12
- flask-swagger-ui == 3.36.0 # library_name=flask_swagger_ui
12
+ flask-swagger-ui == 3.36.0 # library_name=flask_swagger_ui
13
+ sentry-sdk == 1.6.0 # library_name=sentry_sdk
You can’t perform that action at this time.
0 commit comments