Open mattrobenolt opened 9 years ago
Not 100% sure how we'd want to do this, but ideally this logrus_sentry.NewSentryHook(YOUR_DSN, ...)
installation too since the default client inside raven-go
should already exist and we'd leverage that instead.
I'd envision something like:
raven.SetDSN("...")
log := logrus.New()
hook := raven_logrus.NewHook([]logrus.Level{
logrus.PanicLevel,
logrus.FatalLevel,
logrus.ErrorLevel,
})
log.Hooks.Add(hook)
@mattrobenolt Sounds good! If you officially supports sentry library for logrus, it's more stable and be awared by gophers.
@gigaroby @awonak @miloconway any thoughts?
@miloconway If you're re-creating the PR in Sirupsen/logrus, I'll wait for it. or if you need more time, I gonna move this repository before your PR.
/cc @Sirupsen FYI
@evalphobia I'll recreate the diff.
@evalphobia no problem :)
@miloconway @gigaroby Thanks guys.
@mattrobenolt When you ready, tell me that? After that, we have to do...
@evalphobia @mattrobenolt
Would love seeing this happen. If needed, I could help working on that on my fork of raven-go
and create PR for you to merge it.
Just curious if there was there any progress on this? I don't see any mention of logrus in the raven-go
repository.
There has not. I'm still open to inclusion here. :) Just need someone to submit a PR.
@mattrobenolt I opened a basic PR in the raven-go repo. It's referenced above.
Awesome, I will get to look at that this week. A bit busy at the moment. :) Thanks! <3
I would be opposed to this btw. I am using this to send to sentry, but not using any other sentry-specific code in my app. I appreciate that this package is small and lightweight, and prefer it being separate.
@captncraig how would this change affect that? Just curious. This package directly depends on raven-go
already. There's no way you could use this without that dependency. Merging these repositories would just mean they're under the same roof instead of two dependencies.
You are right. I feel silly having said that now, since of course this already depends on raven-go. Sorry I chimed in.
hey guys, any updates on this?
and we enter into 2018
still WIP I suppose
Hey @evalphobia thanks for doing this!
Would you be opposed to moving this into raven-go? We have some other framework support, like Gin, that we're likely going to be moving into raven-go as well.
That way you'd do something like:
Then we'd get documentation going over at https://docs.getsentry.com/hosted/clients/go/integrations/
Thoughts?