Google\Cloud\Logging\V2\MetricsServiceV2Client::deleteLogMetric PHP Method

deleteLogMetric() public method

Sample code: try { $metricsServiceV2Client = new MetricsServiceV2Client(); $formattedMetricName = MetricsServiceV2Client::formatMetricName("[PROJECT]", "[METRIC]"); $metricsServiceV2Client->deleteLogMetric($formattedMetricName); } finally { if (isset($metricsServiceV2Client)) { $metricsServiceV2Client->close(); } }
public deleteLogMetric ( string $metricName, array $optionalArgs = [] )
$metricName string The resource name of the metric to delete: "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
$optionalArgs array { Optional. @type \Google\GAX\RetrySettings $retrySettings Retry settings to use for this call. If present, then $timeoutMillis is ignored. @type int $timeoutMillis Timeout to use for this call. Only used if $retrySettings is not set. }
    public function deleteLogMetric($metricName, $optionalArgs = [])
    {
        $request = new DeleteLogMetricRequest();
        $request->setMetricName($metricName);
        $mergedSettings = $this->defaultCallSettings['deleteLogMetric']->merge(new CallSettings($optionalArgs));
        $callable = ApiCallable::createApiCall($this->metricsServiceV2Stub, 'DeleteLogMetric', $mergedSettings, $this->descriptors['deleteLogMetric']);
        return $callable($request, [], ['call_credentials_callback' => $this->createCredentialsCallback()]);
    }