Openstatus www.openstatus.dev
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

🥅 add sentry (#674)

* 🥅 add sentry

* 🥅 add sentry

authored by

Thibault Le Ouay and committed by
GitHub
a33802d4 f7b34254

+43 -3
+10
apps/web/src/app/api/checker/cron/1h/route.ts
··· 1 1 import type { NextRequest } from "next/server"; 2 2 import { NextResponse } from "next/server"; 3 + import * as Sentry from "@sentry/nextjs"; 3 4 4 5 import { cron, isAuthorizedDomain } from "../_cron"; 5 6 ··· 10 11 11 12 export async function GET(req: NextRequest) { 12 13 if (isAuthorizedDomain(req.url)) { 14 + const checkInId = Sentry.captureCheckIn({ 15 + monitorSlug: "1-h-cron", 16 + status: "in_progress", 17 + }); 13 18 await cron({ periodicity: "1h", req }); 19 + Sentry.captureCheckIn({ 20 + checkInId, 21 + monitorSlug: "1-h-cron", 22 + status: "ok", 23 + }); 14 24 } 15 25 return NextResponse.json({ success: true }); 16 26 }
+3 -3
apps/web/src/app/api/checker/cron/1m/route.ts
··· 1 1 import type { NextRequest } from "next/server"; 2 2 import { NextResponse } from "next/server"; 3 - import { captureCheckIn } from "@sentry/nextjs"; 3 + import * as Sentry from "@sentry/nextjs"; 4 4 5 5 import { cron, isAuthorizedDomain } from "../_cron"; 6 6 ··· 11 11 12 12 export async function GET(req: NextRequest) { 13 13 if (isAuthorizedDomain(req.url)) { 14 - const checkInId = captureCheckIn({ 14 + const checkInId = Sentry.captureCheckIn({ 15 15 monitorSlug: "1-min-cron", 16 16 status: "in_progress", 17 17 }); 18 18 await cron({ periodicity: "1m", req }); 19 - captureCheckIn({ 19 + Sentry.captureCheckIn({ 20 20 checkInId, 21 21 monitorSlug: "1-min-cron", 22 22 status: "ok",
+10
apps/web/src/app/api/checker/cron/30m/route.ts
··· 1 1 import type { NextRequest } from "next/server"; 2 2 import { NextResponse } from "next/server"; 3 + import * as Sentry from "@sentry/nextjs"; 3 4 4 5 import { cron, isAuthorizedDomain } from "../_cron"; 5 6 ··· 10 11 11 12 export async function GET(req: NextRequest) { 12 13 if (isAuthorizedDomain(req.url)) { 14 + const checkInId = Sentry.captureCheckIn({ 15 + monitorSlug: "30-min-cron", 16 + status: "in_progress", 17 + }); 13 18 await cron({ periodicity: "30m", req }); 19 + Sentry.captureCheckIn({ 20 + checkInId, 21 + monitorSlug: "30-min-cron", 22 + status: "ok", 23 + }); 14 24 } 15 25 return NextResponse.json({ success: true }); 16 26 }
+10
apps/web/src/app/api/checker/cron/30s/route.ts
··· 1 1 import type { NextRequest } from "next/server"; 2 2 import { NextResponse } from "next/server"; 3 + import * as Sentry from "@sentry/nextjs"; 3 4 4 5 import { cron, isAuthorizedDomain } from "../_cron"; 5 6 ··· 10 11 11 12 export async function GET(req: NextRequest) { 12 13 if (isAuthorizedDomain(req.url)) { 14 + const checkInId = Sentry.captureCheckIn({ 15 + monitorSlug: "30-s-cron", 16 + status: "in_progress", 17 + }); 13 18 await cron({ periodicity: "30s", req }); 19 + Sentry.captureCheckIn({ 20 + checkInId, 21 + monitorSlug: "30-s-cron", 22 + status: "ok", 23 + }); 14 24 } 15 25 return NextResponse.json({ success: true }); 16 26 }
+10
apps/web/src/app/api/checker/cron/5m/route.ts
··· 1 1 import type { NextRequest } from "next/server"; 2 2 import { NextResponse } from "next/server"; 3 + import * as Sentry from "@sentry/nextjs"; 3 4 4 5 import { cron, isAuthorizedDomain } from "../_cron"; 5 6 ··· 10 11 11 12 export async function GET(req: NextRequest) { 12 13 if (isAuthorizedDomain(req.url)) { 14 + const checkInId = Sentry.captureCheckIn({ 15 + monitorSlug: "5-min-cron", 16 + status: "in_progress", 17 + }); 13 18 await cron({ periodicity: "5m", req }); 19 + Sentry.captureCheckIn({ 20 + checkInId, 21 + monitorSlug: "5-min-cron", 22 + status: "ok", 23 + }); 14 24 } 15 25 return NextResponse.json({ success: true }); 16 26 }