Skip to content

Commit

Permalink
Do not call TypeName if trace is not used.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherednik committed Jan 31, 2024
1 parent 736e7ff commit 6633aca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ydb/core/tx/datashard/datashard_pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1729,9 +1729,11 @@ EExecutionStatus TPipeline::RunExecutionPlan(TOperation::TPtr op,
auto status = unit.Execute(op, txc, ctx);
op->AddExecutionTime(timer.GetTime());

unitSpan.Attribute("Type", TypeName(unit))
.Attribute("Status", static_cast<int>(status))
.EndOk();
if (unitSpan) {
unitSpan.Attribute("Type", TypeName(unit))
.Attribute("Status", static_cast<int>(status))
.EndOk();
}

LOG_TRACE_S(ctx, NKikimrServices::TX_DATASHARD,
"Execution status for " << *op << " at " << Self->TabletID()
Expand Down

0 comments on commit 6633aca

Please sign in to comment.