googleapis / nodejs-spanner

Node.js client for Google Cloud Spanner: the world’s first fully managed relational database service to offer both strong consistency and horizontal scalability.
https://cloud.google.com/spanner/
Apache License 2.0
136 stars 101 forks source link

observability: add SessionPool span annotations #2101

Closed odeke-em closed 1 month ago

odeke-em commented 2 months ago

This change adds span annotations on the active span which could either be the noopSpan or the top-level active one, for whenever we progressively add more spans.

Built from #2087 Updates #2079

odeke-em commented 2 months ago

Exhibit

On running this code per instructions of sample https://gist.github.com/odeke-em/35fb0e58b3a73dca59730b688817be1b, we get back

Screenshot 2024-09-04 at 2 50 39 AM Screenshot 2024-09-04 at 2 53 06 AM Screenshot 2024-09-04 at 2 53 18 AM
odeke-em commented 2 months ago

@surbhigarg92 thank you very much for the review! Kindly help me re-run the checks an also with a fresh set of review.

surbhigarg92 commented 2 months ago

@surbhigarg92 thank you very much for the review! Kindly help me re-run the checks an also with a fresh set of review.

@odeke-em Looks like you have not added the Transaction creation events. Do you plan to do that in next PR ?

odeke-em commented 2 months ago

Yes indeed. Let's keep this one focused and smaller @surbhigarg92, thanks!

odeke-em commented 2 months ago

@willpoint this is the PR for us to base off. @surbhigarg92 kindly please take a look. In a follow-up PR I shall make the updates to span annotation tests for transactions but this change has transaction creation annotations.

surbhigarg92 commented 1 month ago

@odeke-em I have approved the PR. But Please address the new comments before planning to merge.