Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nepridumalnik committed Jan 23, 2025
1 parent a7e2f5b commit dcbf250
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/src/tracing/span.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,13 @@ Span::Impl::~Impl() {
{
const impl::DetachLocalSpansScope ignore_local_span;
logging::LogHelper lh{
logging::GetDefaultLogger(), log_level_, logging::Module{source_location_}, logging::LogClass::kTrace};
logging::GetDefaultLogger(), log_level_, logging::Module{source_location_}, logging::LogClass::kTrace
};
std::move(*this).PutIntoLogger(lh.GetTagWriter());
}
}

[[clang::optnone]]
void Span::Impl::PutIntoLogger(logging::impl::TagWriter writer) && {
const auto steady_now = std::chrono::steady_clock::now();
const auto duration = steady_now - start_steady_time_;
Expand Down
2 changes: 1 addition & 1 deletion otlp/src/otlp/logs/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void Formatter::AddTag(std::string_view key, const logging::LogExtra::Value& val
} else if (key == "timestamp" || key == "text") {
// nothing
} else if (key == "events") {
WriteEventsFromValue(span, value);
WriteEventsFromValue(span, std::get<std::string>(value));
} else {
auto attributes = span.add_attributes();
attributes->set_key(std::string{logger_.MapAttribute(key)});
Expand Down

0 comments on commit dcbf250

Please sign in to comment.