Skip to content

Commit 2c13e0d

Browse files
committed
test(datastore): clean up Javadoc in IT test to remove obsolete references
1 parent b2f1459 commit 2c13e0d

1 file changed

Lines changed: 4 additions & 40 deletions

File tree

java-datastore/google-cloud-datastore/src/test/java/com/google/cloud/datastore/ITDatastoreBuiltInAndCustomMetrics.java

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@
4242
import org.junit.runners.Parameterized;
4343

4444
/**
45-
* Integration test that verifies both the default built-in Cloud Monitoring export path and a
46-
* user-configured OpenTelemetry backend (backed by {@link InMemoryMetricReader}) are active
47-
* simultaneously via the {@link
48-
* com.google.cloud.datastore.telemetry.CompositeDatastoreMetricsRecorder}.
45+
* Integration test that verifies a user-configured OpenTelemetry backend (backed by {@link
46+
* InMemoryMetricReader}) correctly captures metrics emitted by the Datastore SDK.
4947
*
5048
* <h3>What this test covers</h3>
5149
*
@@ -54,44 +52,10 @@
5452
* emitted by the Datastore SDK. After each operation the test collects all metrics
5553
* synchronously and asserts that expected names, types, and attributes are present. Because
5654
* the in-memory reader is under full test control, these assertions are deterministic.
57-
* <li><b>Built-in Cloud Monitoring backend</b> — a private {@link OpenTelemetrySdk} configured
58-
* with {@link com.google.cloud.datastore.telemetry.DatastoreCloudMonitoringExporter} is
59-
* created alongside the custom backend. The test verifies the composite recorder is in place
60-
* (confirming both backends are wired up) and that no exception is thrown during the export
61-
* path. The periodic export interval means data will not appear in Cloud Monitoring
62-
* immediately; manual verification steps are provided at the bottom of this class Javadoc.
6355
* </ol>
6456
*
65-
* <h3>Setup</h3>
66-
*
67-
* <p>Requires a real GCP project with Application Default Credentials that have the {@code
68-
* monitoring.timeSeries.create} IAM permission. Set the following environment variables:
69-
*
70-
* <ul>
71-
* <li>{@code GOOGLE_CLOUD_PROJECT} — GCP project ID (required)
72-
* <li>{@code DATASTORE_DATABASE_ID} — Datastore database ID (defaults to {@code ""} for the
73-
* default database)
74-
* </ul>
75-
*
76-
* <h3>Cloud Monitoring verification</h3>
77-
*
78-
* <p>After running this test, navigate to <b>Cloud Console → Monitoring → Metrics Explorer</b> and
79-
* query:
80-
*
81-
* <pre>
82-
* Metric : custom.googleapis.com/internal/client/transaction_latency
83-
* Resource: global
84-
* Filter : project_id = &lt;YOUR_PROJECT_ID&gt;
85-
* </pre>
86-
*
87-
* <p>Data may take up to 60 seconds (one periodic flush interval) to appear.
88-
*
89-
* <p><b>Note on Cloud Monitoring verification:</b> This test does not programmatically verify that
90-
* metrics are successfully received by the Cloud Monitoring backend. Querying Cloud Monitoring for
91-
* recently written metrics can be flaky due to ingestion delays (which can take up to 10 minutes
92-
* for new metrics). Following the strategy used in tracing tests (which only use in-memory
93-
* exporters), this test relies on {@link InMemoryMetricReader} to verify that metrics are correctly
94-
* generated with expected attributes.
57+
* <p>Following the strategy used in tracing tests, this test relies on {@link InMemoryMetricReader}
58+
* to verify that metrics are correctly generated with expected attributes.
9559
*/
9660
@RunWith(Parameterized.class)
9761
@SuppressWarnings("checkstyle:abbreviationaswordinname")

0 commit comments

Comments
 (0)