logrus_sentry icon indicating copy to clipboard operation
logrus_sentry copied to clipboard

Move into raven-go?

Open mattrobenolt opened this issue 10 years ago • 17 comments

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:

import "github.com/getsentry/raven-go/logrus"

Then we'd get documentation going over at https://docs.getsentry.com/hosted/clients/go/integrations/

Thoughts?

mattrobenolt avatar Oct 09 '15 16:10 mattrobenolt

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 avatar Oct 09 '15 16:10 mattrobenolt

@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 avatar Oct 10 '15 08:10 evalphobia

@evalphobia I'll recreate the diff.

miloconway avatar Oct 10 '15 13:10 miloconway

@evalphobia no problem :)

gigaroby avatar Oct 12 '15 07:10 gigaroby

@miloconway @gigaroby Thanks guys.

@mattrobenolt When you ready, tell me that? After that, we have to do...

evalphobia avatar Oct 15 '15 04:10 evalphobia

@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.

stkao05 avatar Dec 23 '15 17:12 stkao05

Just curious if there was there any progress on this? I don't see any mention of logrus in the raven-go repository.

mzuneska avatar Aug 08 '16 23:08 mzuneska

There has not. I'm still open to inclusion here. :) Just need someone to submit a PR.

mattrobenolt avatar Aug 09 '16 00:08 mattrobenolt

@mattrobenolt I opened a basic PR in the raven-go repo. It's referenced above.

mzuneska avatar Aug 11 '16 22:08 mzuneska

Awesome, I will get to look at that this week. A bit busy at the moment. :) Thanks! <3

mattrobenolt avatar Aug 11 '16 22:08 mattrobenolt

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 avatar Sep 13 '16 22:09 captncraig

@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.

mattrobenolt avatar Sep 13 '16 22:09 mattrobenolt

You are right. I feel silly having said that now, since of course this already depends on raven-go. Sorry I chimed in.

captncraig avatar Sep 14 '16 00:09 captncraig

hey guys, any updates on this?

ellisonleao avatar Mar 15 '17 19:03 ellisonleao

and we enter into 2018

awartoft avatar Mar 15 '18 00:03 awartoft

WIP https://github.com/getsentry/raven-go/pull/98

evalphobia avatar Mar 20 '18 01:03 evalphobia

still WIP I suppose

marcosox avatar Mar 17 '23 16:03 marcosox