this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add bugsnag

+27
+4
go.mod
··· 12 12 13 13 require ( 14 14 github.com/beorn7/perks v1.0.1 // indirect 15 + github.com/bugsnag/bugsnag-go/v2 v2.5.1 // indirect 16 + github.com/bugsnag/panicwrap v1.3.4 // indirect 15 17 github.com/carlmjohnson/versioninfo v0.22.5 // indirect 16 18 github.com/cespare/xxhash/v2 v2.3.0 // indirect 17 19 github.com/felixge/httpsnoop v1.0.4 // indirect ··· 37 39 github.com/ipfs/go-log/v2 v2.5.1 // indirect 38 40 github.com/ipfs/go-metrics-interface v0.0.1 // indirect 39 41 github.com/jbenet/goprocess v0.1.4 // indirect 42 + github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect 40 43 github.com/klauspost/compress v1.17.9 // indirect 41 44 github.com/klauspost/cpuid/v2 v2.2.7 // indirect 42 45 github.com/mattn/go-isatty v0.0.20 // indirect ··· 48 51 github.com/multiformats/go-multihash v0.2.3 // indirect 49 52 github.com/multiformats/go-varint v0.0.7 // indirect 50 53 github.com/opentracing/opentracing-go v1.2.0 // indirect 54 + github.com/pkg/errors v0.9.1 // indirect 51 55 github.com/polydawn/refmt v0.89.1-0.20221221234430-40501e09de1f // indirect 52 56 github.com/prometheus/client_golang v1.19.1 // indirect 53 57 github.com/prometheus/client_model v0.6.1 // indirect
+9
go.sum
··· 4 4 github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= 5 5 github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= 6 6 github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= 7 + github.com/bitly/go-simplejson v0.5.1/go.mod h1:YOPVLzCfwK14b4Sff3oP1AmGhI9T9Vsg84etUnlyp+Q= 7 8 github.com/bluesky-social/indigo v0.0.0-20241031232035-1a73c3fb6841 h1:HCj4iBoAV59Fn1vsEhbeEMOExR4vOrUgz+sxUoV+F6s= 8 9 github.com/bluesky-social/indigo v0.0.0-20241031232035-1a73c3fb6841/go.mod h1:Zx9nSWgd/FxMenkJW07VKnzspxpHBdPrPmS+Fspl2I0= 9 10 github.com/bluesky-social/jetstream v0.0.0-20241031234625-0ab10bd041fe h1:jduuyDfsiwWrPiN7psqDehepl68uxQ4UYCIgoqb1D4o= 10 11 github.com/bluesky-social/jetstream v0.0.0-20241031234625-0ab10bd041fe/go.mod h1:WiYEeyJSdUwqoaZ71KJSpTblemUCpwJfh5oVXplK6T4= 12 + github.com/bugsnag/bugsnag-go/v2 v2.5.1 h1:cGsEJHcis1zfQ4KoFaBPIT4N1TYqVNRALKr2wMRZ4hs= 13 + github.com/bugsnag/bugsnag-go/v2 v2.5.1/go.mod h1:S9njhE7l6XCiKycOZ2zp0x1zoEE5nL3HjROCSsKc/3c= 14 + github.com/bugsnag/panicwrap v1.3.4 h1:A6sXFtDGsgU/4BLf5JT0o5uYg3EeKgGx3Sfs+/uk3pU= 15 + github.com/bugsnag/panicwrap v1.3.4/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= 11 16 github.com/carlmjohnson/versioninfo v0.22.5 h1:O00sjOLUAFxYQjlN/bzYTuZiS0y6fWDQjMRvwtKgwwc= 12 17 github.com/carlmjohnson/versioninfo v0.22.5/go.mod h1:QT9mph3wcVfISUKd0i9sZfVrPviHuSF+cUtLjm2WSf8= 13 18 github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= ··· 81 86 github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= 82 87 github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= 83 88 github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 89 + github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= 90 + github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= 84 91 github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 85 92 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 86 93 github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= ··· 114 121 github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= 115 122 github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= 116 123 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 124 + github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 125 + github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 117 126 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 118 127 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 119 128 github.com/polydawn/refmt v0.89.1-0.20221221234430-40501e09de1f h1:VXTQfuJj9vKR4TCkEuWIckKvdHFeJH/huIFJ9/cXOB0=
+14
main.go
··· 3 3 import ( 4 4 "context" 5 5 "errors" 6 + "fmt" 6 7 "log/slog" 7 8 "os" 8 9 "os/signal" 9 10 "syscall" 10 11 11 12 "github.com/avast/retry-go/v4" 13 + "github.com/bugsnag/bugsnag-go/v2" 12 14 ) 13 15 14 16 const ( ··· 20 22 signal.Notify(signals, syscall.SIGTERM, syscall.SIGINT) 21 23 ctx, cancel := context.WithCancel(context.Background()) 22 24 defer cancel() 25 + 26 + bugsnagAPIKey := os.Getenv("BUGSNAG_API_KEY") 27 + if bugsnagAPIKey != "" { 28 + bugsnag.Configure(bugsnag.Configuration{ 29 + APIKey: bugsnagAPIKey, 30 + ReleaseStage: "production", 31 + // The import paths for the Go packages containing your source files 32 + ProjectPackages: []string{"main", "github.com/willdot/bskyfeedgen"}, 33 + // more configuration options 34 + }) 35 + } 23 36 24 37 feeder := NewFeedGenerator() 25 38 ··· 58 71 if errors.Is(err, context.Canceled) { 59 72 return nil 60 73 } 74 + bugsnag.Notify(fmt.Errorf("consume loop: %w", err)) 61 75 slog.Error("consume loop", "error", err) 62 76 return err 63 77 }