opencensus: always trace and add comment about default sampling
Fixes
@@ -36,6 +36,12 @@ func main() {
view.RegisterExporter(exporter)
trace.RegisterExporter(exporter)
+ // Use trace.AlwaysSample() to always record traces. The
+ // default sampler skips some traces to conserve resources,
+ // but can make it hard to debug test traffic. So, remove
+ // the following line before pushing to production.
+ trace.ApplyConfig(trace.Config{DefaultSampler: trace.AlwaysSample()})
+
// This database must exist.
databaseName := "projects/your-project-id/instances/your-instance-id/databases/your-database-id"
