File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
google-cloud-spanner/src/main/java/com/google/cloud/spanner Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ 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+
51+ private static final AttributeKey <String > CLOUD_REGION_KEY =
52+ AttributeKey .stringKey ("cloud.region" );
5053 private static final AttributeKey <String > GCP_CLIENT_SERVICE_KEY =
5154 AttributeKey .stringKey ("gcp.client.service" );
5255 private static final AttributeKey <String > GCP_CLIENT_VERSION_KEY =
@@ -214,6 +217,7 @@ Attributes createCommonAttributes(DatabaseId db) {
214217 builder .put (GCP_CLIENT_SERVICE_KEY , "spanner" );
215218 builder .put (GCP_CLIENT_REPO_KEY , "googleapis/java-spanner" );
216219 builder .put (GCP_CLIENT_VERSION_KEY , GaxProperties .getLibraryVersion (TraceWrapper .class ));
220+ builder .put (CLOUD_REGION_KEY , BuiltInMetricsProvider .detectClientLocation ());
217221 return builder .build ();
218222 }
219223
You can’t perform that action at this time.
0 commit comments