Skip to content

Commit

Permalink
Do not call TypeName for trace in tablet transactions if no trace exi…
Browse files Browse the repository at this point in the history
…sts (#1867)

Fixes #1859
  • Loading branch information
SammyVimes authored Feb 12, 2024
1 parent e7c0e8c commit 1dd1ce1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ydb/core/tablet_flat/tablet_flat_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,17 @@ class ITransaction : TNonCopyable {
out << TypeName(*this);
}

virtual void SetupTxSpanName() noexcept {
TxSpan.Attribute("Type", TypeName(*this));
void SetupTxSpanName() noexcept {
if (TxSpan) {
TxSpan.Attribute("Type", TypeName(*this));
}
}

void SetupTxSpan(NWilson::TTraceId traceId) noexcept {
TxSpan = NWilson::TSpan(TWilsonTablet::Tablet, std::move(traceId), "Tablet.Transaction");
TxSpan.Attribute("Type", TypeName(*this));
if (TxSpan) {
TxSpan.Attribute("Type", TypeName(*this));
}
}

public:
Expand Down

0 comments on commit 1dd1ce1

Please sign in to comment.