@@ -459,6 +459,27 @@ message RequestOptions {
459459
460460 // Priority for the request.
461461 Priority priority = 1 ;
462+
463+ // A per-request tag which can be applied to queries or reads, used for
464+ // statistics collection.
465+ // Both request_tag and transaction_tag can be specified for a read or query
466+ // that belongs to a transaction.
467+ // This field is ignored for requests where it's not applicable (e.g.
468+ // CommitRequest).
469+ // `request_tag` must be a valid identifier of the form:
470+ // `[a-zA-Z][a-zA-Z0-9_\-]` between 2 and 64 characters in length
471+ string request_tag = 2 ;
472+
473+ // A tag used for statistics collection about this transaction.
474+ // Both request_tag and transaction_tag can be specified for a read or query
475+ // that belongs to a transaction.
476+ // The value of transaction_tag should be the same for all requests belonging
477+ // to the same transaction.
478+ // If this request doesn’t belong to any transaction, transaction_tag will be
479+ // ignored.
480+ // `transaction_tag` must be a valid identifier of the format:
481+ // `[a-zA-Z][a-zA-Z0-9_\-]{0,49}`
482+ string transaction_tag = 3 ;
462483}
463484
464485// The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
@@ -490,15 +511,15 @@ message ExecuteSqlRequest {
490511 // The `optimizer_version` statement hint has precedence over this setting.
491512 string optimizer_version = 1 ;
492513
493- // Query optimizer statistics package to use .
514+ // An option to control the selection of optimizer statistics package.
494515 //
495516 // This parameter allows individual queries to use a different query
496- // optimizer statistics.
517+ // optimizer statistics package .
497518 //
498519 // Specifying `latest` as a value instructs Cloud Spanner to use the latest
499520 // generated statistics package. If not specified, Cloud Spanner uses
500- // statistics package set at the database level options, or latest if
501- // the database option is not set.
521+ // the statistics package set at the database level options, or the latest
522+ // package if the database option is not set.
502523 //
503524 // The statistics package requested by the query has to be exempt from
504525 // garbage collection. This can be achieved with the following DDL
@@ -509,10 +530,10 @@ message ExecuteSqlRequest {
509530 // ```
510531 //
511532 // The list of available statistics packages can be queried from
512- // `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES `.
533+ // `INFORMATION_SCHEMA.SPANNER_STATISTICS `.
513534 //
514535 // Executing a SQL statement with an invalid optimizer statistics package
515- // or with statistics package that allows garbage collection fails with
536+ // or with a statistics package that allows garbage collection fails with
516537 // an `INVALID_ARGUMENT` error.
517538 string optimizer_statistics_package = 2 ;
518539 }
0 commit comments