Skip to content

Cron Monitor name through API not reflected in the Sentry UI #116095

@flowl

Description

@flowl

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Create a new cron monitor using the PHP SDK DSN {"tag": "my-monitor"} by
$checkInId = SentrySdk::getCurrentHub()->captureCheckIn(
    $slug,
    CheckInStatus::error(),
    null,
    $resolvedConfig,
    $trackingId,
);
  1. Patch the monitor according to the docs with {"tag": "my-monitor", "name": "My Monitor"}
$response = $this->httpClient->request('PUT', sprintf(
    'https://sentry.io/api/0/organizations/%s/monitors/%s/',
    $this->orgSlug,
    $slug,
), [
    'auth_bearer' => $this->authToken,
    'json' => [
        'name' => $label,
        'config' => $this->monitorConfigToApiPayload($monitorConfig),
    ],
    'timeout' => 5,
]);
  1. Confirm the patch through the API worked by asserting response status code 200 and by pulling the data back from the API returns the patched name field (it does).
  2. Go to the Sentry frontend and navigate to the created monitor.

I can see the configuration is managed programmatically:

This monitor is managed in code and updates automatically with each check-in.

Expected Result

I can see the updates concerning name and configuration through the API reflected in the frontend, the monitor has the name My Monitor in the frontend. The breadcrumbs print

Monitors - Cron - My Monitor

Actual Result

I can see the updates concerning name and configuration through the API reflected in the frontend, except the monitor has the name my-monitor in the frontend. The breadcrumbs print

Monitors - Cron - my-monitor

Other information is reflected correctly in the frontend: threshold configuration, interval,... all correct.

I suspect a regression here because I'm rather confident it had worked in the past with the name properly showing up in the frontend. Whilst the data is set correctly in the backend.

Product Area

Crons

Link

No response

DSN

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    Status

    Waiting for: Support

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions