Skip to content

docs: add monitoring chapter for status & prometheus#505

Merged
creativeprojects merged 1 commit intomasterfrom
docs-monitoring-chapter
May 19, 2025
Merged

docs: add monitoring chapter for status & prometheus#505
creativeprojects merged 1 commit intomasterfrom
docs-monitoring-chapter

Conversation

@creativeprojects
Copy link
Copy Markdown
Owner

  • add monitoring chapter for status & prometheus
  • add aliases to link old status url back to new one
  • add tags in documentation
  • rephrased status and prometheus documentation

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented May 19, 2025

Walkthrough

The changes update documentation structure and content, refine configuration examples, and modify a method signature in the codebase. Documentation for monitoring features is reorganised and clarified, new metadata tags are introduced for better categorisation, and configuration hooks are expanded in an example YAML file. A method in the Go code is updated to improve integration with embedded logic.

Changes

File(s) Change Summary
config/profile.go Updated the InitSection.setRootPath method signature to accept a *Profile parameter and call the embedded GenericSection's setRootPath method, integrating root path logic.
docs/content/_index.md Updated documentation links for "status file" and "prometheus" features to new /monitoring/ paths.
docs/content/configuration/http_hooks.md
docs/content/configuration/run_hooks.md
Added metadata tags to the front matter for improved categorisation (monitoring, healthchecks.io).
docs/content/monitoring/_index.md Added a new Markdown file to introduce a "Monitoring" documentation chapter with hierarchical organisation.
docs/content/monitoring/prometheus.md Improved Prometheus integration documentation: revised front matter, clarified text, updated example metrics, and improved formatting.
docs/content/monitoring/status.md Refined status file documentation with clearer explanations, streamlined instructions, new metadata, and improved formatting.
docs/hugo.toml Uncommented the "Tags" menu entry in the Hugo configuration for documentation navigation.
examples/dev.yaml Expanded the self profile's check and init sections with additional hooks (run-before, run-after, send-before, send-after) and commented out the prometheus-labels in the prom profile.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant InitSection
    participant GenericSection
    participant Profile

    User->>InitSection: setRootPath(Profile, rootPath)
    InitSection->>GenericSection: setRootPath(Profile, rootPath)
    GenericSection-->>InitSection: (returns)
    InitSection->>InitSection: Fix FromRepositoryFile/FromPasswordFile paths
Loading

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
docs/content/_index.md (2)

26-26: Update status file link to new monitoring path. The link has been changed to /monitoring/status, but for consistency with other relref usages, consider removing the leading slash:

- * Generate a simple [status file]({{% relref "/monitoring/status" %}}) …
+ * Generate a simple [status file]({{% relref "monitoring/status" %}}) …

29-29: Update Prometheus link to new monitoring path. Similarly, remove the leading slash in the relref to match established conventions:

- * Export a [prometheus]({{% relref "/monitoring/prometheus" %}}) …
+ * Export a [prometheus]({{% relref "monitoring/prometheus" %}}) …
docs/content/monitoring/prometheus.md (1)

87-130: Missing code block language specifier.

The fenced code block should specify the language for proper syntax highlighting. Additionally, the example has been helpfully updated with current version numbers and the addition of the missing restic_build_info metric.

-```
+```prometheus
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

87-87: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 43b6c84 and 28c078a.

📒 Files selected for processing (9)
  • config/profile.go (1 hunks)
  • docs/content/_index.md (1 hunks)
  • docs/content/configuration/http_hooks.md (1 hunks)
  • docs/content/configuration/run_hooks.md (1 hunks)
  • docs/content/monitoring/_index.md (1 hunks)
  • docs/content/monitoring/prometheus.md (3 hunks)
  • docs/content/monitoring/status.md (3 hunks)
  • docs/hugo.toml (1 hunks)
  • examples/dev.yaml (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/content/monitoring/prometheus.md

87-87: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build and test (1.24, windows-latest)
🔇 Additional comments (14)
docs/content/configuration/run_hooks.md (1)

4-4: Monitoring tag added to front matter. The inclusion of tags: [ "monitoring" ] correctly integrates this page into the monitoring taxonomy, improving its discoverability.

docs/content/configuration/http_hooks.md (1)

4-4: Monitoring and healthchecks.io tags added to front matter. The tags array now includes both "monitoring" and "healthchecks.io", enhancing categorisation and discoverability of HTTP hooks within the monitoring context.

docs/hugo.toml (1)

43-46: Enable Tags shortcut in Hugo menu. Re-uncommenting the Tags menu entry under menu.shortcuts restores navigation to /tags. Please verify that a /tags page exists and is populated to prevent broken links.

docs/content/monitoring/_index.md (1)

1-9: Add new Monitoring chapter index. This _index.md correctly defines the "Monitoring" section with the appropriate archetype, prefix, title, weight, and {{% children %}} shortcode, establishing the documentation hierarchy for monitoring features.

examples/dev.yaml (3)

132-139: Good addition of monitoring hooks to the check section.

The implementation of both shell command hooks (run-before, run-after) and HTTP hooks (send-before, send-after) provides a comprehensive example of how to monitor check operations. This aligns well with the monitoring documentation improvements.


140-148: Well-structured monitoring hooks for initialization.

Adding similar hooks to the init section provides consistency and demonstrates how the same monitoring pattern can be applied across different operations. The examples showing both command-line notifications and HTTP requests are particularly helpful.


193-194: Consistent with documentation updates.

Commenting out the prometheus-labels section aligns with the updated Prometheus documentation, which now shows this configuration as an alternative rather than a default approach.

config/profile.go (1)

139-141: Improved root path handling.

The change properly delegates to the embedded GenericSection's setRootPath method before applying specific path handling logic for the InitSection. This ensures consistent path resolution behaviour across different section types.

docs/content/monitoring/status.md (3)

1-8: Good metadata structure and backwards compatibility.

The added frontmatter properly categorises this document with the "monitoring" tag and includes an alias to the old path (/status) for backward compatibility with existing links, which is a good practice.


10-14: Clear and concise introduction.

The rewritten introduction provides a more direct and practical explanation of the status file functionality, with a clear distinction between using scripts for complex monitoring needs and the JSON status file for simpler cases.


97-109: Improved clarity on extended status limitations.

The explanation of the extended status limitation and its impact on terminal output is now more concise and easier to understand. The added emphasis that extended-status is disabled by default because it suppresses output helps users make an informed decision.

docs/content/monitoring/prometheus.md (3)

1-9: Good documentation structure and introduction.

The added frontmatter with proper tags and slug improves document organisation. The rewritten introduction is more concise and clearly explains the purpose of the Prometheus integration.


136-141: Clearer explanation of Prometheus Pushgateway behaviour.

The description of how the job label works with Pushgateway and the explanation of the prometheus-push-job and prometheus-push-format properties are more precise and helpful for users configuring this feature.


142-144: Improved section heading and description.

The renamed section "User-Defined Labels" (with proper hyphenation) and clearer explanation enhance the readability and professionalism of the documentation.

@codecov
Copy link
Copy Markdown

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.34%. Comparing base (43b6c84) to head (28c078a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #505   +/-   ##
=======================================
  Coverage   79.33%   79.34%           
=======================================
  Files         134      134           
  Lines       13229    13231    +2     
=======================================
+ Hits        10495    10497    +2     
  Misses       2316     2316           
  Partials      418      418           
Flag Coverage Δ
unittests 79.34% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud
Copy link
Copy Markdown

@creativeprojects creativeprojects merged commit e6389f7 into master May 19, 2025
12 checks passed
@creativeprojects creativeprojects deleted the docs-monitoring-chapter branch May 19, 2025 18:05
@creativeprojects creativeprojects added this to the v0.31.0 milestone Apr 1, 2026
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.

1 participant