Skip to content
On this page

Docs / Getting started

The FiveDock SDK

One package for browsers, React, Next.js and Node.js, and a module for Go. They send errors, logs, traces, profiles, session replays, user feedback and cron check-ins to your app in FiveDock, where they become issues, performance data and alerts.

Get started

Every app you add in FiveDock gets a DSN. Put it in the SDK and the app starts reporting; everything after that on this page is optional.

Find your DSN

Open your app in the panel, then its Connection drawer. The DSN there is the address the SDK sends to, with the app’s public key and id in it:

DSN
https://<public-key>@api.fivedock.dev/<app-id>

The key in a DSN can only send data, so it is safe in browser code. To keep other sites from using it, list your origins on the key. To stop a key, revoke it and create a new one.

Install

The JavaScript SDK is one package with an entry point for each platform, and needs Node.js 24 or newer on servers. The Go SDK needs Go 1.24 or newer and nothing outside the standard library.

npm install @fivedock/sdk@beta

Browser

Call init as early as you can, before the rest of your code, so errors thrown while the page starts are caught too.

import * as FiveDock from '@fivedock/sdk/browser';

FiveDock.init({
  dsn: 'https://<public-key>@api.fivedock.dev/<app-id>',
  environment: 'production',
  release: '2026.09.24',
});

From then on, uncaught errors and unhandled rejections are reported, with breadcrumbs for clicks, key presses, console lines, requests and navigations.

React

The React entry point is the browser SDK plus ErrorBoundary, which reports an error thrown while rendering, with the component stack, and shows your fallback instead of a blank page.

main.tsx
import * as FiveDock from '@fivedock/sdk/react';
import { createRoot } from 'react-dom/client';
import { App } from './App';

FiveDock.init({
  dsn: 'https://<public-key>@api.fivedock.dev/<app-id>',
});

createRoot(document.getElementById('root')!).render(
  <FiveDock.ErrorBoundary fallback={<p>Something went wrong.</p>}>
    <App />
  </FiveDock.ErrorBoundary>,
);

Next.js

Set the DSN once as NEXT_PUBLIC_FIVEDOCK_DSN; the server and the browser both read it. instrumentation.ts starts the SDK on the server and reports errors from route handlers, server components and middleware through onRequestError. instrumentation-client.ts starts it in the browser.

NEXT_PUBLIC_FIVEDOCK_DSN=https://<public-key>@api.fivedock.dev/<app-id>

The Next.js entry point is experimental while Next.js’ instrumentation hooks settle. It needs no wrapper in next.config.ts.

Node.js

Start the SDK in a file of its own and import that file before anything else, so the modules it instruments load after it. The DSN, environment and release come from FIVEDOCK_DSN, FIVEDOCK_ENVIRONMENT and FIVEDOCK_RELEASE when you leave them out.

import * as FiveDock from '@fivedock/sdk/node';

FiveDock.init({
  tracesSampleRate: 0.2,
  enableLogs: true,
});

Uncaught exceptions are reported, then the process exits as it would have. Unhandled rejections are reported and the process keeps running. Each incoming request gets a scope of its own, so the user and tags of one request never end up on another. Express, Fastify and Hono each have an error handler that reports what a route throws.

Go

Init reads the DSN, environment and release from FIVEDOCK_DSN, FIVEDOCK_ENVIRONMENT and FIVEDOCK_RELEASE when you leave them out. fdhttp gives every request its own hub and a transaction, and reports a panic before answering with a 500.

main.go
package main

import (
	"log"
	"net/http"

	fivedock "fivedock.dev/go"
	"fivedock.dev/go/fdhttp"
)

func main() {
	if err := fivedock.Init(fivedock.ClientOptions{
		TracesSampleRate: 0.2,
		EnableLogs:       true,
	}); err != nil {
		log.Printf("fivedock: %v", err)
	}
	defer fivedock.Close()

	mux := http.NewServeMux()
	mux.HandleFunc("GET /orders/{id}", getOrder)

	handler := fdhttp.New(fdhttp.Options{})
	if err := http.ListenAndServe(":8080", handler.Handle(mux)); err != nil {
		log.Print(err)
	}
}

Call Close before the process exits: it sends what is still queued, waiting at most ShutdownTimeout.

Options

Both SDKs take the same options; the Go name sits under the JavaScript one. A dash means that SDK does not have the option.

SDK options
JavaScriptGoDefaultWhat it does
dsnDsnDefault · -Where to send. Without one the SDK stays off and every call does nothing.
environmentEnvironmentDefault · productionKeeps production apart from staging and the rest in every view.
releaseReleaseDefault · -Your app’s version, to see which release an error first appeared in.
distDistDefault · -A build variant within a release.
enabled-Default · truefalse switches the SDK off.
debugDebugDefault · falseLogs what the SDK does to the console.
sampleRateSampleRateDefault · 1The share of errors sent, from 0 to 1.
tracesSampleRateTracesSampleRateDefault · -The share of traces recorded. Tracing is off until it is set.
tracesSamplerTracesSamplerDefault · -Decides per trace, and wins over tracesSampleRate.
tracePropagationTargetsTracePropagationTargetsDefault · -URLs that get trace headers besides your own origin.
profilesSampleRate-Default · -Browser: the share of traced transactions that are profiled.
profileSessionSampleRateProfileSessionSampleRateDefault · -Node.js and Go: the share of processes that run the profiler.
replaysSessionSampleRate-Default · -The share of sessions recorded from the start.
replaysOnErrorSampleRate-Default · -The share of the other sessions recorded when an error happens.
enableLogsEnableLogsDefault · falseSends the logs written with logger.
sendDefaultPiiSendDefaultPIIDefault · falseSends cookies, auth headers, query strings and IP addresses.
beforeSendBeforeSendDefault · -Changes or drops an error event before it is sent.
beforeSendTransaction, beforeSendSpanBeforeSendTransaction, BeforeSendSpanDefault · -Changes or drops a transaction or a span.
beforeSendLogBeforeSendLogDefault · -Changes or drops a log.
beforeBreadcrumbBeforeBreadcrumbDefault · -Changes or drops a breadcrumb.
ignoreErrorsIgnoreErrorsDefault · -Errors whose message contains one of these strings or matches one of these patterns are not sent.
ignoreTransactionsIgnoreTransactionsDefault · -Transactions with these names are not sent.
allowUrls, denyUrls-Default · -Browser: only errors from scripts on these URLs, or not on them.
maxBreadcrumbsMaxBreadcrumbsDefault · 100How many breadcrumbs an event keeps.
attachStacktraceAttachStacktraceDefault · falseAdds a stack trace to messages too.
initialScopeInitialScopeDefault · -The user, tags and contexts to start with.
integrationsIntegrationsDefault · -Integrations to add, or a function that changes the defaults.
defaultIntegrations-Default · -false starts with none.
maxValueLengthMaxValueLengthDefault · 250Longer strings are cut.
normalizeDepthNormalizeDepthDefault · 3How deep objects in contexts and extras are kept.
maxSpansMaxSpansDefault · 1000The most spans one transaction keeps.
tunnelTunnelDefault · -Sends envelopes to this URL instead of the DSN’s host.
transportTransportDefault · -Replaces how envelopes are sent.
serverNameServerNameDefault · -Servers: the host name reported with each event.
shutdownTimeoutShutdownTimeoutDefault · 2 sServers: how long close waits to send what is queued.

Send through your own domain

Ad blockers stop requests to monitoring services. With tunnel, the browser SDK posts to a route on your own site, which passes each envelope on to FiveDock unchanged.

FiveDock.init({
  dsn: process.env.NEXT_PUBLIC_FIVEDOCK_DSN,
  tunnel: '/api/fivedock',
});

Check that it works

Send a test message with debug on: the SDK logs what it sends, and the message shows up under Issues within seconds. curl works too, with nothing installed.

FiveDock.init({
  dsn: 'https://<public-key>@api.fivedock.dev/<app-id>',
  debug: true,
});

FiveDock.captureMessage('FiveDock is set up');

Errors and issues

Errors that reach the SDK become events. FiveDock groups events with the same cause into one issue, which you resolve, ignore or assign, and which comes back as a regression if it happens again after you resolved it.

Capture errors and messages

Uncaught errors are reported for you. Call captureException for errors you catch and handle, and captureMessage for something worth knowing that is not an exception. Both return the event’s id.

try {
  await chargeCard(order);
} catch (error) {
  FiveDock.captureException(error, { tags: { step: 'payment' } });
  showPaymentError();
}

FiveDock.captureMessage('Export finished with warnings', 'warning');

Add context

Set the user, tags and contexts on the scope, and every event after that carries them. Tags are indexed, so you can search and filter by them; contexts are shown on the event. withScope changes the scope for one capture only.

FiveDock.setUser({ id: user.id, email: user.email });
FiveDock.setTag('plan', 'city');
FiveDock.setContext('order', { id: order.id, items: order.items.length });

FiveDock.withScope((scope) => {
  scope.setTag('retry', 'true');
  scope.setLevel('warning');
  FiveDock.captureException(error);
});

// on sign-out
FiveDock.setUser(null);

On servers, Node gives each request its own scope, and in Go you clone the hub for a goroutine, so context set while handling one request never leaks into another.

Breadcrumbs are the trail of what happened before an error. The SDK records clicks, console lines, requests and navigations by itself; add your own for the steps that matter in your app. An event keeps the last 100.

FiveDock.addBreadcrumb({
  category: 'cart',
  message: 'Coupon applied',
  level: 'info',
  data: { code: coupon.code },
});

Grouping

Events are grouped by their stack trace, or by their message when there is none. Set a fingerprint to split or merge issues yourself. The default value keeps the usual grouping and adds to it, so the example below makes one issue per HTTP status.

FiveDock.withScope((scope) => {
  scope.setFingerprint(['{{ default }}', String(response.status)]);
  FiveDock.captureException(error);
});

Filter what is sent

ignoreErrors drops errors whose message contains one of its strings or matches one of its patterns. denyUrls and allowUrls drop browser errors by the script they came from. beforeSend sees every event last, and can change it or drop it by returning null. Each app also has filters on the server, for crawlers, old browsers and messages you list.

FiveDock.init({
  dsn: 'https://<public-key>@api.fivedock.dev/<app-id>',
  ignoreErrors: ['AbortError', /^Network request failed/],
  denyUrls: [/extensions\//i, /^chrome:\/\//i],
  beforeSend(event, hint) {
    if (hint.originalException instanceof ValidationError) return null;
    return event;
  },
});

React error boundaries

Put an ErrorBoundary around a part of the page to report what it throws and keep the rest working. beforeCapture adds context to that error only, and the fallback can offer a retry.

CheckoutPage.tsx
import * as FiveDock from '@fivedock/sdk/react';

export function CheckoutPage() {
  return (
    <FiveDock.ErrorBoundary
      beforeCapture={(scope) => scope.setTag('page', 'checkout')}
      fallback={({ resetError }) => (
        <div role="alert">
          <p>Checkout hit a problem.</p>
          <button type="button" onClick={resetError}>
            Try again
          </button>
        </div>
      )}
    >
      <Checkout />
    </FiveDock.ErrorBoundary>
  );
}

Panics in Go

fdhttp recovers panics in handlers. In a goroutine you start yourself, defer Recover: it reports the panic and lets the goroutine end.

Go
go func() {
	defer fivedock.Recover()
	rebuildSearchIndex()
}()

Logs

Logs sent by the SDK land in the Black Box with the trace they were written in, so a slow request or an error opens with its logs beside it.

JavaScript

Turn logs on with enableLogs and write them with logger. Attributes you pass are searchable. logger.fmt keeps the template apart from its values, so similar lines are found together.

JavaScript
FiveDock.init({
  dsn: 'https://<public-key>@api.fivedock.dev/<app-id>',
  enableLogs: true,
});

FiveDock.logger.info('Checkout started', { orderId: order.id });
FiveDock.logger.warn(FiveDock.logger.fmt`Payment retry ${attempt} of ${maxAttempts}`);
FiveDock.logger.error('Payment failed', { orderId: order.id, reason: error.message });

To keep your console calls, send them as logs with consoleLoggingIntegration. beforeSendLog sees each log first and can drop it.

JavaScript
FiveDock.init({
  dsn: 'https://<public-key>@api.fivedock.dev/<app-id>',
  enableLogs: true,
  integrations: [FiveDock.consoleLoggingIntegration({ levels: ['warn', 'error'] })],
  beforeSendLog: (log) => (log.message.includes('password') ? null : log),
});

Go

NewLogger writes logs tied to the context’s trace. If you use log/slog, NewSlogHandler sends each record to FiveDock and passes it on to your own handler; records at error level and above also become error events.

logger := fivedock.NewLogger(ctx).With("order", order.ID)
logger.Info("checkout started")
logger.Warnf("payment retry %d of %d", attempt, maxAttempts)

Tracing

A trace follows one request through every app it touches, from the click in the browser to the query in the database. Each app records a transaction for its part, with spans for the work inside it, and passes the trace on in the traceparent and baggage headers.

Sampling

Tracing is off until you set tracesSampleRate. The decision is made once, where the trace starts, and every app downstream follows it. tracesSampler decides per trace instead, for example to skip health checks.

FiveDock.init({
  dsn: 'https://<public-key>@api.fivedock.dev/<app-id>',
  tracesSampler: ({ name }) => (name.startsWith('GET /health') ? 0 : 0.2),
});

Browser

browserTracingIntegration records page loads and navigations, with the requests, resources, long tasks and interactions inside them, and the page’s web vitals. beforeStartSpan lets you name a page by its route rather than its URL.

JavaScript
FiveDock.init({
  dsn: 'https://<public-key>@api.fivedock.dev/<app-id>',
  tracesSampleRate: 0.2,
  tracePropagationTargets: [/^\//, 'https://api.example.com'],
  integrations: [
    FiveDock.browserTracingIntegration({
      beforeStartSpan: (options) => ({
        ...options,
        name: location.pathname.replace(/\/\d+(?=\/|$)/g, '/:id'),
      }),
    }),
  ],
});

Trace headers go on requests to your own origin and to the URLs in tracePropagationTargets. A server on another origin has to allow the traceparent and baggage headers in its CORS settings.

Node.js

Incoming requests become transactions named after their route, and outgoing http, https and fetch calls become spans, with nothing to add. instrumentPg adds a span for every Postgres query. Where the SDK cannot see a framework’s route, set it with setHttpRoute.

import pg from 'pg';
import * as FiveDock from '@fivedock/sdk/node';

FiveDock.instrumentPg(pg);

Next.js

Route handlers, server components and middleware are recorded on the server, page loads and navigations in the browser. Turn on clientTraceMetadata so the page continues the trace of the request that rendered it, and wrap server actions in withServerActionInstrumentation.

import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
  experimental: { clientTraceMetadata: ['traceparent', 'baggage'] },
};

export default nextConfig;

Go

fdhttp records incoming requests and, through NewTransport, outgoing ones. fdsql adds a span for every database/sql query. A ServeMux pattern names the transaction by itself; with another router, set the route with fdhttp.SetRoute.

if err := fdsql.Register("fivedock-postgres", "postgres", fdsql.WithSystem("postgresql")); err != nil {
	log.Fatal(err)
}
db, err := sql.Open("fivedock-postgres", os.Getenv("DATABASE_URL"))
if err != nil {
	log.Fatal(err)
}
client := &http.Client{Transport: fdhttp.NewTransport(nil)}

mux.HandleFunc("GET /orders/{id}", func(w http.ResponseWriter, r *http.Request) {
	var total int64
	err := db.QueryRowContext(r.Context(), "SELECT total FROM orders WHERE id = $1", r.PathValue("id")).Scan(&total)
	if err != nil {
		http.Error(w, "order not found", http.StatusNotFound)
		return
	}
	req, _ := http.NewRequestWithContext(r.Context(), http.MethodGet, "https://inventory.internal/stock", nil)
	resp, err := client.Do(req)
	if err != nil {
		http.Error(w, "inventory unavailable", http.StatusBadGateway)
		return
	}
	defer resp.Body.Close()
	fmt.Fprintf(w, "%d", total)
})

Your own spans

Wrap work you want to see in the waterfall in a span. In JavaScript, startSpan ends the span when the callback returns or its promise settles; in Go you call Finish.

const invoice = await FiveDock.startSpan({ name: 'render invoice', op: 'function' }, async (span) => {
  span.setAttribute('invoice.lines', lines.length);
  return renderInvoice(lines);
});

Queues and background jobs

To follow a trace through a queue, send the trace headers with the message, then continue the trace where the message is processed.

await queue.send({ order, trace: FiveDock.getTraceData() });

FiveDock.continueTrace(message.trace, () =>
  FiveDock.startSpan({ name: 'process order', op: 'queue.process' }, () => processOrder(message.order)),
);

Profiling

Profiles are samples of your call stacks, taken while your code runs. FiveDock merges them per transaction into a flamegraph, so the function that makes a request slow stands out, and links every profiled transaction from its trace.

Browser

browserProfilingIntegration profiles sampled page loads and navigations with the JS Self-Profiling API. profilesSampleRate is the share of traced transactions that are profiled too. The page has to be served with the Document-Policy: js-profiling header.

FiveDock.init({
  dsn: 'https://<public-key>@api.fivedock.dev/<app-id>',
  tracesSampleRate: 0.2,
  profilesSampleRate: 0.5,
  integrations: [FiveDock.browserTracingIntegration(), FiveDock.browserProfilingIntegration()],
});

Chromium-based browsers have the API; in others the integration does nothing. A browser profile covers at most 30 seconds.

Node.js

nodeProfilingIntegration runs V8’s profiler in the background for the life of the process and sends what it saw every minute. profileSessionSampleRate is the share of processes that are profiled, decided once at init.

instrument.ts
import * as FiveDock from '@fivedock/sdk/node';

FiveDock.init({
  tracesSampleRate: 0.2,
  profileSessionSampleRate: 1,
  integrations: [FiveDock.nodeProfilingIntegration()],
});

Go

With ProfileSessionSampleRate set, the process runs Go’s CPU profiler until Close and sends a profile every 10 seconds, labeled with the spans that were running. StartProfiler and StopProfiler turn it on and off by hand instead.

main.go
fivedock.Init(fivedock.ClientOptions{
	TracesSampleRate:         0.2,
	ProfileSessionSampleRate: 1,
})
defer fivedock.Close()

Session replay

Session replay records what users see and do in your web app: the page, their clicks and scrolling, console lines and network requests. A replay plays back in the panel beside the errors it ran into, and an issue links to the replay of the session it happened in.

Set it up

Add replayIntegration from its own entry point, so pages that do not record never load the recorder.

JavaScript
import * as FiveDock from '@fivedock/sdk/browser';
import { replayIntegration } from '@fivedock/sdk/replay';

FiveDock.init({
  dsn: 'https://<public-key>@api.fivedock.dev/<app-id>',
  replaysSessionSampleRate: 0.1,
  replaysOnErrorSampleRate: 1,
  integrations: [replayIntegration()],
});

replaysSessionSampleRate is the share of sessions recorded from the start. replaysOnErrorSampleRate is the share of the other sessions that keep the minute before an error and record on from there. A replay counts once against your plan, however long it runs.

Privacy

By default all text and form fields are masked and images, video and canvas are blocked, in the browser, before anything is sent. Loosen that only for what is safe to see. Headers and bodies of requests are recorded only for the URLs in networkDetailAllowUrls. Single elements take a class: rr-mask masks its text, rr-block hides it, and rr-ignore keeps what is typed into it out of the recording.

replayIntegration({
  maskAllText: false,
  maskAllInputs: true,
  blockAllMedia: true,
  networkDetailAllowUrls: ['/api/', 'https://api.example.com'],
});

Replays are kept for your plan’s retention, but never longer than 90 days.

User feedback

User feedback lets people tell you what went wrong in their own words. It arrives in the panel’s Feedback inbox with their page, the error they hit and the replay of their session.

The feedback widget

feedbackIntegration adds a button that opens a short form: a message, and if you want them, a name, an email and a screenshot. To open the form from your own button, turn autoInject off and attach the widget to your element.

FiveDock.init({
  dsn: 'https://<public-key>@api.fivedock.dev/<app-id>',
  integrations: [
    FiveDock.feedbackIntegration({
      colorScheme: 'system',
      showEmail: true,
      enableScreenshot: true,
    }),
  ],
});

After a crash

showReportDialog asks the user what happened right after an error, and ties their answer to that error. In React, showDialog on an ErrorBoundary does the same for errors thrown while rendering.

try {
  await placeOrder(cart);
} catch (error) {
  const eventId = FiveDock.captureException(error);
  FiveDock.showReportDialog({ eventId });
}

From your own code

Send feedback from your own form or a support tool with captureFeedback. Pass an event’s id to attach the feedback to its issue.

FiveDock.captureFeedback({
  message: 'The March invoice is missing from the export.',
  email: '[email protected]',
  associatedEventId: FiveDock.lastEventId(),
});

Cron monitors

A cron monitor expects a check-in on a schedule. When a job fails, runs too long or does not check in at all, FiveDock opens an issue and your alerts go out.

Wrap a job

withMonitor checks in when the job starts and again when it ends, with ok or error depending on whether it threw or returned an error.

await FiveDock.withMonitor('nightly-export', () => exportOrders(), {
  schedule: { type: 'crontab', value: '0 3 * * *' },
  timezone: 'Europe/Warsaw',
  maxRuntime: 30,
});

Passing the schedule creates the monitor with the first check-in and keeps it in step with your code. maxRuntime is in minutes.

node-cron

cron.instrumentNodeCron monitors every job you schedule with node-cron, under its name.

node-cron
import cron from 'node-cron';
import * as FiveDock from '@fivedock/sdk/node';

FiveDock.cron
  .instrumentNodeCron(cron)
  .schedule('0 3 * * *', exportOrders, { name: 'nightly-export', timezone: 'Europe/Warsaw' });

Check in yourself

For jobs that start and end in different places, send the check-ins with captureCheckIn and pass the first one’s id to the last.

JavaScript
const checkInId = FiveDock.captureCheckIn({ monitorSlug: 'nightly-export', status: 'in_progress' });
try {
  await exportOrders();
  FiveDock.captureCheckIn({ monitorSlug: 'nightly-export', status: 'ok', checkInId });
} catch (error) {
  FiveDock.captureCheckIn({ monitorSlug: 'nightly-export', status: 'error', checkInId });
  throw error;
}

Shell scripts

A job without an SDK checks in with curl and the app’s public key.

curl
URL='https://api.fivedock.dev/v1/ingest/<app-id>/cron/nightly-export?key=<public-key>'
ID=$(curl -fsS -X POST "$URL&status=in_progress" | sed -E 's/.*"checkInId":"([^"]+)".*/\1/')
./export.sh && STATUS=ok || STATUS=error
curl -fsS -X POST "$URL&status=$STATUS&checkInId=$ID"

Each monitor takes one of your plan’s monitor seats; check-ins cost nothing on top. When every seat is taken, a new monitor is not created until you free one.

Alerts

Alerts are set up in the panel, not in code. A rule watches your apps and posts to Discord, Slack, a webhook or email when it fires.

  • Issue rules fire on a new issue, on a regression, on more events than a threshold within a window, or on more users affected than a threshold.
  • Metric rules watch a number over a window: p95 duration, failure rate, throughput, apdex or a web vital. They go critical when it crosses a threshold, and resolve when it comes back.
  • Cron monitors open an issue when a job fails or misses a run, so issue rules cover them too.
Set up alerts

Plans and quotas

Each plan includes a monthly amount of every kind of data. When a kind runs out, FiveDock answers with 429 and the SDK stops sending that kind until the month ends; the others keep flowing.

What each plan includes per month
Per monthFreeCityMetroEnterprise
Errors5K50K250K2M
Spans1M10M50M500M
Logs1 GB10 GB50 GB500 GB
Session replays501K10K100K
Profiling1 hour10 hours50 hours500 hours
Attachments100 MB1 GB10 GB100 GB
Cron monitors1201001K
Retention7 days30 days90 days365 days

Logs and attachments count by size, profiling by the length of the profiles, and a replay once, when it starts. Cron monitors are seats rather than a monthly amount. Data is kept for your plan’s retention; replays for 90 days at most.

Compare plans

Privacy

The SDK leaves out what could identify someone unless you ask for it: cookies, auth headers, query strings and IP addresses stay behind until you turn on sendDefaultPii, and no user is attached until you set one.

FiveDock scrubs again on arrival: values under keys like password, token, secret, cookie, authorization, card or iban become [Filtered], and IP addresses are dropped unless the app keeps them.

To hold back more, use beforeSend, beforeBreadcrumb, beforeSendLog and the other hooks. Whatever they remove never leaves the app.

FiveDock.init({
  dsn: 'https://<public-key>@api.fivedock.dev/<app-id>',
  sendDefaultPii: false,
  beforeBreadcrumb: (breadcrumb) => (breadcrumb.category === 'console' ? null : breadcrumb),
  beforeSend(event) {
    if (event.user) delete event.user.email;
    return event;
  },
});