Skip to content

DOCSP-47056: Monitoring #260

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

Merged
merged 9 commits into from
Jun 10, 2025

Conversation

norareidy
Copy link
Collaborator

@norareidy norareidy commented Jun 2, 2025

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-47056

Staging Links

  • monitoring-logging/monitoring
  • monitoring-logging
  • Self-Review Checklist

    • Is this free of any warnings or errors in the RST?
    • Did you run a spell-check?
    • Did you run a grammar-check?
    • Are all the links working?
    • Are the facets and meta keywords accurate?
    • Are the page titles greater than 20 characters long and SEO relevant?
    • Did you add redirects?

    Suggested redirects for moved, renamed, and deleted files:

    Replace <v> with the earliest backport target version

  • [<v>-*]: ${prefix}/${version}/monitoring-logging/cluster-monitoring/ -> ${base}/${version}/
  • Copy link

    netlify bot commented Jun 2, 2025

    Deploy Preview for docs-php-library ready!

    Name Link
    🔨 Latest commit 367a4c7
    🔍 Latest deploy log https://app.netlify.com/projects/docs-php-library/deploys/6848522d15d82000085ce43a
    😎 Deploy Preview https://deploy-preview-260--docs-php-library.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify project configuration.

    Copy link
    Collaborator

    @stephmarie17 stephmarie17 left a comment

    Choose a reason for hiding this comment

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

    LGTM with a tiny nit!

    :dedent:

    When you start the application and run an insert command, your subscribers
    record the events and output messages such as the following:
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    [n] I think this fits the nonrestrictive clause guidance from the terminology guidelines:

    Suggested change
    record the events and output messages such as the following:
    record the events and output messages, such as the following:

    .. _php-monitoring:

    ==========
    Monitoring
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    [s] I almost forgot, I think this title might be too short per the latest title guidelines? In Node CC we updated to Monitor Application Events.

    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

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

    Ah thank you! fixed

    @norareidy norareidy requested review from a team and paulinevos and removed request for a team June 3, 2025 14:07
    Copy link
    Collaborator

    @paulinevos paulinevos left a comment

    Choose a reason for hiding this comment

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

    Approved with a small comment/question (but nothing blocking :))

    Comment on lines 8 to 13
    private $stream;

    public function __construct($stream)
    {
    $this->stream = $stream;
    }
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    These days you can declare and assign this property through constructor property promotion. Might improve cleanliness a little in this example :)

    Suggested change
    private $stream;
    public function __construct($stream)
    {
    $this->stream = $stream;
    }
    public function __construct(private readonly $stream) {}

    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

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

    Hm I get an error about $stream not having a type:
    PHP Fatal error: Readonly property MyCommandSubscriber::$stream must have type

    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

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

    But if I remove readonly it works!

    events that provide application information. You can listen for these events to
    monitor your application.

    .. TODO: This page explains how to monitor your application in code. To learn how to
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    Just for my information, what does this .. TODO tag do? How is that formatted in the compiled docs?

    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

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

    It doesn't render on the page at all, it's just a comment for the writers that reminds us to address something later! In this case, once the logging page is merged (which I have a PR open for now), I'll uncomment it and add the Logging link

    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    Thanks for explaining!

    @norareidy norareidy merged commit 99f0974 into mongodb:comp-cov Jun 10, 2025
    7 of 9 checks passed
    @norareidy norareidy deleted the DOCSP-47056-logging-monitoring branch June 10, 2025 15:51
    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.

    3 participants