store more metadata
This commit is contained in:
@@ -132,7 +132,7 @@ export const ingest = new Elysia()
|
||||
`;
|
||||
|
||||
const [ping] = await sql`
|
||||
INSERT INTO pings (monitor_id, checked_at, scheduled_at, jitter_ms, status_code, latency_ms, up, important, error, meta, region, run_id, cert_expiry_days)
|
||||
INSERT INTO pings (monitor_id, checked_at, scheduled_at, jitter_ms, status_code, latency_ms, up, important, error, meta, region, run_id, cert_expiry_days, cert_issuer, response_size)
|
||||
VALUES (
|
||||
${body.monitor_id},
|
||||
${checkedAt ?? sql`now()`},
|
||||
@@ -146,7 +146,9 @@ export const ingest = new Elysia()
|
||||
${Object.keys(meta).length > 0 ? sql.json(meta) : null},
|
||||
${region},
|
||||
${body.run_id ?? null},
|
||||
${body.cert_expiry_days ?? null}
|
||||
${body.cert_expiry_days ?? null},
|
||||
${body.cert_issuer ?? null},
|
||||
${body.response_size ?? null}
|
||||
)
|
||||
RETURNING *
|
||||
`;
|
||||
@@ -197,6 +199,7 @@ export const ingest = new Elysia()
|
||||
error: t.Optional(t.Nullable(t.String())),
|
||||
cert_expiry_days: t.Optional(t.Nullable(t.Number())),
|
||||
cert_issuer: t.Optional(t.Nullable(t.String())),
|
||||
response_size: t.Optional(t.Nullable(t.Number())),
|
||||
meta: t.Optional(t.Any()),
|
||||
region: t.Optional(t.Nullable(t.String())),
|
||||
run_id: t.Optional(t.Nullable(t.String())),
|
||||
|
||||
Reference in New Issue
Block a user