Skip to content
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
Expand Up @@ -13,9 +13,10 @@ import {getInstallConfig as getNodeInstallConfig} from 'sentry/utils/gettingStar
const getJSConfigureSnippet = (params: DocsParams) => `
Sentry.init({
dsn: "${params.dsn}",
integrations: [
Sentry.metrics.metricsAggregatorIntegration(),
],
// Only needed for SDK versions < 8.0.0
// integrations: [
// Sentry.metrics.metricsAggregatorIntegration(),
// ],
});`;

const JSExampleConfig = {
Expand Down Expand Up @@ -100,22 +101,13 @@ export const getReactNativeMetricsOnboarding = ({
const getJSMetricsOnboardingConfigure = (params: DocsParams) => [
{
type: StepType.CONFIGURE,
description: tct(
'To enable capturing metrics, you first need to add the metrics aggregator integration under the [codeNamespace:Sentry.metrics] namespace.',
{
codeNamespace: <code />,
}
description: t(
'With the default snippet in place, there is no need for any further configuration.'
),
configurations: [
{
code: [
{
label: 'Counter',
value: 'counter',
language: 'javascript',
code: getJSConfigureSnippet(params),
},
],
code: getJSConfigureSnippet(params),
language: 'javascript',
},
],
},
Expand Down Expand Up @@ -159,9 +151,10 @@ const getJSMetricsOnboardingVerify = ({docsLink}: {docsLink: string}) => [
const getJSServerConfigureSnippet = (params: DocsParams) => `
Sentry.init({
dsn: "${params.dsn}",
_experiments: {
metricsAggregator: true,
},
// Only needed for SDK versions < 8.0.0
// _experiments: {
// metricsAggregator: true,
// },
});`;

export const getJSServerMetricsOnboarding = (): OnboardingConfig => ({
Expand All @@ -183,23 +176,13 @@ export const getJSServerMetricsOnboarding = (): OnboardingConfig => ({
configure: params => [
{
type: StepType.CONFIGURE,
description: tct(
'To enable capturing metrics, you first need to add the [codeIntegration:metricsAggregator] experiment to your [codeNamespace:Sentry.init] call in your main process.',
{
codeIntegration: <code />,
codeNamespace: <code />,
}
description: t(
'With the default snippet in place, there is no need for any further configuration.'
),
configurations: [
{
code: [
{
label: 'JavaScript',
value: 'javascript',
language: 'javascript',
code: getJSServerConfigureSnippet(params),
},
],
code: getJSServerConfigureSnippet(params),
language: 'javascript',
},
],
},
Expand Down
25 changes: 8 additions & 17 deletions static/app/gettingStartedDocs/bun/bun.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ const getVerifySnippet = () => `try {
const getMetricsConfigureSnippet = (params: DocsParams) => `
Sentry.init({
dsn: "${params.dsn}",
_experiments: {
metricsAggregator: true,
},
// Only needed for SDK versions < 8.0.0
// _experiments: {
// metricsAggregator: true,
// },
});`;

const onboarding: OnboardingConfig = {
Expand Down Expand Up @@ -123,23 +124,13 @@ const customMetricsOnboarding: OnboardingConfig = {
configure: params => [
{
type: StepType.CONFIGURE,
description: tct(
'To enable capturing metrics, you first need to add the [codeIntegration:metricsAggregator] experiment to your [codeNamespace:Sentry.init] call in your main process.',
{
codeIntegration: <code />,
codeNamespace: <code />,
}
description: t(
'With the default snippet in place, there is no need for any further configuration.'
),
configurations: [
{
code: [
{
label: 'JavaScript',
value: 'javascript',
language: 'javascript',
code: getMetricsConfigureSnippet(params),
},
],
code: getMetricsConfigureSnippet(params),
language: 'javascript',
},
],
},
Expand Down
25 changes: 8 additions & 17 deletions static/app/gettingStartedDocs/deno/deno.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ setTimeout(() => {
const getMetricsConfigureSnippet = (params: DocsParams) => `;
Sentry.init({
dsn: '${params.dsn}',
_experiments: {
metricsAggregator: true,
},
// Only needed for SDK versions < 8.0.0
// _experiments: {
// metricsAggregator: true,
// },
});
`;

Expand Down Expand Up @@ -132,23 +133,13 @@ const customMetricsOnboarding: OnboardingConfig = {
configure: params => [
{
type: StepType.CONFIGURE,
description: tct(
'To enable capturing metrics, you first need to add the [codeIntegration:metricsAggregator] experiment to your [codeNamespace:Sentry.init] call in your main process.',
{
codeIntegration: <code />,
codeNamespace: <code />,
}
description: t(
'With the default snippet in place, there is no need for any further configuration.'
),
configurations: [
{
code: [
{
label: 'JavaScript',
value: 'javascript',
language: 'javascript',
code: getMetricsConfigureSnippet(params),
},
],
code: getMetricsConfigureSnippet(params),
language: 'javascript',
},
],
},
Expand Down
25 changes: 8 additions & 17 deletions static/app/gettingStartedDocs/electron/electron.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ import * as Sentry from '@sentry/electron/main';
// main process init
Sentry.init({
dsn: "${params.dsn}",
_experiments: {
metricsAggregator: true,
},
// Only needed for SDK versions < 8.0.0
// _experiments: {
// metricsAggregator: true,
// },
});`;

const getInstallConfig = () => [
Expand Down Expand Up @@ -188,23 +189,13 @@ const customMetricsOnboarding: OnboardingConfig = {
configure: params => [
{
type: StepType.CONFIGURE,
description: tct(
'To enable capturing metrics, you first need to add the [codeIntegration:metricsAggregator] experiment to your [codeNamespace:Sentry.init] call in your main process.',
{
codeIntegration: <code />,
codeNamespace: <code />,
}
description: t(
'With the default snippet in place, there is no need for any further configuration.'
),
configurations: [
{
code: [
{
label: 'JavaScript',
value: 'javascript',
language: 'javascript',
code: getMetricsConfigureSnippet(params),
},
],
code: getMetricsConfigureSnippet(params),
language: 'javascript',
},
],
},
Expand Down
25 changes: 8 additions & 17 deletions static/app/gettingStartedDocs/node/awslambda.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ exports.handler = Sentry.wrapHandler(async (event, context) => {
const getMetricsConfigureSnippet = (params: DocsParams) => `
Sentry.init({
dsn: "${params.dsn}",
_experiments: {
metricsAggregator: true,
},
// Only needed for SDK versions < 8.0.0
// _experiments: {
// metricsAggregator: true,
// },
});`;

const onboarding: OnboardingConfig = {
Expand Down Expand Up @@ -107,23 +108,13 @@ const customMetricsOnboarding: OnboardingConfig = {
configure: params => [
{
type: StepType.CONFIGURE,
description: tct(
'To enable capturing metrics, you first need to add the [codeIntegration:metricsAggregator] experiment to your [codeNamespace:Sentry.init] call in your main process.',
{
codeIntegration: <code />,
codeNamespace: <code />,
}
description: t(
'With the default snippet in place, there is no need for any further configuration.'
),
configurations: [
{
code: [
{
label: 'JavaScript',
value: 'javascript',
language: 'javascript',
code: getMetricsConfigureSnippet(params),
},
],
code: getMetricsConfigureSnippet(params),
language: 'javascript',
},
],
},
Expand Down
25 changes: 8 additions & 17 deletions static/app/gettingStartedDocs/node/gcpfunctions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ exports.helloHttp = Sentry.wrapHttpFunction((req, res) => {
const getMetricsConfigureSnippet = (params: DocsParams) => `
Sentry.init({
dsn: "${params.dsn}",
_experiments: {
metricsAggregator: true,
},
// Only needed for SDK versions < 8.0.0
// _experiments: {
// metricsAggregator: true,
// },
});`;

const onboarding: OnboardingConfig = {
Expand Down Expand Up @@ -129,23 +130,13 @@ const customMetricsOnboarding: OnboardingConfig = {
configure: params => [
{
type: StepType.CONFIGURE,
description: tct(
'To enable capturing metrics, you first need to add the [codeIntegration:metricsAggregator] experiment to your [codeNamespace:Sentry.init] call in your main process.',
{
codeIntegration: <code />,
codeNamespace: <code />,
}
description: t(
'With the default snippet in place, there is no need for any further configuration.'
),
configurations: [
{
code: [
{
label: 'JavaScript',
value: 'javascript',
language: 'javascript',
code: getMetricsConfigureSnippet(params),
},
],
code: getMetricsConfigureSnippet(params),
language: 'javascript',
},
],
},
Expand Down