googleapis / googleapis/google-cloud-python

Implement propagation of x-goog-spanner-request-id gRPC header on every call

未关闭
#15,905 1 条评论 0 个 reaction 已指派 1 人 已被 @rahul2393 认领 在 GitHub 查看
api: spanner
主要语言
Python
星标
5.4k
派生
1.8k
平均合并
3 天 4 小时
30 天内合并 PR
122

描述

This is a feature request to implement propagation of x-goog-spanner-request-id gRPC header on every call.

## Reasoning
x-goog-spanner-request-id allows propagation of an ID that'll be correlated between client and server calls. We can't rely on trace headers because they are sampled, convoluted through a bunch of infrastructure so Google Engineering asked that we craft up a better mechanism. The value will allow tracking the operations of an RPC even through retries

## Requirements
Each x-goog-spanner-request-id requires the following fields
- [x] Version of the specification being implemented: ordinal number: 1 for version 1
- [x] random Uint64 for the process' lifetime
- [x] ID of the SpannerClient being used
- [x] channelID for the gRPC channel being used
- [x] Nth Request Count: nthReq
- [x] RPC attempt number for nthReq

## Specification
Please reference https://orijtech.notion.site/x-goog-spanner-request-id-always-on-gRPC-header-to-aid-in-quick-debugging-of-errors-14aba6bc91348091a58fca7a505c9827?pvs=4

## Reference implementation
I built a Go reference implementation at https://github.com/googleapis/google-cloud-go/pull/11048

/cc @tharoldD

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。