tracing: trace_call returns None if opentelemetry is not enabled or if no session but that makes it awkward to seamlessly use library, it should return a NoopSpan #1200
Labels
api: spanner
Issues related to the googleapis/python-spanner API.
If we examine the code for trace_call it returns None
python-spanner/google/cloud/spanner_v1/_opentelemetry_tracing.py
Lines 32 to 36 in a941adb
and when we try to perform what should be a simple thing like add annotations, we have to awkwardly check
if span is not None
and that's not a good user experience.Remedy
The text was updated successfully, but these errors were encountered: