File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -7,20 +7,28 @@ import (
7
7
)
8
8
9
9
type BugSnagConfig struct {
10
- Environment string
11
- APIKey string `envconfig:"api_key"`
12
- LogHook bool `envconfig:"log_hook"`
10
+ Environment string
11
+ APIKey string `envconfig:"api_key"`
12
+ LogHook bool `envconfig:"log_hook"`
13
+ ProjectPackage string `envconfig:"project_package"`
13
14
}
14
15
15
16
func SetupBugSnag (config * BugSnagConfig , version string ) error {
16
17
if config == nil || config .APIKey == "" {
17
18
return nil
18
19
}
20
+
21
+ projectPackages := make ([]string , 0 , 2 )
22
+ projectPackages = append (projectPackages , "main" )
23
+ if config .ProjectPackage != "" {
24
+ projectPackages = append (projectPackages , config .ProjectPackage )
25
+ }
19
26
20
27
bugsnag .Configure (bugsnag.Configuration {
21
28
APIKey : config .APIKey ,
22
29
ReleaseStage : config .Environment ,
23
30
AppVersion : version ,
31
+ ProjectPackages : projectPackages ,
24
32
PanicHandler : func () {}, // this is to disable panic handling. The lib was forking and restarting the process (causing races)
25
33
})
26
34
You can’t perform that action at this time.
0 commit comments