Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(810)

Unified Diff: appengine/tsmon/middleware.go

Issue 2795613002: Make global callbacks usable outside appengine. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | common/tsmon/context.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/tsmon/middleware.go
diff --git a/appengine/tsmon/middleware.go b/appengine/tsmon/middleware.go
index c468002dfd6c18a71680d2f6b18abdad2a349be7..823699ebca28c1e8ca737fce0b8ce26720fa3148 100644
--- a/appengine/tsmon/middleware.go
+++ b/appengine/tsmon/middleware.go
@@ -144,6 +144,7 @@ func (s *State) checkSettings(c context.Context) (*tsmon.State, *tsmonSettings)
if s.state == nil {
s.state = state
s.state.M = monitor.NewNilMonitor() // doFlush uses its own monitor
+ s.state.InvokeGlobalCallbacksOnFlush = false
} else if state != s.state {
panic("tsmon state in the context was unexpectedly changed between requests")
}
@@ -341,6 +342,5 @@ func (s *State) doFlush(c context.Context, state *tsmon.State, settings *tsmonSe
return err
}
- state.ResetGlobalCallbackMetrics(c)
return nil
}
« no previous file with comments | « no previous file | common/tsmon/context.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698