-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add docs for non-indexed labels #10073
Conversation
Co-authored-by: J Stickler <julie.stickler@grafana.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
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.
Left just 2 minor nits. It looks good to me.
Co-authored-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>
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
Co-authored-by: Vladyslav Diachenko <82767850+vlad-diachenko@users.noreply.github.com>
For more information on how to push logs to Loki via the HTTP endpoint, refer to the [HTTP API documentation]({{< relref "../../reference/api#push-log-entries-to-loki" >}}). | ||
|
||
Alternatively, you can use the Grafana Agent or Promtail to extract and attach non-indexed labels to your log lines. | ||
See the [Promtail: Non-indexed labels stage]({{< relref "../../clients/promtail/stages/non-indexed-labels" >}}) for more information. |
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.
🚫 [doc-validator] reported by reviewdog 🐶
The link '{{< relref "../../clients/promtail/stages/non-indexed-labels" >}}' references a page in the project that does not exist.
Check if the page has moved within the repository.
Verify the link by building the docs locally using the make docs
webserver.
Co-authored-by: Vladyslav Diachenko <82767850+vlad-diachenko@users.noreply.github.com>
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.
Looks great! Left some minor improvements.
{job="example"} | trace_id="0242ac120002" | user_id="superUser123" | ||
``` | ||
|
||
Note that since non-indexed labels are extracted automatically to the results labels, some metric queries might return |
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.
If traceid
is driving the number of series. For example, if there are 60000 traceids, how does keep
stage help?
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.
Keep would help with filtering out high-cardinality labels similarly to drop. The example I added here is not illustrating this correctly. I've modified it by:
count_over_time({job="example"} | trace_id="0242ac120002" | keep job [5m])
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.
[Docs team] LGTM
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-10073-to-release-2.9.x origin/release-2.9.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 603eb637f65efed6084ec6050aed552408f28059
# When the conflicts are resolved, stage and commit the changes
git add . && git cherry-pick --continue If you have the GitHub CLI installed: # Create the PR body template
PR_BODY=$(gh pr view 10073 --json body --template 'Backport 603eb637f65efed6084ec6050aed552408f28059 from #10073{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Push the branch to GitHub and a PR
echo "${PR_BODY}" | gh pr create --title "[release-2.9.x] Add docs for non-indexed labels" --body-file - --label "size/L" --label "type/docs" --label "backport" --base release-2.9.x --milestone release-2.9.x --web Or, if you don't have the GitHub CLI installed (we recommend you install it!): # If you don't have the GitHub CLI installed: Push the branch to GitHub and manually create a PR:
git push --set-upstream origin backport-10073-to-release-2.9.x
# Remove the local backport branch
git switch main
git branch -D backport-10073-to-release-2.9.x Unless you've used the GitHub CLI above, now create a pull request where the |
**What this PR does / why we need it**: Adds documentation for the new experimental non-indexed labels feature. --------- Co-authored-by: J Stickler <julie.stickler@grafana.com> Co-authored-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com> Co-authored-by: Vladyslav Diachenko <82767850+vlad-diachenko@users.noreply.github.com> (cherry picked from commit 603eb63) Signed-off-by: Vladyslav Diachenko <vlad.diachenko@grafana.com>
What this PR does / why we need it:
Adds documentation for the new experimental non-indexed labels feature.