Skip to content

Commit fb73633

Browse files
author
gryzlov-ad
committed
Fix performance metrics calculation
commit_hash:76c815f99ca3dbc4d6a0cdb71dc49d3082446f62
1 parent 376f6f4 commit fb73633

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

yt/yt/core/tracing/trace_context.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ TSpanContext TTraceContext::GetSpanContext() const
377377
.TraceId = GetTraceId(),
378378
.SpanId = GetSpanId(),
379379
.Sampled = IsSampled(),
380-
.Debug = Debug_,
380+
.Debug = IsDebug(),
381381
};
382382
}
383383

@@ -476,12 +476,18 @@ void TTraceContext::AddProfilingTag(const std::string& name, i64 value)
476476
ProfilingTags_.emplace_back(name, value);
477477
}
478478

479-
std::vector<std::pair<std::string, std::variant<std::string, i64>>> TTraceContext::GetProfilingTags()
479+
std::vector<std::pair<std::string, TTraceContext::TProfilingTagValue>> TTraceContext::GetProfilingTags()
480480
{
481481
auto guard = Guard(Lock_);
482482
return ProfilingTags_;
483483
}
484484

485+
void TTraceContext::SetProfilingTags(std::vector<std::pair<std::string, TTraceContext::TProfilingTagValue>> profilingTags)
486+
{
487+
auto guard = Guard(Lock_);
488+
ProfilingTags_ = std::move(profilingTags);
489+
}
490+
485491
bool TTraceContext::AddAsyncChild(TTraceId traceId)
486492
{
487493
if (!IsRecorded()) {

yt/yt/core/tracing/trace_context.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ class TTraceContext
213213

214214
using TProfilingTagValue = std::variant<std::string, i64>;
215215
std::vector<std::pair<std::string, TProfilingTagValue>> GetProfilingTags();
216+
void SetProfilingTags(std::vector<std::pair<std::string, TProfilingTagValue>> profilingTags);
216217

217218
friend void ToProto(NProto::TTracingExt* ext, const TTraceContextPtr& context);
218219

0 commit comments

Comments
 (0)