[improvement](tracing) Remove useless span levels from be side tracing (#19665)

1. Remove an exec node method corresponding to a span and replace it with an exec node corresponding to a span;
2. Fix some problems with tracing in pipeline.
This commit is contained in:
luozenglin
2023-05-17 19:04:52 +08:00
committed by GitHub
parent ce12cf404c
commit 272a7565b8
37 changed files with 143 additions and 320 deletions

View File

@ -120,6 +120,8 @@ Status ExecNode::init(const TPlanNode& tnode, RuntimeState* state) {
Status ExecNode::prepare(RuntimeState* state) {
DCHECK(_runtime_profile.get() != nullptr);
_span = state->get_tracer()->StartSpan(get_name());
OpentelemetryScope scope {_span};
_rows_returned_counter = ADD_COUNTER(_runtime_profile, "RowsReturned", TUnit::UNIT);
_projection_timer = ADD_TIMER(_runtime_profile, "ProjectionTime");
_rows_returned_rate = runtime_profile()->add_derived_counter(
@ -182,7 +184,7 @@ void ExecNode::release_resource(doris::RuntimeState* state) {
}
vectorized::VExpr::close(_projections, state);
runtime_profile()->add_to_span();
runtime_profile()->add_to_span(_span);
_is_resource_released = true;
}
}