File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
google-cloud-spanner/src/main/java/com/google/cloud/spanner Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ class TraceWrapper {
47
47
private static final AttributeKey <List <String >> DB_STATEMENT_ARRAY_KEY =
48
48
AttributeKey .stringArrayKey ("db.statement" );
49
49
private static final AttributeKey <String > DB_TABLE_NAME_KEY = AttributeKey .stringKey ("db.table" );
50
+ private static final AttributeKey <String > CLOUD_REGION_KEY =
51
+ AttributeKey .stringKey ("cloud.region" );
50
52
private static final AttributeKey <String > GCP_CLIENT_SERVICE_KEY =
51
53
AttributeKey .stringKey ("gcp.client.service" );
52
54
private static final AttributeKey <String > GCP_CLIENT_VERSION_KEY =
@@ -214,6 +216,7 @@ Attributes createCommonAttributes(DatabaseId db) {
214
216
builder .put (GCP_CLIENT_SERVICE_KEY , "spanner" );
215
217
builder .put (GCP_CLIENT_REPO_KEY , "googleapis/java-spanner" );
216
218
builder .put (GCP_CLIENT_VERSION_KEY , GaxProperties .getLibraryVersion (TraceWrapper .class ));
219
+ builder .put (CLOUD_REGION_KEY , BuiltInMetricsProvider .detectClientLocation ());
217
220
return builder .build ();
218
221
}
219
222
You can’t perform that action at this time.
0 commit comments