Skip to content

Commit

Permalink
docs(new-trace): Updating next.js performance onboarding checklist co…
Browse files Browse the repository at this point in the history
…ntent. (#10836)

Co-authored-by: Abdullah Khan <[email protected]>
  • Loading branch information
Abdkhan14 and Abdullah Khan authored Jul 25, 2024
1 parent 82f3639 commit 3941035
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"name": "Next",
"aliases": [],
"categories": [],
"body": "<h4 id=\"configure\" style=\"position:relative;\">Configure</h4>\n<p>To configure, set <code>tracesSampleRate</code> in your config files, <code>sentry.server.config.js</code>, <code>sentry.client.config.js</code>, and <code>sentry.edge.config.js</code>:</p>\n<p>Once this is done, Sentry's Next.js SDK captures all unhandled exceptions and transactions.</p>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript highlight\"><code class=\"language-javascript\"><span class=\"token keyword\">import</span> <span class=\"token operator\">*</span> <span class=\"token keyword\">as</span> Sentry <span class=\"token keyword\">from</span> <span class=\"token string\">\"@sentry/nextjs\"</span><span class=\"token punctuation\">;</span>\n\nSentry<span class=\"token punctuation\">.</span><span class=\"token function\">init</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n <span class=\"token literal-property property\">dsn</span><span class=\"token operator\">:</span> <span class=\"token string\">\"___PUBLIC_DSN___\"</span><span class=\"token punctuation\">,</span>\n\n<span class=\"token comment\">// Set tracesSampleRate to 1.0 to capture 100%</span>\n <span class=\"token comment\">// of transactions for performance monitoring.</span>\n <span class=\"token comment\">// We recommend adjusting this value in production</span>\n <span class=\"token literal-property property\">tracesSampleRate</span><span class=\"token operator\">:</span> <span class=\"token number\">1.0</span><span class=\"token punctuation\">,</span></code></pre></div>\n<p>We recommend adjusting the value of <code>tracesSampleRate</code> in production. Learn more about tracing <a href=\"https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#tracing-options\">options,</a> how to use the <a href=\"https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/sampling/#setting-a-sampling-function\">traces_sampler</a> function, or how to <a href=\"https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/sampling/#sampling-transaction-events\">sample transactions</a>.</p>"
"body": "<h4 id=\"configure\" style=\"position:relative;\">Configure</h4>\n<p>To configure, set <code>tracesSampleRate</code> in your config files, <code>sentry.server.config.js</code>, <code>sentry.client.config.js</code>, and <code>sentry.edge.config.js</code>:</p>\n<p>Once this is done, Sentry's Next.js SDK captures all unhandled exceptions and transactions.</p>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript highlight\"><code class=\"language-javascript\"><span class=\"token keyword\">import</span> <span class=\"token operator\">*</span> <span class=\"token keyword\">as</span> Sentry <span class=\"token keyword\">from</span> <span class=\"token string\">\"@sentry/nextjs\"</span><span class=\"token punctuation\">;</span>\n\nSentry<span class=\"token punctuation\">.</span><span class=\"token function\">init</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n <span class=\"token literal-property property\">dsn</span><span class=\"token operator\">:</span> <span class=\"token string\">\"___PUBLIC_DSN___\"</span><span class=\"token punctuation\">,</span>\n\n <span class=\"token comment\">// Set tracesSampleRate to 1.0 to capture 100%</span>\n <span class=\"token comment\">// of transactions for performance monitoring.</span>\n <span class=\"token comment\">// We recommend adjusting this value in production</span>\n <span class=\"token literal-property property\">tracesSampleRate</span><span class=\"token operator\">:</span> <span class=\"token number\">1.0</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<p>We recommend adjusting the value of <code>tracesSampleRate</code> in production. Learn more about tracing <a href=\"https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#tracing-options\">options,</a> how to use the <a href=\"https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/sampling/#setting-a-sampling-function\">traces_sampler</a> function, or how to <a href=\"https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/sampling/#sampling-transaction-events\">sample transactions</a>.</p>"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"name": "Next",
"aliases": [],
"categories": [],
"body": "<h4 id=\"verify\" style=\"position:relative;\">Verify</h4>\n<p>Verify that performance monitoring is working correctly with our <a href=\"https://docs.sentry.io/platforms/javascript/guides/nextjs/tracing/instrumentation/automatic-instrumentation/\">automatic instrumentation</a> by simply using your Next.js application.</p>\n<p>You have the option to manually construct a transaction using <a href=\"https://docs.sentry.io/platforms/javascript/guides/nextjs/tracing/instrumentation/custom-instrumentation/\">custom instrumentation</a>.\n<p>While you're testing, set <code>tracesSampleRate</code> to <code>1.0</code>, as that ensures that every transaction will be sent to Sentry. Once testing is complete, you may want to set a lower <code>tracesSampleRate</code> value, or switch to using <code>tracesSampler</code> to selectively sample and filter your transactions, based on contextual data.</p>"
"body": "<h4 id=\"verify\" style=\"position:relative;\">Verify</h4>\n<p>Verify that performance monitoring is working correctly with our <a href=\"https://docs.sentry.io/platforms/javascript/guides/nextjs/tracing/instrumentation/automatic-instrumentation/\">automatic instrumentation</a> by simply using your Next.js application.</p>\n<p>You have the option to manually construct a transaction using <a href=\"https://docs.sentry.io/platforms/javascript/guides/nextjs/tracing/instrumentation/custom-instrumentation/\">custom instrumentation</a>."
}

0 comments on commit 3941035

Please sign in to comment.