feat: add stable id field to log frames for Copy shortlink#654
Open
arturminchukov wants to merge 1 commit into
Open
feat: add stable id field to log frames for Copy shortlink#654arturminchukov wants to merge 1 commit into
arturminchukov wants to merge 1 commit into
Conversation
Grafana's built-in "Copy shortlink" action next to each log line is gated on the presence of a stable `id` field in the data frame. parseInstantResponse and parseStreamResponse now compute id = FNV-1a64 hex of (_time | _msg | _stream) and emit it alongside Time/Line/labels. The hash uses a NUL separator between fields to avoid prefix-boundary collisions and is deterministic across re-queries, so a copied permalink resolves to the same log row.
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.
Related issue: #344
Describe Your Changes
Grafana's built-in "Copy shortlink" action next to each log line is gated on the presence of a stable
idfield in the data frame.parseInstantResponseandparseStreamResponsenow computeid = FNV-1a64 hex of (_time | _msg | _stream)and emit it alongsideTime/Line/labels. The hash uses a NUL separator between fields to avoid prefix-boundary collisions and is deterministic across re-queries, so a copied permalink resolves to the same log row.Checklist
The following checks are mandatory:
Summary by cubic
Adds a stable per-row
idto log frames so Grafana’s “Copy shortlink” appears next to each log line and resolves to the same row across re-queries. Addresses #344.idas FNV-1a 64-bit hex of_time,_msg, and_streamwith NUL separators for boundary safety and deterministic results.idin both instant and stream responses (parseInstantResponse,parseStreamResponse), and update tests to cover stability and frame shape.Written for commit 18d927a. Summary will update on new commits. Review in cubic