googleapis / googleapis/google-cloud-java

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

Offen
#12,250 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @rahul2393 Auf GitHub ansehen
api: spanner
Vorherrschende Sprache
Java
Sterne
2.1k
Forks
1.2k
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
154

Beschreibung

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
- [ ] Version of the specification being implemented: ordinal number: 1 for version 1
- [ ] random Uint64 for the process' lifetime
- [ ] ID of the SpannerClient being used
- [ ] channelID for the gRPC channel being used
- [ ] Nth Request Count: nthReq
- [ ] 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.