GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(observability): more descriptive and value adding spans by odeke-em · Pull Request #1241 · googleapis/python-spanner
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
Conversation
|
|
Kindly help me take a look @harshachinta and help me run the bots afresh! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if span: | ||
| span.add_event("Starting BeginTransaction") | ||
| txn = api.begin_transaction( | ||
| session=session.name, options=txn_options, metadata=metadata | ||
| ) | ||
| if span: | ||
| span.add_event( | ||
| "Completed BeginTransaction", {"transaction.id": txn.id} | ||
| ) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@harshachinta please take a look.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@harshachinta kindly help me run the bots one more time, I sent up a fix! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
8d613ee to
f767159
Compare
There was an error while loading. Please reload this page.
| if isinstance(observability_options, dict): | ||
| observability_options["db_name"] = self.name |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think we can do a much simpler thing instead of adding db_name manually at every place.
We have configured a @Property for observability_options in database.py
| def observability_options(self): |
Can we add a new field, db_name, to observability_options if it already exists? If the customer does not provide any observability_options, we can create a new dictionary with this field. With this we need not do it at multiple places, WDYT?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if isinstance(observability_options, dict): | ||
| observability_options["db_name"] = self.name | ||
| with trace_call( | ||
| "CloudSpanner.execute_partitioned_pdml", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The problem i see here is with every retry there will be a new span parent CloudSpanner.execute_partitioned_pdml which does not indicate that a retry is happening.
Instead we should capture the retries with in only one parent span CloudSpanner.execute_partitioned_pdml.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
beb8bb9 to
d297b66
Compare
be40273 to
47ffdfc
Compare
cd4a8b1 to
4829a9a
Compare
8d6dad0 to
eecca2e
Compare
204067a to
847d89b
Compare
This change carves out parts of PR googleapis#1241 in smaller pieces to ease with smaller reviews. This change adds more span events, updates important spans to make them more distinct like changing: "CloudSpanner.ReadWriteTransaction" to more direct and more pointed spans like: * CloudSpanner.Transaction.execute_streaming_sql Also added important spans: * CloudSpanner.Database.run_in_transaction * CloudSpanner.Session.run_in_transaction
This change carves out parts of PR googleapis#1241 in smaller pieces to ease with smaller reviews. This change adds more span events, updates important spans to make them more distinct like changing: "CloudSpanner.ReadWriteTransaction" to more direct and more pointed spans like: * CloudSpanner.Transaction.execute_streaming_sql Also added important spans: * CloudSpanner.Database.run_in_transaction * CloudSpanner.Session.run_in_transaction
This change carves out parts of PR googleapis#1241 in smaller pieces to ease with smaller reviews. This change adds more span events, updates important spans to make them more distinct like changing: "CloudSpanner.ReadWriteTransaction" to more direct and more pointed spans like: * CloudSpanner.Transaction.execute_streaming_sql Also added important spans: * CloudSpanner.Database.run_in_transaction * CloudSpanner.Session.run_in_transaction
This change carves out parts of PR googleapis#1241 in smaller pieces to ease with smaller reviews. This change adds more span events, updates important spans to make them more distinct like changing: "CloudSpanner.ReadWriteTransaction" to more direct and more pointed spans like: * CloudSpanner.Transaction.execute_streaming_sql Also added important spans: * CloudSpanner.Database.run_in_transaction * CloudSpanner.Session.run_in_transaction
This change carves out parts of PR googleapis#1241 in smaller pieces to ease with smaller reviews. This change adds more span events, updates important spans to make them more distinct like changing: "CloudSpanner.ReadWriteTransaction" to more direct and more pointed spans like: * CloudSpanner.Transaction.execute_streaming_sql Also added important spans: * CloudSpanner.Database.run_in_transaction * CloudSpanner.Session.run_in_transaction
This change carves out parts of PR googleapis#1241 in smaller pieces to ease with smaller reviews. This change adds more span events, updates important spans to make them more distinct like changing: "CloudSpanner.ReadWriteTransaction" to more direct and more pointed spans like: * CloudSpanner.Transaction.execute_streaming_sql Also added important spans: * CloudSpanner.Database.run_in_transaction * CloudSpanner.Session.run_in_transaction
* observability: add updated span events + traace more methods This change carves out parts of PR #1241 in smaller pieces to ease with smaller reviews. This change adds more span events, updates important spans to make them more distinct like changing: "CloudSpanner.ReadWriteTransaction" to more direct and more pointed spans like: * CloudSpanner.Transaction.execute_streaming_sql Also added important spans: * CloudSpanner.Database.run_in_transaction * CloudSpanner.Session.run_in_transaction * all: update review comments + show type for BeginTransaction + remove prints * Remove requested span event "Using Transaction" * Move attempts into try block * Transform Session.run_in_transaction retry exceptions into events * More comprehensive test for events and attributes for pool.get * Add test guards against Python3.7 for which OpenTelemetry is unavailable + address test feedback * Remove span event per mutation in favour of future TODO Referencing issue #1269, this update removes adding a span event per mutation, in favour of a future TODO. * Sort system-test.test_transaction_abort_then_retry_spans spans by create time * Delint tests
This change adds more descriptive and value adding spans to replace the generic CloudSpanner.ReadWriteTransaction. With this change, we add new spans: * CloudSpanner.Database.run_in_transaction * CloudSpanner.execute_pdml * CloudSpanner.execute_sql * CloudSpanner.execute_update
847d89b to
f28ed47
Compare
This change adds spans for Partitioned DML and making updates for Batch. Carved out from PR googleapis#1241.
This change adds spans for Partitioned DML and making updates for Batch. Carved out from PR googleapis#1241.
* observability: add updated span events + traace more methods This change carves out parts of PR googleapis#1241 in smaller pieces to ease with smaller reviews. This change adds more span events, updates important spans to make them more distinct like changing: "CloudSpanner.ReadWriteTransaction" to more direct and more pointed spans like: * CloudSpanner.Transaction.execute_streaming_sql Also added important spans: * CloudSpanner.Database.run_in_transaction * CloudSpanner.Session.run_in_transaction * all: update review comments + show type for BeginTransaction + remove prints * Remove requested span event "Using Transaction" * Move attempts into try block * Transform Session.run_in_transaction retry exceptions into events * More comprehensive test for events and attributes for pool.get * Add test guards against Python3.7 for which OpenTelemetry is unavailable + address test feedback * Remove span event per mutation in favour of future TODO Referencing issue #1269, this update removes adding a span event per mutation, in favour of a future TODO. * Sort system-test.test_transaction_abort_then_retry_spans spans by create time * Delint tests
This change adds spans for Partitioned DML and making updates for Batch. Carved out from PR googleapis#1241.
This change adds spans for Partitioned DML and making updates for Batch. Carved out from PR googleapis#1241.
* observability: PDML + some batch write spans This change adds spans for Partitioned DML and making updates for Batch. Carved out from PR #1241. * Add more system tests * Account for lack of OpenTelemetry on Python-3.7 * Update tests * Fix more test assertions * Updates from code review * Update tests with code review suggestions * Remove return per code review nit
|
Was split up but can be revived if needed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.