| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
|
Kindly cc-ing you @harshachinta. |
Sorry, something went wrong.
|
Kindly please take another look @harshachinta, feedback addressed, thank you for the code review! |
Sorry, something went wrong.
| ) | ||
|
|
||
| if requested_session_count > 0: | ||
| current_span.add_event( |
There was a problem hiding this comment.
current_span is not initialized.
Sorry, something went wrong.
There was a problem hiding this comment.
Sheesh, sorry I had a bunch of benchmarks running locally and they interrupted my nox -s unit-3.8 tests so didn't see those but all fixed now.
Sorry, something went wrong.
| if self._transaction_id is None and len(self._mutations) > 0: | ||
| self.begin() |
There was a problem hiding this comment.
| if self._transaction_id is None and len(self._mutations) > 0: | |
| self.begin() |
Why is this added here? This is already getting executed in the beginning of commit() call, so not needed
Sorry, something went wrong.
| ) | ||
| session = self._sessions.get(block=True, timeout=timeout) | ||
| except queue.Empty as e: | ||
| add_span_event(current_span, "No session available", span_event_attributes) |
There was a problem hiding this comment.
| add_span_event(current_span, "No session available", span_event_attributes) | |
| add_span_event(current_span, "No session available in the pool", span_event_attributes) |
Sorry, something went wrong.
| "exception", | ||
| "exception", |
There was a problem hiding this comment.
why are there 2 exception events?
Sorry, something went wrong.
There was a problem hiding this comment.
It is a quirk with opentelemetry-python; they add "exception" on every exit call whether or not you set your own, I'll file a bug later on but for now I'll just remove our explicit invocation of "span.record_exception" and instead add our comment.
Sorry, something went wrong.
|
Thank you @harshachinta for the review, I've addressed the feedback. Please take a look again. |
Sorry, something went wrong.
|
@harshachinta kindly help me run the bots. |
Sorry, something went wrong.
There was a problem hiding this comment.
Please fix lint
Sorry, something went wrong.
| yield span | ||
| except Exception as error: | ||
| span.set_status(Status(StatusCode.ERROR, str(error))) | ||
| span.record_exception(error) |
There was a problem hiding this comment.
Lets not remove this exception. We are not sure if there are any cases where the span will end up not recording an exception.
I would suggest adding this back here and let us discuss more during our demo.
Sorry, something went wrong.
There was a problem hiding this comment.
Also I was wondering that this behavior of exception getting added twice was not seen earlier since this code exists from very long.
Sorry, something went wrong.
There was a problem hiding this comment.
It's because OpenTelemetry was upgraded only recently.
Sorry, something went wrong.
There was a problem hiding this comment.
We do have locked tests to check for the exceptions to ensure that they are in there and from Span.enter. I had to dive back into OpenTelemetry-Python's code as it isn't even documented and in our demos it was very distracting to have mysteriously both errors. I think for the sake of our sanity and project stability let's leave that comment in and if anything happens it is a trivial one to add back @harshachinta
Sorry, something went wrong.
There was a problem hiding this comment.
Hmm. But the opentelemetry documentation for Python guides to record exception for instrumentation libraries.
https://opentelemetry.io/docs/languages/python/instrumentation/#record-exceptions-in-spans
Can you share the code pointer on where the opentelemetry records exception by default when exiting?
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
@harshachinta it was the cause of us seeing 2 exceptions and took a ton of confusion and time for me to debug, they don't seem to document this condition.
Sorry, something went wrong.
|
@harshachinta kindly help me re-run the bots; all unit tests pass locally. |
Sorry, something went wrong.
This change adds annotations for session and session pool events to aid customers in debugging latency issues with session pool malevolence and also for maintainers to figure out which session pool type is the most appropriate. Updates googleapis#1170
| Back | FazBrowse Home | New Git URL |
This change adds annotations for session and session pool events to aid customers in debugging latency issues with session pool malevolence and also for maintainers to figure out which session pool type is the most appropriate.
Updates #1170
BEGIN_COMMIT_OVERRIDE
feat: add additional opentelemetry span events for session pool
END_COMMIT_OVERRIDE