private void setupView(Measure measure, TagKey... keys) {
    // Register the view. It is imperative that this step exists,
    // otherwise recorded metrics will be dropped and never exported.
    View view = View.create(
        View.Name.create(NAME_BASE + measure.getName()),
        measure.getDescription(),
        measure,
        Aggregation.Count.create(),
        ImmutableList.copyOf(keys));

    viewManager.registerView(view);
  }
A {@link DtpInternalMetricRecorder} that writes metrics to Stackdriver.
*
extensions/cloud/portability-cloud-google/src/main/java/org/datatransferproject/cloud/google/GoogleDtpInternalMetricRecorder.java