feat(bigquery): Integrate Otel Tracing in storage lib#2983
Conversation
| readRowsCallable = | ||
| settings | ||
| .getOpenTelemetryTracer() | ||
| .spanBuilder("com.google.cloud.bigquery.storage.v1.read.readRowsCallable") |
There was a problem hiding this comment.
The behavior here is we'll get a single span that represents the lifetime of the server streaming rpc? Can/should we add an attribute implicating the stream ID requested from the ReadRowsRequest?
There was a problem hiding this comment.
Stream ID seems like a good field to capture. I could be mistaken, but it seems like the ReadRowsRequest is handled by generated code and in this context we don't have access to the stream ID (ie can't put it in the attributes). Do you know of a way we can get the stream ID in the ReadClient or its enhanced stub @Neenu1995 ?
There was a problem hiding this comment.
The jdbc gets the StreamName from the readSession. I don't know if stream ID is accessible anywhere else.
* feat(bigquery): Integrate Otel Tracing in storage lib * fix style * add sdk dependencies * Improve IT test coverage * fix IT test failures * Move otel init to specific test
This PR adds OpenTelemetry tracing support to the BigQueryReadClient and the BigQueryEnhancedReadStub. Tracing is toggled with a boolean flag and is enabled through the BigQueryReadSettings when creating the BigQueryReadClient.