Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions platform-includes/getting-started-verify/javascript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,26 @@ To verify that Sentry captures errors and creates issues in your Sentry project,
<SplitSection>

<SplitSectionText>
To test your tracing configuration, update the previous code to simulate a longer operation and start a trace.
To test your tracing configuration, update the previous code to measure a simulated operation with a span.

Open the page in a browser and click the button to throw an error and create a trace.
Open the page in a browser and click the button. In Sentry, look for the `Sentry Test Error` issue and the `Example Frontend Span` span in the trace.

</SplitSectionText>

<SplitSectionCode>

```html
<script>
function triggerError() {
await Sentry.startSpan(
{ name: "Example Frontend Span", op: "test" },
async () => {
await new Promise(resolve => setTimeout(resolve, 200));

throw new Error("Sentry Test Error");
},
);
}
async function triggerError() {
await Sentry.startSpan(
{ name: "Example Frontend Span", op: "test" },
async () => {
await new Promise((resolve) => setTimeout(resolve, 200));

throw new Error("Sentry Test Error");
},
);
}
</script>

<button onclick="triggerError()">Break the World</button>
Expand Down
Loading