summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/logging/backends/arcadia/backend.cpp
Commit message (Collapse)AuthorAgeFilesLines
* YT-28451: Add tagged logging API and opaque event payloadbabenko11 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace `TLogEvent::MessageRef` with an opaque `Payload` that carries the message together with structured key/value tags, deferring tag rendering to the consumer (logging thread). - Add the `TTaggedPayloadWriter`/`TTaggedPayloadReader` codec (`NDetail`), with a per-thread chunk-cached builder so tagged logging does no per-message heap allocation. - Model the payload as a typed `TLogEventPayload` — a `std::variant` of the opaque strong typedefs `TTaggedLogEventPayload` and `TStructuredLogEventPayload` (each over `TSharedRef`). The active alternative identifies the event kind, so the separate `ELogMessageKind` enum and `TLogEvent::MessageKind` field are removed; consumers dispatch via `std::holds_alternative`/`std::get` instead of a tag. - Add the fluent `YT_TLOG_*` API: `YT_TLOG_INFO("Message").With(key, value)` and `.With(key, value, "%spec")`; disabled levels skip argument evaluation. - Add well-known tags: `.With(value)` attaches a value under a statically known key resolved by ADL (e.g. `.With(error)` for the `Error` tag). - Teach the plain-text and structured formatters to render tags; add the `enable_native_tags` knob to emit tags into a nested structured attribute. - Add producer-side benchmarks. The tagged API is cheaper than `YT_LOG_*` for tagged calls and on par for tag-free ones: #| || **Producer call** | **`YT_LOG_*`** | **`YT_TLOG_*`** | **Δ** || || no tags | 81 ns | 82 ns | +2% || || 1 tag | 124 ns | 88 ns | -29% || || 2 tags | 140 ns | 101 ns | -28% || || 3 tags | 372 ns | 283 ns | -24% || |# -- #| || **<a href="https://nda.ya.ru/t/p0sVNSOC7ijzFF" target="_blank">![](https://nda.ya.ru/t/mAiQIjHx7Mm3JC =30x) Echo tests</a>** || |# commit_hash:70efc90e5c2b71e5311415a4e4508db42ff28971
* YT-19210: expose YQL shared library for YT.max422023-07-291-0/+86
After this, a new target libyqlplugin.so appears. in open-source cmake build. Diff in open-source YDB repo looks like the following: https://paste.yandex-team.ru/f302bdb4-7ef2-4362-91c7-6ca45f329264