evalphobia / logrus_sentry

sentry hook for logrus
MIT License
194 stars 78 forks source link

use runtime.Frame instead of program counters after braking change to github.com/pkg/errors #75

Closed arcana261 closed 5 years ago

arcana261 commented 5 years ago

Apparently today, authors of github.com/pkg/errors have decided to pull off a breaking change in which they replace using PC's as type errors.Frame and use runtime.Frame as type errors.Frame. This PR fixes this issue by using runtime.Frames instead of program counters.

See Issue

arcana261 commented 5 years ago

@evalphobia errr my CI fails due to some thing irrelevant to my change made. Apparently we had to skip one more level of stacktrace.

I think it's related to this!

https://github.com/sirupsen/logrus/pull/863

Why everyone has to do breaking changes.. stop this already :'(

arcana261 commented 5 years ago

I've added another commit :'( Since we have breaking change in 2 libraries I think we won't be able to make it through using 2 sperate PR's :'(

arcana261 commented 5 years ago

Just as clarification.. apparently this:

func (logger *Logger) Error(args ...interface{}) {
    if logger.IsLevelEnabled(ErrorLevel) {
        entry := logger.newEntry()
        entry.Error(args...)
        logger.releaseEntry(entry)
    }
}

was changes to this..

func (logger *Logger) Error(args ...interface{}) {
    logger.Log(ErrorLevel, args...)
}

which means we had to increase our Skip config! duh!

evalphobia commented 5 years ago

Thank you! 🌱

Nite: https://github.com/evalphobia/logrus_sentry/releases/tag/v0.7.0