Skip to content
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

docs: Logcli tutorial and sandbox #15152

Merged
merged 19 commits into from
Dec 11, 2024
Merged

docs: Logcli tutorial and sandbox #15152

merged 19 commits into from
Dec 11, 2024

Conversation

Jayclifford345
Copy link
Contributor

What this PR does / why we need it:
This sandbox adds a new LogCLI tutorial based on a fun scenario using logs themed from a logistics centre.

The PR also modifies the directory structure to accommodate and adds the detected-fields option to the reference.

Here is the sandbox to try: https://killercoda.com/grafana-dev-testing/course/loki/logcli-tutorial

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@Jayclifford345 Jayclifford345 requested a review from a team as a code owner November 27, 2024 14:42
@Jayclifford345 Jayclifford345 self-assigned this Nov 27, 2024
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Nov 27, 2024
@Jayclifford345 Jayclifford345 removed their assignment Nov 27, 2024
Copy link
Collaborator

@trevorwhitney trevorwhitney left a comment

Choose a reason for hiding this comment

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

This looks great! I think another section we could add is batch querying lots of logs. This is something logcli is great for, that you can't actually do well in another tool like Grafana.

Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

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

[Docs team] I haven't had a chance to walk through the killercoda tutorial yet, I've just read through the text, but wanted to give you the feedback ASAP.

Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

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

Had time to run through the sandbox today. There were a couple of odd results....

@Jayclifford345
Copy link
Contributor Author

Hi @JStickler so sorry i forgot to mention I was at Reinvent fully agree with your original review so still fixing those comments and let me check to see what is happening with the killercoda scenario as I am also seeing that but not locally.

@Jayclifford345
Copy link
Contributor Author

Hi @JStickler, that should be the edit complete and the suggestions added. Just a couple of things to note:

  1. Found the route cause of the loki stats returning 0 results. So it appears we only receive stats when Loki needs to return logs from disk or object storage. In our case the demo never does this intime because of the default flush. I have modified the loki config to flush every 5 minutes which isn't best practise but for the purpose of the demo it gives us the result we want. I added a note to let the user know not to do this in production/
  2. That should be the wording updated for those sections. Let me know if it sounds better as I agree on return read it didn't make much sense :D.
  3. I sneaked in an extra example for the log_volume as found out you could group the bins by a label which is pretty cool.

Here is the updated sandbox for your review: https://killercoda.com/grafana-dev-testing/course/loki/logcli-tutorial

Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

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

[docs team] Spotted a couple more things on this review, but I think we're getting very close to finished.

@Jayclifford345
Copy link
Contributor Author

Hi @JStickler,
That should be the latest changes in and ready for your review:
https://killercoda.com/grafana-dev-testing/course/loki/logcli-tutorial

Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

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

[docs team]

@Jayclifford345
Copy link
Contributor Author

Changes ready and waiting for your review @JStickler :)

Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

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

[docs team] LGTM

@loki-gh-app
Copy link
Contributor

loki-gh-app bot commented Dec 11, 2024

This PR must be merged before a backport PR will be created.

1 similar comment
@loki-gh-app
Copy link
Contributor

loki-gh-app bot commented Dec 11, 2024

This PR must be merged before a backport PR will be created.

@JStickler JStickler merged commit 1b4363a into main Dec 11, 2024
63 checks passed
@JStickler JStickler deleted the logcli-sandbox branch December 11, 2024 19:13
loki-gh-app bot pushed a commit that referenced this pull request Dec 11, 2024
Co-authored-by: Trevor Whitney <[email protected]>
Co-authored-by: J Stickler <[email protected]>
(cherry picked from commit 1b4363a)
loki-gh-app bot pushed a commit that referenced this pull request Dec 11, 2024
Co-authored-by: Trevor Whitney <[email protected]>
Co-authored-by: J Stickler <[email protected]>
(cherry picked from commit 1b4363a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-3.2.x backport release-3.3.x size/XL type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants