Skip to content

Commit a5a0871

Browse files
committed
docs: add more sentry context
1 parent 61f4dae commit a5a0871

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

docs/app/pricing/tiers.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { CheckIcon } from "@heroicons/react/20/solid";
44
import { track } from "@vercel/analytics";
55
import classNames from "classnames";
66
import React from "react";
7+
import * as Sentry from "@sentry/nextjs";
78

89
type Frequency = "month" | "year";
910

@@ -76,6 +77,13 @@ function TierCTAButton({ tier }: { tier: Tier }) {
7677
}
7778

7879
if (session.planType === "free") {
80+
Sentry.captureEvent({
81+
message: "Checkout",
82+
level: "info",
83+
extra: {
84+
tier: tier.id,
85+
},
86+
});
7987
track("Checkout", { tier: tier.id });
8088
e.preventDefault();
8189
e.stopPropagation();

docs/components/AuthenticationPage.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
useState,
1111
} from "react";
1212
import { track } from "@vercel/analytics";
13+
import * as Sentry from "@sentry/nextjs";
1314

1415
import ThemedImage from "@/components/ThemedImage";
1516
import blockNoteLogo from "@/public/img/logos/banner.svg";
@@ -71,6 +72,13 @@ function AuthenticationBox(props: {
7172

7273
if (props.variant === "password") {
7374
track("Sign In", { type: "password" });
75+
Sentry.captureEvent({
76+
message: "Sign In",
77+
level: "info",
78+
extra: {
79+
type: "password",
80+
},
81+
});
7482
await signIn.email(
7583
{
7684
email,
@@ -91,6 +99,13 @@ function AuthenticationBox(props: {
9199
);
92100
} else if (props.variant === "email") {
93101
track("Sign In", { type: "magic-link" });
102+
Sentry.captureEvent({
103+
message: "Sign In",
104+
level: "info",
105+
extra: {
106+
type: "magic-link",
107+
},
108+
});
94109
await signIn.magicLink(
95110
{
96111
email,
@@ -121,6 +136,13 @@ function AuthenticationBox(props: {
121136
);
122137
} else {
123138
track("Create Account");
139+
Sentry.captureEvent({
140+
message: "Sign Up",
141+
level: "info",
142+
extra: {
143+
type: "email",
144+
},
145+
});
124146
await signUp.email(
125147
{
126148
email,
@@ -324,6 +346,13 @@ function GitHubSignInButton() {
324346
}
325347
onClick={async () => {
326348
track("Sign In", { type: "github" });
349+
Sentry.captureEvent({
350+
message: "Sign In",
351+
level: "info",
352+
extra: {
353+
type: "github",
354+
},
355+
});
327356
await signIn.social({
328357
provider: "github",
329358
callbackURL,

0 commit comments

Comments
 (0)