Repository navigation
refactor(json)!: rename JsonLayout kvs and diags fields to attributes and context - #313
Merged
Merged
Conversation
… and context Rename the serialized JSON sub-objects for structured record key-values and diagnostics in `JsonLayout` from `"kvs"` and `"diags"` to `"attributes"` and `"context"`. Using semantic field names (`"attributes"` for event properties, matching the OpenTelemetry Log Data Model, and `"context"` for ambient diagnostic metadata) avoids leaking internal data-structure and trait shorthand into external JSON log schemas. Signed-off-by: tison <wander4096@gmail.com>
Replace undefined "envelope" terminology across `JsonLayout`, `GoogleCloudLoggingLayout`, `Journald`, `appenders/syslog/README.md`, and `DESIGN.md` with standard domain terms (`top-level fields`, `standard journal fields`, and `Syslog header`), remove internal buffer/allocation implementation details from `JsonLayout` rustdoc, and elide the explicit lifetime parameter on `valid_id` in `GoogleCloudLoggingLayout`. Signed-off-by: tison <wander4096@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rename
JsonLayout's serialized JSON sub-objects for structured record key-values and diagnostics from"kvs"and"diags"to"attributes"and"context", and clean up layout/appender documentation to focus strictly on observable contracts."kvs"describes a data structure rather than event semantics, and"diags"exposes internal trait shorthand in external JSON log schemas."attributes"(aligned with the OpenTelemetry Log Data Model) and"context"communicate the distinction between per-event properties and ambient execution metadata directly to log consumers.Changes
logforth-layout-json:Record::key_values()under"attributes"andDiagnosticentries under"context"(each still omitted when empty).# Structured Fields) and crateREADME.md, removing undefined"envelope"terminology and internal buffer/allocation implementation details."envelope"phrasing inGoogleCloudLoggingLayout,Journald(standard journal fields),appenders/syslog/README.md(Syslog header), andDESIGN.md(Reserved Top-Level Fields), and elide the explicit lifetime onvalid_idinGoogleCloudLoggingLayout.README.md,CHANGELOG.md, and integration assertions inlayout_test::json,append_test::file, andlogforth_test::pipeline.