code: public static void createAndRegister(StackdriverStatsConfiguration configuration)
        throws IOException {
      checkNotNull(configuration, "configuration");
      createInternal(
          configuration.getCredentials(),
          configuration.getProjectId(),
          configuration.getExportInterval(),
          configuration.getMonitoredResource(),
          configuration.getMetricNamePrefix(),
          configuration.getConstantLabels());
    }
docs: Creates a Stackdriver Stats exporter with a {@link StackdriverStatsConfiguration}.
  
  <p>Only one Stackdriver exporter can be created.
  
  <p>If {@code credentials} of the configuration is not set, the exporter will use the default
  application credentials. See {@link GoogleCredentials#getApplicationDefault}.
  
  <p>If {@code projectId} of the configuration is not set, the exporter will use the default
  project ID configured. See {@link ServiceOptions#getDefaultProjectId}.
  
  <p>If {@code exportInterval} of the configuration is not set, the exporter will use the default
  interval of one minute.
  
  <p>If {@code monitoredResources} of the configuration is not set, the exporter will try to
  create an appropriate {@code monitoredResources} based on the environment variables. In
  addition, please refer to
  cloud.google.com/monitoring/custom-metrics/creating-metrics#which-resource for a list of valid
  {@code MonitoredResource}s.
  
  <p>If {@code metricNamePrefix} of the configuration is not set, the exporter will use the
  default prefix "OpenCensus".
  
  @param configuration the {@code StackdriverStatsConfiguration}.
  @throws IllegalStateException if a Stackdriver exporter is already created.
  @since 0.11.0