You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no good reason to set the attributes only after checking is_recording, except:
when enable_commenter and enable_attribute_commenter are both true
specifically for the statement attribute
assuming that it's important that the initial and final values of the statement attribute are the same.
Otherwise, it's computationally trivial to include those attributes when starting the span. This would allow samplers to exclude spans with particular attributes (especially certain trivial queries which aren't worth tracing), and SpanProcessor.on_start to make use of the attributes.
The text was updated successfully, but these errors were encountered:
In this code:
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py
Lines 270 to 321 in 59cc34e
There's no good reason to set the attributes only after checking
is_recording
, except:enable_commenter
andenable_attribute_commenter
are both trueOtherwise, it's computationally trivial to include those attributes when starting the span. This would allow samplers to exclude spans with particular attributes (especially certain trivial queries which aren't worth tracing), and
SpanProcessor.on_start
to make use of the attributes.The text was updated successfully, but these errors were encountered: