Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Google App Engine Logging Not Working even with Urlfetch Changes #217

Open
amaendeepm opened this issue Nov 8, 2018 · 0 comments
Open

Comments

@amaendeepm
Copy link

I am providing you all the code here and what we see in log ( upon calling raven), and STILL NO sentry log via App Engine route

We are using "logRaven" as method to do logging in sentry now, and code is below which involves riding on urlfetch transport of App Engine on every logging request along with its DSN (in code below):

_func NewRavenClientForAppEngine(req *http.Request) (*raven.Client, error) {

ctx := appengine.NewContext(req)

client, err := raven.New(os.Getenv("https://fce0cb3a46ad473bbd81a3e4e1ed32c8:[email protected]/1299892"))

log.Debugf(ctx, "New_Raven: %v %v", client, err)

if err != nil {
return nil, err
}

client.Transport = &raven.HTTPTransport{
Client: urlfetch.Client(ctx),
}

return client, nil
}

// -----

func logRaven(req *http.Request, err error) {
ctx := appengine.NewContext(req)
ravenClient, er1 := NewRavenClientForAppEngine(req)

log.Debugf(ctx, "Log_Raven: %v %v", ravenClient, er1)

if ravenClient != nil {
ravenClient.CaptureErrorAndWait(err, nil)
}
}_

And our error block in integration code make the call as:

logRaven(req, fmt.Errorf("Account-not-matched-from-LOA-for-kid %d %s ", kid.Id, kid.BankAccount))

But over all no log in sentry and quite frustrating to see it still not running to log our integration anomaly situations at all

What could be going wrong here ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant