Skip to content

Commit 67be025

Browse files
committed
chore: Add implementation for firestore resource
1 parent b764925 commit 67be025

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

java-datastore/google-cloud-datastore/src/main/java/com/google/cloud/datastore/telemetry/TelemetryConstants.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ public class TelemetryConstants {
5252
public static final String RESOURCE_LABEL_DATABASE_ID = "database_id";
5353
public static final String RESOURCE_LABEL_LOCATION = "location";
5454
public static final Set<String> DATASTORE_RESOURCE_LABELS =
55-
ImmutableSet.of(RESOURCE_LABEL_PROJECT_ID, RESOURCE_LABEL_DATABASE_ID, RESOURCE_LABEL_LOCATION);
55+
ImmutableSet.of(
56+
RESOURCE_LABEL_PROJECT_ID, RESOURCE_LABEL_DATABASE_ID, RESOURCE_LABEL_LOCATION);
5657

5758
// Resource attribute keys (used on OTel Resource)
5859
public static final AttributeKey<String> PROJECT_ID_KEY = AttributeKey.stringKey("project_id");

java-datastore/google-cloud-datastore/src/test/java/com/google/cloud/datastore/telemetry/DatastoreCloudMonitoringExporterTest.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,14 @@ public void testExportingSumData() {
148148

149149
assertThat(timeSeries.getMetric().getLabelsMap())
150150
.containsExactly(
151-
DATABASE_ID_KEY.getKey(), DATABASE_ID,
152-
CLIENT_NAME_KEY.getKey(), this.clientName,
153-
CLIENT_UID_KEY.getKey(), this.clientUid,
154-
SERVICE_KEY.getKey(), SERVICE_VALUE);
151+
DATABASE_ID_KEY.getKey(),
152+
DATABASE_ID,
153+
CLIENT_NAME_KEY.getKey(),
154+
this.clientName,
155+
CLIENT_UID_KEY.getKey(),
156+
this.clientUid,
157+
SERVICE_KEY.getKey(),
158+
SERVICE_VALUE);
155159

156160
assertThat(timeSeries.getPoints(0).getValue().getInt64Value()).isEqualTo(fakeValue);
157161

0 commit comments

Comments
 (0)