If we examine the code for trace_call it returns None
|
def trace_call(name, session, extra_attributes=None): |
|
if not HAS_OPENTELEMETRY_INSTALLED or not session: |
|
# Empty context manager. Users will have to check if the generated value is None or a span |
|
yield None |
|
return |
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