feat: add LogsSample supplemental query, remove deprecated getDataProvider#1744
Open
karl-power wants to merge 2 commits intografana:mainfrom
Open
feat: add LogsSample supplemental query, remove deprecated getDataProvider#1744karl-power wants to merge 2 commits intografana:mainfrom
karl-power wants to merge 2 commits intografana:mainfrom
Conversation
SpencerTorres
approved these changes
Mar 27, 2026
Collaborator
SpencerTorres
left a comment
There was a problem hiding this comment.
super cool, thanks for getting this working 🚀
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.
Closes #715
Summary
Add
LogsSamplesupport — when a user runs a Builder-mode query against the configured default logs table, Grafana's Explore view now shows sample log lines beneath the metric chart. The newgetSupplementaryLogsSampleQuery()method generates aSELECT *-style Logs/List query using columns fromgetDefaultLogsColumns(), copies and resolves hint-based filters from the original query, orders results DESC by time, and limits to 100 rows.Migrate
getDataProvider→getSupplementaryRequest— replaces the deprecatedgetDataProvider()API (which returned anObservable) withgetSupplementaryRequest()(which returns a modifiedDataQueryRequest). Grafana handles execution; the plugin only transforms the request. As part of this,refIdstamping withlog-volume-/logs-sample-prefixes now happens insidegetSupplementaryRequest.Extract
splitLogsVolumeFramesfromqueryLogsVolume— the frame-splitting logic (which turns a multi-column logs-volume response into per-level[Time, Value]frames consumable by the histogram panel) is now a pure standalone function inlogs.ts. It is applied in thequery()response pipeline when logs-volume targets are detected.Video
Untitled.mov
Notes