tracing: using package with import errors is unreasoanable and defeats the purpose of adding instrumentation if a feature should be programmed without even dependencies #1225
Labels
api: spanner
Issues related to the googleapis/python-spanner API.
python-spanner/google/cloud/spanner_v1/_opentelemetry_tracing.py
Lines 20 to 32 in e15e84f
to me is a very unreasonable condition because we say that these libraries are traced meanwhile on just a single failed import, we work around this and then return None for spans. Why not fail loudly when dependencies are not correctly installed? This feels more like a kludge and customers can falsely use the package thinking they are exporting spans: no other language instrumentations work like this: if a customer doesn't want OpenTelemetry, let them disable it but that should not leak into our code, because OpenTelemetry-Python will provide a NoopSpan. Ensuring that the imports work correctly should be a pre-requisite.
Kindly cc-ing @harshachinta @sakthivelmanii @surbhigarg92 @alkatrivedi
The text was updated successfully, but these errors were encountered: