diff options
| -rw-r--r-- | yt/yt/core/misc/error.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/yt/yt/core/misc/error.cpp b/yt/yt/core/misc/error.cpp index c4de07c2bf5..0fc60af3d4f 100644 --- a/yt/yt/core/misc/error.cpp +++ b/yt/yt/core/misc/error.cpp @@ -336,12 +336,12 @@ void Serialize( .Item("attributes").DoMap([&] (auto fluent) { if (error.HasOriginAttributes()) { fluent - .Item("host").Value(GetHost(error)) .Item("pid").Value(error.GetPid()) .Item("tid").Value(error.GetTid()) .Item("thread").Value(error.GetThreadName()) .Item("fid").Value(GetFid(error)); - } else if (IsErrorSanitizerEnabled() && HasHost(error)) { + } + if (HasHost(error)) { fluent .Item("host").Value(GetHost(error)); } @@ -455,9 +455,6 @@ void ToProto(NYT::NProto::TError* protoError, const TError& error) }; if (error.HasOriginAttributes()) { - static const TString HostKey("host"); - addAttribute(HostKey, GetHost(error)); - static const TString PidKey("pid"); addAttribute(PidKey, error.GetPid()); @@ -469,7 +466,9 @@ void ToProto(NYT::NProto::TError* protoError, const TError& error) static const TString FidKey("fid"); addAttribute(FidKey, GetFid(error)); - } else if (IsErrorSanitizerEnabled() && HasHost(error)) { + } + + if (HasHost(error)) { static const TString HostKey("host"); addAttribute(HostKey, GetHost(error)); } |
