Skip to content

Commit

Permalink
samples: add GFELatency metrics to TracingSample (#1559)
Browse files Browse the repository at this point in the history
* feat: Adding GFELatency metrics to TracingSample

* Deleted metrics sample

* Updating README and changing deprecated method in TracingSample

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Thiago Nunes <thiagotnunes@google.com>
  • Loading branch information
3 people authored Jan 4, 2022
1 parent c8aa482 commit c62b85b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.cloud.spanner.Spanner;
import com.google.cloud.spanner.SpannerOptions;
import com.google.cloud.spanner.Statement;
import com.google.cloud.spanner.spi.v1.SpannerRpcViews;
import io.opencensus.common.Scope;
import io.opencensus.contrib.grpc.metrics.RpcViews;
import io.opencensus.contrib.zpages.ZPageHandlers;
Expand Down Expand Up @@ -54,7 +55,9 @@ public static void main(String[] args) throws Exception {

// Installs an exporter for stack driver stats.
StackdriverStatsExporter.createAndRegister();
RpcViews.registerAllCumulativeViews();
RpcViews.registerAllGrpcViews();
// Capture GFE Latency and GFE Header missing count.
SpannerRpcViews.registerGfeLatencyAndHeaderMissingCountViews();

// Name of your instance & database.
String instanceId = args[0];
Expand Down

0 comments on commit c62b85b

Please sign in to comment.