Deploy config: - .do/app.yaml: build the Dockerfile directly from GitHub (deploy_on_push) instead of a pre-built DOCR image; NEXT_PUBLIC_* set RUN_AND_BUILD_TIME with the propertymanagement.network domain so they bake into the client bundle; add custom domains block (apex + www); wire Sentry DSN (server + browser). Included pending work from the audit-fixes branch: - AI provider abstraction (OpenAI/Anthropic, admin-selectable; Anthropic default) - Per-landlord e-signature (DocuSign OAuth + Dropbox Sign) + migration 0010 - Outbound webhooks / Zapier integration - PayPal removal (Stripe-only billing) - Storage hardening (fail-loud when Spaces unconfigured), security fixes Verified: full production Docker build (same build-args as DO) passes clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
22 lines
898 B
TypeScript
22 lines
898 B
TypeScript
// Sentry initialization for the browser. Next.js loads this client-side
|
|
// instrumentation file automatically (Next 15.3+).
|
|
import * as Sentry from "@sentry/nextjs"
|
|
|
|
const dsn = process.env.NEXT_PUBLIC_SENTRY_DSN
|
|
|
|
Sentry.init({
|
|
dsn,
|
|
// Inert until a DSN is configured.
|
|
enabled: !!dsn,
|
|
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT || process.env.NODE_ENV,
|
|
tracesSampleRate: process.env.NODE_ENV === "production" ? 0.2 : 1.0,
|
|
// Session Replay: record 10% of all sessions, and 100% of sessions with an
|
|
// error. Text is masked and media blocked so tenant/landlord PII isn't captured.
|
|
replaysSessionSampleRate: 0.1,
|
|
replaysOnErrorSampleRate: 1.0,
|
|
integrations: [Sentry.replayIntegration({ maskAllText: true, blockAllMedia: true })],
|
|
})
|
|
|
|
// Instrument client-side route transitions for tracing.
|
|
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart
|