From f0e5d56a8e2fb1716f06a274e89a6ca368aa8172 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 5 Feb 2021 12:58:05 -0800 Subject: [PATCH] chore: regenerate README (#619) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2021-02-05 20:47:02,858 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-bigtable/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working tree clean 2021-02-05 20:47:03,749 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ```
Full log will be available here: https://source.cloud.google.com/results/invocations/697a0cf5-def6-45ec-a126-d13bcbd210de/targets - [ ] To automatically regenerate this PR, check this box. --- .github/readme/synth.metadata/synth.metadata | 2 +- README.md | 35 ++++++++++++++++++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index b49daf3d1e..431c5f6e36 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigtable.git", - "sha": "3e8af747b329f6656a410160e8da14fd8227c8fc" + "sha": "7eb60875bb054bd25338325b465550411ebf6a4b" } }, { diff --git a/README.md b/README.md index 3f58f94835..0807e969ed 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ try { TIP: If you are experiencing version conflicts with gRPC, see [Version Conflicts](#version-conflicts). -## OpenCensus Tracing +## Client request tracing: OpenCensus Tracing Cloud Bigtable client supports [OpenCensus Tracing](https://opencensus.io/tracing/), which gives insight into the client internals and aids in debugging production issues. @@ -259,6 +259,9 @@ StackdriverTraceExporter.createAndRegister( .build()); ``` +You can view the traces on the Google Cloud Platform Console +[Trace](https://console.cloud.google.com/traces) page. + By default traces are [sampled](https://opencensus.io/tracing/sampling) at a rate of about 1/10,000. You can configure a higher rate by updating the active tracing params: @@ -273,7 +276,7 @@ Tracing.getTraceConfig().updateActiveTraceParams( ); ``` -## OpenCensus Stats +## Enabling Cloud Bigtable Metrics: OpenCensus Stats Cloud Bigtable client supports [Opencensus Metrics](https://opencensus.io/stats/), which gives insight into the client internals and aids in debugging production issues. @@ -376,6 +379,34 @@ BigtableDataSettings.enableOpenCensusStats(); BigtableDataSettings.enableGfeOpenCensusStats(); ``` +You can view the metrics on the Google Cloud Platform Console +[Metrics explorer](https://console.cloud.google.com/monitoring/metrics-explorer) +page. + +You can configure how frequently metrics are pushed to StackDriver and the +[Monitored resource type](https://cloud.google.com/monitoring/api/resources) by +updating `StackdriverStatsConfiguration`: + +``` java +// Example: configuring export interval and monitored resource type +StackdriverStatsExporter.createAndRegister( + StackdriverStatsConfiguration.builder() + .setProjectId("YOUR_PROJECT_ID") + // Exporting metrics every 10 seconds + .setExportInterval(Duration.create(10, 0)) + // Configure monitored resource type. A common practice is to use the + // monitored resource objects that represent the physical resources + // where your application code is running. See the full list of + // monitored resource type here: + // https://cloud.google.com/monitoring/api/resources + .setMonitoredResource(MonitoredResource.newBuilder() + .setType("global") + .putLabels("project_id", "YOUR_PROJECT_ID") + .build()) + .build() +); +``` + ## Version Conflicts google-cloud-bigtable depends on gRPC directly which may conflict with the versions brought