Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ When deploying to DigitalOcean, you will need to configure the following environ
| `SMTP_USERNAME` | `Secret` | No | The username for your SMTP server. |
| `SMTP_PASSWORD` | `Secret` | No | The password for your SMTP server. |
| `SMTP_FROM_EMAIL` | `String` | No | The email address to send emails from. |
| `NEW_RELIC_KEY` | `Secret` | No | Your New Relic license key for application monitoring. |
| `NEW_RELIC_NAME` | `String` | No | The name of your application in New Relic. |
| `SENTRY_URL` | `Secret` | No | The DSN for Sentry error tracking. |

---
Expand Down
6 changes: 0 additions & 6 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ func init() {
api.ENV = v
deps.ENV = v
}
if v, exists := os.LookupEnv("NEW_RELIC_KEY"); exists {
api.NewRelicKey = v
}
if v, exists := os.LookupEnv("NEW_RELIC_NAME"); exists {
api.NewRelicName = v
}
if v, exists := os.LookupEnv("MONGO_URL"); exists {
deps.MongoURL = v
}
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ require (
github.com/markbates/goth v1.53.0
github.com/matcornic/hermes/v2 v2.0.2
github.com/mikespook/gorbac v2.1.0+incompatible
github.com/newrelic/go-agent v2.11.0+incompatible
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/olebedev/config v0.0.0-20190528211619-364964f3a8e4
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0=
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/mrjones/oauth v0.0.0-20180629183705-f4e24b6d100c/go.mod h1:skjdDftzkFALcuGzYSklqYd8gvat6F1gZJ4YPVbkZpM=
github.com/newrelic/go-agent v2.11.0+incompatible h1:LTIMkaiTqAE9HoWiBZt4TPI0AYA+GmjqYTO9cEHQios=
github.com/newrelic/go-agent v2.11.0+incompatible/go.mod h1:a8Fv1b/fYhFSReoTU6HDkTYIMZeSVNffmoS726Y0LzQ=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
Expand Down
14 changes: 0 additions & 14 deletions modules/api/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
"github.com/facebookgo/inject"
"github.com/gin-gonic/contrib/sessions"
"github.com/gin-gonic/gin"
newrelic "github.com/newrelic/go-agent"
"github.com/newrelic/go-agent/_integrations/nrgin/v1"
"github.com/op/go-logging"
handle "github.com/tryanzu/core/board/legacy"
"github.com/tryanzu/core/board/realtime"
Expand All @@ -27,8 +25,6 @@ var (
DEBUG bool = true
ENV string = "dev"
TemplatesGlob string = "./static/templates/**/*"
NewRelicKey string
NewRelicName string = "anzu"
log = logging.MustGetLogger("http-api")
)

Expand Down Expand Up @@ -58,16 +54,6 @@ func (module *Module) Run(bindTo string) {
router.Use(gin.Recovery())
router.LoadHTMLGlob(TemplatesGlob)

if len(NewRelicKey) > 0 {
cfg := newrelic.NewConfig(NewRelicName, NewRelicKey)
cfg.Logger = newrelic.NewLogger(os.Stdout)
app, err := newrelic.NewApplication(cfg)
if err != nil {
log.Errorf("error while initializing new relic err=%v", err)
} else {
router.Use(nrgin.Middleware(app))
}
}

// Middlewares setup
router.Use(sessions.Sessions("session", store))
Expand Down
Loading