diff --git a/test/integration/goldens/logging/MetricsClient.java b/test/integration/goldens/logging/MetricsClient.java index e25005abee..e18e71a14d 100644 --- a/test/integration/goldens/logging/MetricsClient.java +++ b/test/integration/goldens/logging/MetricsClient.java @@ -151,6 +151,17 @@ public MetricsServiceV2Stub getStub() { /** * Lists logs-based metrics. * + *
Sample code: + * + *
{@code + * try (MetricsClient metricsClient = MetricsClient.create()) { + * ProjectName parent = ProjectName.of("[PROJECT]"); + * for (LogMetric element : metricsClient.listLogMetrics(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. The name of the project containing the metrics: *
"projects/[PROJECT_ID]" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -167,6 +178,17 @@ public final ListLogMetricsPagedResponse listLogMetrics(ProjectName parent) { /** * Lists logs-based metrics. * + *
Sample code: + * + *
{@code + * try (MetricsClient metricsClient = MetricsClient.create()) { + * String parent = ProjectName.of("[PROJECT]").toString(); + * for (LogMetric element : metricsClient.listLogMetrics(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. The name of the project containing the metrics: *
"projects/[PROJECT_ID]" * @throws com.google.api.gax.rpc.ApiException if the remote call fails