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 {
4747 private static final AttributeKey <List <String >> DB_STATEMENT_ARRAY_KEY =
4848 AttributeKey .stringArrayKey ("db.statement" );
4949 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" );
5052 private static final AttributeKey <String > GCP_CLIENT_SERVICE_KEY =
5153 AttributeKey .stringKey ("gcp.client.service" );
5254 private static final AttributeKey <String > GCP_CLIENT_VERSION_KEY =
@@ -214,6 +216,7 @@ Attributes createCommonAttributes(DatabaseId db) {
214216 builder .put (GCP_CLIENT_SERVICE_KEY , "spanner" );
215217 builder .put (GCP_CLIENT_REPO_KEY , "googleapis/java-spanner" );
216218 builder .put (GCP_CLIENT_VERSION_KEY , GaxProperties .getLibraryVersion (TraceWrapper .class ));
219+ builder .put (CLOUD_REGION_KEY , BuiltInMetricsProvider .detectClientLocation ());
217220 return builder .build ();
218221 }
219222
You can’t perform that action at this time.
0 commit comments