@@ -186,8 +186,8 @@ public Dataset getDatasetSkipExceptionTranslation(
186186 "com.google.cloud.bigquery.BigQueryRpc.getDataset" ,
187187 "DatasetService" ,
188188 "GetDataset" ,
189- options ,
190- destinationId ),
189+ destinationId ,
190+ options ),
191191 span -> {
192192 Dataset dataset = bqGetRequest .execute ();
193193 if (span != null ) {
@@ -231,8 +231,8 @@ public Tuple<String, Iterable<Dataset>> listDatasetsSkipExceptionTranslation(
231231 "com.google.cloud.bigquery.BigQueryRpc.listDatasets" ,
232232 "DatasetService" ,
233233 "ListDatasets" ,
234- options ,
235- destinationId ),
234+ destinationId ,
235+ options ),
236236 span -> {
237237 if (span != null ) {
238238 span .setAttribute ("bq.rpc.page_token" , datasetsListRequest .getPageToken ());
@@ -287,8 +287,8 @@ public Dataset createSkipExceptionTranslation(Dataset dataset, Map<Option, ?> op
287287 "com.google.cloud.bigquery.BigQueryRpc.createDataset" ,
288288 "DatasetService" ,
289289 "InsertDataset" ,
290- options ,
291- destinationId ),
290+ destinationId ,
291+ options ),
292292 span -> {
293293 Dataset datasetResponse = bqCreateRequest .execute ();
294294 if (span != null ) {
@@ -387,8 +387,8 @@ public Routine createSkipExceptionTranslation(Routine routine, Map<Option, ?> op
387387 "com.google.cloud.bigquery.BigQueryRpc.createRoutine" ,
388388 "RoutineService" ,
389389 "InsertRoutine" ,
390- options ,
391- destinationId ),
390+ destinationId ,
391+ options ),
392392 span -> {
393393 Routine routineResponse = bqCreateRequest .execute ();
394394 if (span != null ) {
@@ -426,9 +426,15 @@ public Job createSkipExceptionTranslation(Job job, Map<Option, ?> options) throw
426426 .getRequestHeaders ()
427427 .set ("x-goog-otel-enabled" , this .options .isOpenTelemetryTracingEnabled ());
428428
429+ String destinationId = RESOURCE_PROJECT_PREFIX + projectId + "/jobs" ;
430+
429431 return executeWithSpan (
430432 createRpcTracingSpan (
431- "com.google.cloud.bigquery.BigQueryRpc.createJob" , "JobService" , "InsertJob" , options ),
433+ "com.google.cloud.bigquery.BigQueryRpc.createJob" ,
434+ "JobService" ,
435+ "InsertJob" ,
436+ destinationId ,
437+ options ),
432438 span -> {
433439 Job jobResponse = bqCreateRequest .execute ();
434440 if (span != null ) {
@@ -463,11 +469,14 @@ public Job createJobForQuerySkipExceptionTranslation(Job job) throws IOException
463469 .getRequestHeaders ()
464470 .set ("x-goog-otel-enabled" , this .options .isOpenTelemetryTracingEnabled ());
465471
472+ String destinationId = RESOURCE_PROJECT_PREFIX + projectId + "/jobs" ;
473+
466474 return executeWithSpan (
467475 createRpcTracingSpan (
468476 "com.google.cloud.bigquery.BigQueryRpc.createJobForQuery" ,
469477 "JobService" ,
470478 "InsertJob" ,
479+ destinationId ,
471480 null ),
472481 span -> {
473482 Job jobResponse = bqCreateRequest .execute ();
@@ -515,8 +524,8 @@ public boolean deleteDatasetSkipExceptionTranslation(
515524 "com.google.cloud.bigquery.BigQueryRpc.deleteDataset" ,
516525 "DatasetService" ,
517526 "DeleteDataset" ,
518- options ,
519- destinationId ),
527+ destinationId ,
528+ options ),
520529 span -> {
521530 bqDeleteRequest .execute ();
522531 return true ;
@@ -564,8 +573,8 @@ public Dataset patchSkipExceptionTranslation(Dataset dataset, Map<Option, ?> opt
564573 "com.google.cloud.bigquery.BigQueryRpc.patchDataset" ,
565574 "DatasetService" ,
566575 "PatchDataset" ,
567- options ,
568- destinationId ),
576+ destinationId ,
577+ options ),
569578 span -> {
570579 Dataset datasetResponse = bqPatchRequest .execute ();
571580 if (span != null ) {
@@ -617,8 +626,8 @@ public Table patchSkipExceptionTranslation(Table table, Map<Option, ?> options)
617626 "com.google.cloud.bigquery.BigQueryRpc.patchTable" ,
618627 "TableService" ,
619628 "PatchTable" ,
620- options ,
621- destinationId ),
629+ destinationId ,
630+ options ),
622631 span -> {
623632 Table tableResponse = bqPatchRequest .execute ();
624633 if (span != null ) {
@@ -667,8 +676,8 @@ public Table getTableSkipExceptionTranslation(
667676 "com.google.cloud.bigquery.BigQueryRpc.getTable" ,
668677 "TableService" ,
669678 "GetTable" ,
670- options ,
671- destinationId ),
679+ destinationId ,
680+ options ),
672681 span -> {
673682 Table tableResponse = bqGetRequest .execute ();
674683 if (span != null ) {
@@ -719,8 +728,8 @@ public Tuple<String, Iterable<Table>> listTablesSkipExceptionTranslation(
719728 "com.google.cloud.bigquery.BigQueryRpc.listTables" ,
720729 "TableService" ,
721730 "ListTables" ,
722- options ,
723- destinationId ),
731+ destinationId ,
732+ options ),
724733 span -> {
725734 if (span != null ) {
726735 span .setAttribute ("bq.rpc.page_token" , tableListRequest .getPageToken ());
@@ -786,8 +795,8 @@ public boolean deleteTableSkipExceptionTranslation(
786795 "com.google.cloud.bigquery.BigQueryRpc.deleteTable" ,
787796 "TableService" ,
788797 "DeleteTable" ,
789- null ,
790- destinationId ),
798+ destinationId ,
799+ null ),
791800 span -> {
792801 bqDeleteRequest .execute ();
793802 return true ;
@@ -834,8 +843,8 @@ public Model patchSkipExceptionTranslation(Model model, Map<Option, ?> options)
834843 "com.google.cloud.bigquery.BigQueryRpc.patchModel" ,
835844 "ModelService" ,
836845 "PatchModel" ,
837- options ,
838- destinationId ),
846+ destinationId ,
847+ options ),
839848 span -> {
840849 Model modelResponse = bqPatchRequest .execute ();
841850 if (span != null ) {
@@ -884,8 +893,8 @@ public Model getModelSkipExceptionTranslation(
884893 "com.google.cloud.bigquery.BigQueryRpc.getModel" ,
885894 "ModelService" ,
886895 "GetModel" ,
887- options ,
888- destinationId ),
896+ destinationId ,
897+ options ),
889898 span -> {
890899 Model modelResponse = bqGetRequest .execute ();
891900 if (span != null ) {
@@ -930,8 +939,8 @@ public Tuple<String, Iterable<Model>> listModelsSkipExceptionTranslation(
930939 "com.google.cloud.bigquery.BigQueryRpc.listModels" ,
931940 "ModelService" ,
932941 "ListModels" ,
933- options ,
934- destinationId ),
942+ destinationId ,
943+ options ),
935944 span -> {
936945 if (span != null ) {
937946 span .setAttribute ("bq.rpc.page_token" , modelListRequest .getPageToken ());
@@ -981,8 +990,8 @@ public boolean deleteModelSkipExceptionTranslation(
981990 "com.google.cloud.bigquery.BigQueryRpc.deleteModel" ,
982991 "ModelService" ,
983992 "DeleteModel" ,
984- null ,
985- destinationId ),
993+ destinationId ,
994+ null ),
986995 span -> {
987996 bqDeleteRequest .execute ();
988997 return true ;
@@ -1031,8 +1040,8 @@ public Routine updateSkipExceptionTranslation(Routine routine, Map<Option, ?> op
10311040 "com.google.cloud.bigquery.BigQueryRpc.updateRoutine" ,
10321041 "RoutineService" ,
10331042 "UpdateRoutine" ,
1034- options ,
1035- destinationId ),
1043+ destinationId ,
1044+ options ),
10361045 span -> {
10371046 Routine routineResponse = bqUpdateRequest .execute ();
10381047 if (span != null ) {
@@ -1081,8 +1090,8 @@ public Routine getRoutineSkipExceptionTranslation(
10811090 "com.google.cloud.bigquery.BigQueryRpc.getRoutine" ,
10821091 "RoutineService" ,
10831092 "GetRoutine" ,
1084- options ,
1085- destinationId ),
1093+ destinationId ,
1094+ options ),
10861095 span -> {
10871096 Routine routineResponse = bqGetRequest .execute ();
10881097 if (span != null ) {
@@ -1127,8 +1136,8 @@ public Tuple<String, Iterable<Routine>> listRoutinesSkipExceptionTranslation(
11271136 "com.google.cloud.bigquery.BigQueryRpc.listRoutines" ,
11281137 "RoutineService" ,
11291138 "ListRoutines" ,
1130- options ,
1131- destinationId ),
1139+ destinationId ,
1140+ options ),
11321141 span -> {
11331142 if (span != null ) {
11341143 span .setAttribute ("bq.rpc.page_token" , routineListRequest .getPageToken ());
@@ -1177,8 +1186,8 @@ public boolean deleteRoutineSkipExceptionTranslation(
11771186 "com.google.cloud.bigquery.BigQueryRpc.deleteRoutine" ,
11781187 "RoutineService" ,
11791188 "DeleteRoutine" ,
1180- null ,
1181- destinationId ),
1189+ destinationId ,
1190+ null ),
11821191 span -> {
11831192 bqDeleteRequest .execute ();
11841193 return true ;
@@ -1218,8 +1227,8 @@ public TableDataInsertAllResponse insertAllSkipExceptionTranslation(
12181227 "com.google.cloud.bigquery.BigQueryRpc.insertAll" ,
12191228 "TableDataService" ,
12201229 "InsertAll" ,
1221- null ,
1222- destinationId ),
1230+ destinationId ,
1231+ null ),
12231232 span -> insertAllRequest .execute ());
12241233 }
12251234
@@ -1262,8 +1271,8 @@ public TableDataList listTableDataSkipExceptionTranslation(
12621271 "com.google.cloud.bigquery.BigQueryRpc.listTableData" ,
12631272 "TableDataService" ,
12641273 "List" ,
1265- options ,
1266- destinationId ),
1274+ destinationId ,
1275+ options ),
12671276 span -> {
12681277 if (span != null ) {
12691278 span .setAttribute ("bq.rpc.page_token" , bqListRequest .getPageToken ());
@@ -1316,8 +1325,8 @@ public TableDataList listTableDataWithRowLimitSkipExceptionTranslation(
13161325 "com.google.cloud.bigquery.BigQueryRpc.listTableDataWithRowLimit" ,
13171326 "TableDataService" ,
13181327 "List" ,
1319- null ,
1320- destinationId ),
1328+ destinationId ,
1329+ null ),
13211330 span -> {
13221331 if (span != null ) {
13231332 span .setAttribute ("bq.rpc.page_token" , bqListRequest .getPageToken ());
@@ -1362,8 +1371,8 @@ public Job getJobSkipExceptionTranslation(
13621371 "com.google.cloud.bigquery.BigQueryRpc.getJob" ,
13631372 "JobService" ,
13641373 "GetJob" ,
1365- options ,
1366- destinationId ),
1374+ destinationId ,
1375+ options ),
13671376 span -> {
13681377 Job jobResponse = bqGetRequest .execute ();
13691378 if (span != null ) {
@@ -1406,8 +1415,8 @@ public Job getQueryJobSkipExceptionTranslation(String projectId, String jobId, S
14061415 "com.google.cloud.bigquery.BigQueryRpc.getQueryJob" ,
14071416 "JobService" ,
14081417 "GetJob" ,
1409- null ,
1410- destinationId ),
1418+ destinationId ,
1419+ null ),
14111420 span -> {
14121421 Job jobResponse = bqGetRequest .execute ();
14131422 if (span != null ) {
@@ -1463,8 +1472,8 @@ public Tuple<String, Iterable<Job>> listJobsSkipExceptionTranslation(
14631472 "com.google.cloud.bigquery.BigQueryRpc.listJobs" ,
14641473 "JobService" ,
14651474 "ListJobs" ,
1466- options ,
1467- destinationId ),
1475+ destinationId ,
1476+ options ),
14681477 span -> {
14691478 if (span != null ) {
14701479 span .setAttribute ("bq.rpc.page_token" , listJobsRequest .getPageToken ());
@@ -1910,11 +1919,6 @@ public TestIamPermissionsResponse testIamPermissionsSkipExceptionTranslation(
19101919 *
19111920 * <p>If isOpenTelemetryTracingEnabled == true creates and returns span, otherwise returns null.
19121921 */
1913- private Span createRpcTracingSpan (
1914- String spanName , String service , String method , Map <Option , ?> options ) {
1915- return createRpcTracingSpan (spanName , service , method , null , options );
1916- }
1917-
19181922 private Span createRpcTracingSpan (
19191923 String spanName ,
19201924 String service ,
0 commit comments