getsentry / raven-go

Sentry client in Go
https://sentry.io
BSD 3-Clause "New" or "Revised" License
561 stars 148 forks source link

Go client causes regression email to contain stale message field in subject line #87

Open boboli opened 8 years ago

boboli commented 8 years ago

Summary

I've run into this strange issue where the notification email for a regression shows a stale message field in the email subject. I've tried doing the exact same thing using raven-python, and it does not exhibit this behavior (of having a lagged/stale message in the regression email).

I'm not entirely sure if this is an issue with the go raven client or the Sentry server, since email should be completely handled by the server, but the Python raven client doesn't exhibit this problem...

Code:

package main
​
import (
    "fmt"
    "math/rand"
    "time"
​
    "github.com/getsentry/raven-go"
)
​
func main() {
    sentryDSN := "<some sentry DSN here>"
    err := raven.SetDSN(sentryDSN)
    if err != nil {
        fmt.Printf("Could not initialize sentry at dsn %v: %v\n",
            sentryDSN, err)
        return
    }
​
    rand.Seed(time.Now().Unix())
    i := rand.Intn(10000)
    fmt.Printf("i= %v\n", i)
    raven.CaptureError(fmt.Errorf("i = %v", i), nil)
}

Repro steps:

  1. Run above go code. Say that the code randomly picked i = 123.
  2. See that issue shows up in Sentry. See that email notification subject line says "i = 123".
  3. Resolve issue in Sentry. Wait until after the notification digest period, say 5 min.
  4. Run above go code again. Say that this time the code picked i = 987.
  5. See the regression email notification subject line say "i = 123", which was the old message value.
  6. Also see that the Sentry web dashboard also says "i = 123" for a while.
  7. Wait a little, and then the Sentry web dashboard updates to correctly say "i = 987".

    Versions

raven-go: dffeb57 go: go1.6.2 darwin/amd64 sentry: self-hosted install on version 8.5.1.