-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logs: Update logic to process logs dataPlane frame with labels field #77708
Conversation
Hello @ivanahuckova!
Please, if the current pull request addresses a bug fix, label it with the |
Hello @ivanahuckova!
Please, if the current pull request addresses a bug fix, label it with the |
nice work 👍 . i did not run it, but the changes look good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Tested functionality and everything seems to work properly!
|
||
// the attributes-access is a little awkward, but it's necessary | ||
// because there are multiple,very different dataframe-represenations. | ||
// because there are multiple,very different dataFrame-representations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
|
||
// the attributes-access is a little awkward, but it's necessary | ||
// because there are multiple,very different dataframe-represenations. | ||
// because there are multiple,very different dataFrame-representations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// because there are multiple,very different dataFrame-representations. | |
// because there are multiple, very different dataFrame representations. |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-77708-to-v10.1.x origin/v10.1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x d4a257bc8ed5e4a55100a47ac7f1a079aa9375d6 When the conflicts are resolved, stage and commit the changes:
If you have the GitHub CLI installed: # Push the branch to GitHub:
git push --set-upstream origin backport-77708-to-v10.1.x
# Create the PR body template
PR_BODY=$(gh pr view 77708 --json body --template 'Backport d4a257bc8ed5e4a55100a47ac7f1a079aa9375d6 from #77708{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v10.1.x] Logs: Update logic to process logs dataPlane frame with labels field" --body-file - --label "area/backend" --label "area/explore" --label "area/frontend" --label "datasource/Loki" --label "add to changelog" --label "missing-labels" --label "backport" --base v10.1.x --milestone 10.1.x --web Or, if you don't have the GitHub CLI installed (we recommend you install it!): # Push the branch to GitHub:
git push --set-upstream origin backport-77708-to-v10.1.x
# Create a pull request where the `base` branch is `v10.1.x` and the `compare`/`head` branch is `backport-77708-to-v10.1.x`.
# Remove the local backport branch
git switch main
git branch -D backport-77708-to-v10.1.x |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-77708-to-v10.2.x origin/v10.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x d4a257bc8ed5e4a55100a47ac7f1a079aa9375d6 When the conflicts are resolved, stage and commit the changes:
If you have the GitHub CLI installed: # Push the branch to GitHub:
git push --set-upstream origin backport-77708-to-v10.2.x
# Create the PR body template
PR_BODY=$(gh pr view 77708 --json body --template 'Backport d4a257bc8ed5e4a55100a47ac7f1a079aa9375d6 from #77708{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v10.2.x] Logs: Update logic to process logs dataPlane frame with labels field" --body-file - --label "area/backend" --label "area/explore" --label "area/frontend" --label "datasource/Loki" --label "add to changelog" --label "missing-labels" --label "backport" --base v10.2.x --milestone 10.2.x --web Or, if you don't have the GitHub CLI installed (we recommend you install it!): # Push the branch to GitHub:
git push --set-upstream origin backport-77708-to-v10.2.x
# Create a pull request where the `base` branch is `v10.2.x` and the `compare`/`head` branch is `backport-77708-to-v10.2.x`.
# Remove the local backport branch
git switch main
git branch -D backport-77708-to-v10.2.x |
Building upon the discussion from grafana/dataplane#37, where there have been updates to the logs dataPlane format (still in its proposal/early stage, subject to further changes) - specifically the renaming of
attributes
tolabels
. This PR focuses on updating the logic in Grafana. This update ensures that Grafana can correctly read data frames from the logs data plane, now including thelabels
field.This change was implemented both in Grafana and Loki to facilitate testing of the updated logic (it's important to note that this feature in Loki is currently behind a toggle switch)
To test this logic, please follow these steps:
lokiLogsDataplane
in yourcustom.ini
configuration file, setting it totrue
.lokiLogsDataplane
set tofalse
.This testing will help ensure that the new logic and dataPlane format changes work as intended and do not disrupt the existing functionality.
When this is merged, I'll reach out to release team and product to agree on if this can be backported to both 10.1 and 10.2