@@ -203,7 +203,7 @@ try {
203203
204204TIP: If you are experiencing version conflicts with gRPC, see [ Version Conflicts] ( #version-conflicts ) .
205205
206- ## OpenCensus Tracing
206+ ## Client request tracing: OpenCensus Tracing
207207
208208Cloud Bigtable client supports [ OpenCensus Tracing] ( https://opencensus.io/tracing/ ) ,
209209which gives insight into the client internals and aids in debugging production issues.
@@ -258,6 +258,8 @@ StackdriverTraceExporter.createAndRegister(
258258 .setProjectId(" YOUR_PROJECT_ID" )
259259 .build());
260260```
261+ You can view the traces on the Google Cloud Platform Console
262+ [ Trace] ( https://console.cloud.google.com/traces ) page.
261263
262264By default traces are [ sampled] ( https://opencensus.io/tracing/sampling ) at a rate of about 1/10,000.
263265You can configure a higher rate by updating the active tracing params:
@@ -273,7 +275,7 @@ Tracing.getTraceConfig().updateActiveTraceParams(
273275);
274276```
275277
276- ## OpenCensus Stats
278+ ## Enabling Cloud Bigtable Metrics: OpenCensus Stats
277279
278280Cloud Bigtable client supports [ Opencensus Metrics] ( https://opencensus.io/stats/ ) ,
279281which gives insight into the client internals and aids in debugging production issues.
@@ -376,6 +378,34 @@ BigtableDataSettings.enableOpenCensusStats();
376378BigtableDataSettings . enableGfeOpenCensusStats();
377379```
378380
381+ You can view the metrics on the Google Cloud Platform Console
382+ [ Metrics explorer] ( https://console.cloud.google.com/monitoring/metrics-explorer )
383+ page.
384+
385+ You can configure how frequently metrics are pushed to StackDriver and the
386+ [ Monitored resource type] ( https://cloud.google.com/monitoring/api/resources ) by
387+ updating ` StackdriverStatsConfiguration ` :
388+
389+ ``` java
390+ // Example: configuring export interval and monitored resource type
391+ StackdriverStatsExporter . createAndRegister(
392+ StackdriverStatsConfiguration . builder()
393+ .setProjectId(" YOUR_PROJECT_ID" )
394+ // Exporting metrics every 10 seconds
395+ .setExportInterval(Duration . create(10 , 0 ))
396+ // Configure monitored resource type. A common practice is to use the
397+ // monitored resource objects that represent the physical resources
398+ // where your application code is running. See the full list of
399+ // monitored resource type here:
400+ // https://cloud.google.com/monitoring/api/resources
401+ .setMonitoredResource(MonitoredResource . newBuilder()
402+ .setType(" global" )
403+ .putLabels(" project_id" , " YOUR_PROJECT_ID" )
404+ .build())
405+ .build()
406+ );
407+ ```
408+
379409## Version Conflicts
380410
381411google-cloud-bigtable depends on gRPC directly which may conflict with the versions brought
0 commit comments