veyron/runtimes/google/vtrace: Add capturing via regexps to vtrace.
This CL makes VTrace easier to use.
- Add a flag that specifies a regexp pattern so you can select
traces by span name or annotation.
- Turn dump_on_shutdown on by default.
Now you can run vtrace with just:
--veyron.vtrace.collect_regexp=.*
Change-Id: I9b3692aa9871e466aa3f5c0fbeaa4719e843d9e1
diff --git a/runtimes/google/ipc/full_test.go b/runtimes/google/ipc/full_test.go
index cbb9a69..55d4bcb 100644
--- a/runtimes/google/ipc/full_test.go
+++ b/runtimes/google/ipc/full_test.go
@@ -89,7 +89,10 @@
func testContextWithoutDeadline() *context.T {
var ctx *context.T
- ctx = ivtrace.Init(ctx, flags.VtraceFlags{})
+ ctx, err := ivtrace.Init(ctx, flags.VtraceFlags{})
+ if err != nil {
+ panic(err)
+ }
ctx, _ = vtrace.SetNewTrace(ctx)
return ctx
}