Skip to content

feat: add stable id field to log frames for Copy shortlink#654

Open
arturminchukov wants to merge 1 commit into
mainfrom
344-add-support-copy-shortlink-in-vlogs
Open

feat: add stable id field to log frames for Copy shortlink#654
arturminchukov wants to merge 1 commit into
mainfrom
344-add-support-copy-shortlink-in-vlogs

Conversation

@arturminchukov
Copy link
Copy Markdown
Member

@arturminchukov arturminchukov commented May 25, 2026

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 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.

Checklist

The following checks are mandatory:


Summary by cubic

Adds a stable per-row id to log frames so Grafana’s “Copy shortlink” appears next to each log line and resolves to the same row across re-queries. Addresses #344.

  • New Features
    • Generate id as FNV-1a 64-bit hex of _time, _msg, and _stream with NUL separators for boundary safety and deterministic results.
    • Emit id in 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

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.
@arturminchukov arturminchukov self-assigned this May 25, 2026
@arturminchukov arturminchukov linked an issue May 25, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

@arturminchukov arturminchukov requested a review from dmitryk-dk May 25, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support "copy shortlink" in vlogs

1 participant