code: @Deprecated
    public static void createAndRegisterWithProjectIdAndMonitoredResource(
        String projectId, Duration exportInterval, MonitoredResource monitoredResource)
        throws IOException {
      checkNotNull(projectId, "projectId");
      checkNotNull(exportInterval, "exportInterval");
      checkNotNull(monitoredResource, "monitoredResource");
      createInternal(
          null, projectId, exportInterval, monitoredResource, null, DEFAULT_CONSTANT_LABELS);
    }
docs: Creates a Stackdriver Stats exporter with an explicit project ID and a custom Monitored
  Resource.
  
  <p>Only one Stackdriver exporter can be created.
  
  <p>Please refer to cloud.google.com/monitoring/custom-metrics/creating-metrics#which-resource
  for a list of valid {@code MonitoredResource}s.
  
  <p>This uses the default application credentials. See {@link
  GoogleCredentials#getApplicationDefault}.
  
  @param projectId the cloud project id.
  @param exportInterval the interval between pushing stats to StackDriver.
  @param monitoredResource the Monitored Resource used by exporter.
  @throws IllegalStateException if a Stackdriver exporter is already created.
  @deprecated in favor of {@link #createAndRegister(StackdriverStatsConfiguration)}.
  @since 0.10