mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-01-23 11:14:48 +02:00
Merge branch 'master' into version/3
This commit is contained in:
commit
3d2831508c
@ -300,7 +300,7 @@ type config struct {
|
|||||||
SentryDSN string
|
SentryDSN string
|
||||||
SentryEnvironment string
|
SentryEnvironment string
|
||||||
SentryRelease string
|
SentryRelease string
|
||||||
AirbrakeProjecId int
|
AirbrakeProjecID int
|
||||||
AirbrakeProjecKey string
|
AirbrakeProjecKey string
|
||||||
AirbrakeEnv string
|
AirbrakeEnv string
|
||||||
|
|
||||||
@ -479,7 +479,7 @@ func configure() error {
|
|||||||
strEnvConfig(&conf.SentryDSN, "IMGPROXY_SENTRY_DSN")
|
strEnvConfig(&conf.SentryDSN, "IMGPROXY_SENTRY_DSN")
|
||||||
strEnvConfig(&conf.SentryEnvironment, "IMGPROXY_SENTRY_ENVIRONMENT")
|
strEnvConfig(&conf.SentryEnvironment, "IMGPROXY_SENTRY_ENVIRONMENT")
|
||||||
strEnvConfig(&conf.SentryRelease, "IMGPROXY_SENTRY_RELEASE")
|
strEnvConfig(&conf.SentryRelease, "IMGPROXY_SENTRY_RELEASE")
|
||||||
intEnvConfig(&conf.AirbrakeProjecId, "IMGPROXY_AIRBRAKE_PROJECT_ID")
|
intEnvConfig(&conf.AirbrakeProjecID, "IMGPROXY_AIRBRAKE_PROJECT_ID")
|
||||||
strEnvConfig(&conf.AirbrakeProjecKey, "IMGPROXY_AIRBRAKE_PROJECT_KEY")
|
strEnvConfig(&conf.AirbrakeProjecKey, "IMGPROXY_AIRBRAKE_PROJECT_KEY")
|
||||||
strEnvConfig(&conf.AirbrakeEnv, "IMGPROXY_AIRBRAKE_ENVIRONMENT")
|
strEnvConfig(&conf.AirbrakeEnv, "IMGPROXY_AIRBRAKE_ENVIRONMENT")
|
||||||
boolEnvConfig(&conf.ReportDownloadingErrors, "IMGPROXY_REPORT_DOWNLOADING_ERRORS")
|
boolEnvConfig(&conf.ReportDownloadingErrors, "IMGPROXY_REPORT_DOWNLOADING_ERRORS")
|
||||||
|
@ -51,7 +51,7 @@ func initErrorsReporting() {
|
|||||||
|
|
||||||
if len(conf.AirbrakeProjecKey) > 0 {
|
if len(conf.AirbrakeProjecKey) > 0 {
|
||||||
airbrake = gobrake.NewNotifierWithOptions(&gobrake.NotifierOptions{
|
airbrake = gobrake.NewNotifierWithOptions(&gobrake.NotifierOptions{
|
||||||
ProjectId: int64(conf.AirbrakeProjecId),
|
ProjectId: int64(conf.AirbrakeProjecID),
|
||||||
ProjectKey: conf.AirbrakeProjecKey,
|
ProjectKey: conf.AirbrakeProjecKey,
|
||||||
Environment: conf.AirbrakeEnv,
|
Environment: conf.AirbrakeEnv,
|
||||||
})
|
})
|
||||||
@ -61,7 +61,9 @@ func initErrorsReporting() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func closeErrorsReporting() {
|
func closeErrorsReporting() {
|
||||||
airbrake.Close()
|
if airbrake != nil {
|
||||||
|
airbrake.Close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func reportError(err error, req *http.Request) {
|
func reportError(err error, req *http.Request) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user