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

feat: Add support for Cron Monitoring #1467

Merged
merged 1 commit into from
Mar 14, 2023
Merged

feat: Add support for Cron Monitoring #1467

merged 1 commit into from
Mar 14, 2023

Conversation

cleptric
Copy link
Member

@cleptric cleptric commented Feb 13, 2023

This adds support to send Cron Monitor check-ins as envelopes to Relay.

<?php
$checkIn = new CheckIn(
    monitorSlug: getenv('MONITOR_SLUG'),
    status: CheckInStatus::inProgress(),
);

$event = Event::createCheckIn();
$event->setCheckIn($checkIn);

$this->hub->captureEvent($event);

// do stuff

$event = Event::createCheckIn();
$event->setCheckIn(new CheckIn(
    id: $checkIn->getId(),
    monitorSlug: getenv('MONITOR_SLUG'),
    status: CheckInStatus::ok(),
));

$this->hub->captureEvent($event);

@cleptric cleptric self-assigned this Feb 13, 2023
@cleptric cleptric force-pushed the check-in-event branch 5 times, most recently from e242a44 to 6807406 Compare March 14, 2023 00:01
@cleptric cleptric marked this pull request as ready for review March 14, 2023 00:03
@cleptric cleptric changed the title [WIP] feat: Add CheckIn event feat: Add CheckIn event Mar 14, 2023
@cleptric cleptric requested a review from stayallive March 14, 2023 00:03
@cleptric cleptric changed the title feat: Add CheckIn event feat: Add support for Cron Monitoring Mar 14, 2023
Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

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

looks good to me (but "me" is no php expert) :-)

Copy link
Collaborator

@stayallive stayallive left a comment

Choose a reason for hiding this comment

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

This makes it obvious we need a refactor at some point to stop dealing with non-envelopes, but other than that, no comments 💪

@cleptric cleptric merged commit 192e88e into develop Mar 14, 2023
@cleptric cleptric deleted the check-in-event branch March 14, 2023 20:38
@cleptric cleptric added this to the 3.16.0 milestone Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants