code: public final LogMetric updateLogMetric(String metricName, LogMetric metric) {
  
      UpdateLogMetricRequest request =
          UpdateLogMetricRequest.newBuilder().setMetricName(metricName).setMetric(metric).build();
      return updateLogMetric(request);
    }
docs: Creates or updates a logs-based metric.
  
  <p>Sample code:
  
  <pre><code>
  try (MetricsClient metricsClient = MetricsClient.create()) {
  MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
  LogMetric metric = LogMetric.newBuilder().build();
  LogMetric response = metricsClient.updateLogMetric(metricName.toString(), metric);
  }
  </code></pre>
  
  @param metricName The resource name of the metric to update:
  <p>"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
  <p>The updated metric must be provided in the request and it's `name` field must be the
  same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is
  created.
  @param metric The updated metric.
  @throws com.google.api.gax.rpc.ApiException if the remote call fails