Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(profiling) wrong integration casing #10382

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"key":"javascript.angular-profiling-onboarding-3-configure","type":"framework","doc_link":"https://docs.sentry.io/platforms/javascript/profiling/","name":"Browser (JS Self Profiling)","aliases":[],"categories":[],"body":"<h4 id=\"configure\" style=\"position:relative;\">Configure</h4>\n<p>Configuration should happen as early as possible in your application's lifecycle. Once this is done, Sentry's JavaScript SDK will capture all unhandled exceptions and transactions.</p>\n<p>Angular versions &lt; 12</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/angular\"</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 <span class=\"token literal-property property\">integrations</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n <span class=\"token comment\">// Add browser profiling integration to the list of integrations</span>\n <span class=\"token keyword\">new</span> <span class=\"token class-name\">Sentry<span class=\"token punctuation\">.</span>BrowserProfilingIntegration</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n <span class=\"token keyword\">new</span> <span class=\"token class-name\">Sentry<span class=\"token punctuation\">.</span>BrowserTracing</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">]</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 comment\">// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled</span>\n <span class=\"token literal-property property\">tracePropagationTargets</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">\"localhost\"</span><span class=\"token punctuation\">,</span> <span class=\"token regex\"><span class=\"token regex-delimiter\">/</span><span class=\"token regex-source language-regex\">^https:\\/\\/yourserver\\.io\\/api</span><span class=\"token regex-delimiter\">/</span></span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n\n <span class=\"token comment\">// Set profilesSampleRate to 1.0 to profile every transaction.</span>\n <span class=\"token comment\">// Since profilesSampleRate is relative to tracesSampleRate,</span>\n <span class=\"token comment\">// the final profiling rate can be computed as tracesSampleRate * profilesSampleRate</span>\n <span class=\"token comment\">// For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would</span>\n <span class=\"token comment\">// results in 25% of transactions being profiled (0.5*0.5=0.25)</span>\n <span class=\"token literal-property property\">profilesSampleRate</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>Angular versions 12 and above</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/angular-ivy\"</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 <span class=\"token literal-property property\">integrations</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n <span class=\"token comment\">// Add browser profiling integration to the list of integrations</span>\n <span class=\"token keyword\">new</span> <span class=\"token class-name\">Sentry<span class=\"token punctuation\">.</span>BrowserProfilingIntegration</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n <span class=\"token keyword\">new</span> <span class=\"token class-name\">Sentry<span class=\"token punctuation\">.</span>BrowserTracing</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">]</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 comment\">// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled</span>\n <span class=\"token literal-property property\">tracePropagationTargets</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">\"localhost\"</span><span class=\"token punctuation\">,</span> <span class=\"token regex\"><span class=\"token regex-delimiter\">/</span><span class=\"token regex-source language-regex\">^https:\\/\\/yourserver\\.io\\/api</span><span class=\"token regex-delimiter\">/</span></span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n\n <span class=\"token comment\">// Set profilesSampleRate to 1.0 to profile every transaction.</span>\n <span class=\"token comment\">// Since profilesSampleRate is relative to tracesSampleRate,</span>\n <span class=\"token comment\">// the final profiling rate can be computed as tracesSampleRate * profilesSampleRate</span>\n <span class=\"token comment\">// For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would</span>\n <span class=\"token comment\">// results in 25% of transactions being profiled (0.5*0.5=0.25)</span>\n <span class=\"token literal-property property\">profilesSampleRate</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>"}
{"key":"javascript.angular-profiling-onboarding-3-configure","type":"framework","doc_link":"https://docs.sentry.io/platforms/javascript/profiling/","name":"Browser (JS Self Profiling)","aliases":[],"categories":[],"body":"<h4 id=\"configure\" style=\"position:relative;\">Configure</h4>\n<p>Configuration should happen as early as possible in your application's lifecycle. Once this is done, Sentry's JavaScript SDK will capture all unhandled exceptions and transactions.</p>\n<p>Angular versions &lt; 12</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/angular\"</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 <span class=\"token literal-property property\">integrations</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n <span class=\"token comment\">// Add browser profiling integration to the list of integrations</span>\n <span class=\"token keyword\">new</span> <span class=\"token class-name\">Sentry<span class=\"token punctuation\">.</span>browserProfilingIntegration</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n <span class=\"token keyword\">new</span> <span class=\"token class-name\">Sentry<span class=\"token punctuation\">.</span>BrowserTracing</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">]</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 comment\">// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled</span>\n <span class=\"token literal-property property\">tracePropagationTargets</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">\"localhost\"</span><span class=\"token punctuation\">,</span> <span class=\"token regex\"><span class=\"token regex-delimiter\">/</span><span class=\"token regex-source language-regex\">^https:\\/\\/yourserver\\.io\\/api</span><span class=\"token regex-delimiter\">/</span></span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n\n <span class=\"token comment\">// Set profilesSampleRate to 1.0 to profile every transaction.</span>\n <span class=\"token comment\">// Since profilesSampleRate is relative to tracesSampleRate,</span>\n <span class=\"token comment\">// the final profiling rate can be computed as tracesSampleRate * profilesSampleRate</span>\n <span class=\"token comment\">// For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would</span>\n <span class=\"token comment\">// results in 25% of transactions being profiled (0.5*0.5=0.25)</span>\n <span class=\"token literal-property property\">profilesSampleRate</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>Angular versions 12 and above</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/angular-ivy\"</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 <span class=\"token literal-property property\">integrations</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n <span class=\"token comment\">// Add browser profiling integration to the list of integrations</span>\n <span class=\"token keyword\">new</span> <span class=\"token class-name\">Sentry<span class=\"token punctuation\">.</span>browserProfilingIntegration</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n <span class=\"token keyword\">new</span> <span class=\"token class-name\">Sentry<span class=\"token punctuation\">.</span>BrowserTracing</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">]</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 comment\">// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled</span>\n <span class=\"token literal-property property\">tracePropagationTargets</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">\"localhost\"</span><span class=\"token punctuation\">,</span> <span class=\"token regex\"><span class=\"token regex-delimiter\">/</span><span class=\"token regex-source language-regex\">^https:\\/\\/yourserver\\.io\\/api</span><span class=\"token regex-delimiter\">/</span></span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n\n <span class=\"token comment\">// Set profilesSampleRate to 1.0 to profile every transaction.</span>\n <span class=\"token comment\">// Since profilesSampleRate is relative to tracesSampleRate,</span>\n <span class=\"token comment\">// the final profiling rate can be computed as tracesSampleRate * profilesSampleRate</span>\n <span class=\"token comment\">// For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would</span>\n <span class=\"token comment\">// results in 25% of transactions being profiled (0.5*0.5=0.25)</span>\n <span class=\"token literal-property property\">profilesSampleRate</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>"}
Loading
Loading