Browse Source

ref(onboarding): Remove unsupported serverlesscloud (frontend) (#70719)

Remove already hidden onboarding guide for Serverless Cloud. This
package does not exist anymore:
https://www.serverless.com/blog/serverless-cloud-spins-off-as-ampt

ref https://github.com/getsentry/sentry-docs/issues/7718
Sigrid Huemer 10 months ago
parent
commit
d99e2d3b8a

+ 0 - 1
static/app/components/onboarding/frameworkSuggestionModal.tsx

@@ -68,7 +68,6 @@ const topNodeFrameworks: PlatformKey[] = [
   'node-express',
   'node-awslambda',
   'node-gcpfunctions',
-  'node-serverlesscloud',
   'node-koa',
 ];
 

+ 0 - 1
static/app/data/platformCategories.tsx

@@ -429,7 +429,6 @@ export const feedbackWebApiPlatforms: readonly PlatformKey[] = [
   'node-azurefunctions',
   'node-connect',
   'node-gcpfunctions',
-  'node-serverlesscloud',
   'minidump',
   'python-asgi',
   'python-awslambda',

+ 0 - 8
static/app/data/platforms.tsx

@@ -410,14 +410,6 @@ export const platforms: PlatformIntegration[] = [
     language: 'node',
     link: 'https://docs.sentry.io/platforms/javascript/guides/koa/',
   },
-  {
-    // this isn't supported anymore, not in docs, nor in project selector
-    id: 'node-serverlesscloud',
-    name: 'Serverless (Node)',
-    type: 'framework',
-    language: 'node',
-    link: 'https://docs.sentry.io/platforms/javascript/guides/serverless-cloud/',
-  },
   {
     id: 'php',
     name: 'PHP',

+ 0 - 15
static/app/gettingStartedDocs/node/serverlesscloud.spec.tsx

@@ -1,15 +0,0 @@
-import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout';
-import {screen} from 'sentry-test/reactTestingLibrary';
-
-import docs from './serverlesscloud';
-
-describe('serverlesscloud onboarding docs', function () {
-  it('renders docs correctly', function () {
-    renderWithOnboardingLayout(docs);
-
-    // Renders main headings
-    expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
-    expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
-    expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument();
-  });
-});

+ 0 - 110
static/app/gettingStartedDocs/node/serverlesscloud.tsx

@@ -1,110 +0,0 @@
-import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/step';
-import type {
-  Docs,
-  DocsParams,
-  OnboardingConfig,
-} from 'sentry/components/onboarding/gettingStartedDoc/types';
-import {CrashReportWebApiOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
-import {t, tct} from 'sentry/locale';
-
-type Params = DocsParams;
-
-const getSdkSetupSnippet = (params: Params) => `
-const api = require("@serverless/cloud");
-const Sentry = require('@sentry/node');
-
-// or using ESM
-// import api from "@serverless/cloud";
-// import * as Sentry from "@sentry/node";
-
-Sentry.init({
-dsn: "${params.dsn}",
-integrations: [
-// enable HTTP calls tracing
-new Sentry.Integrations.Http({ tracing: true }),
-// enable Express.js middleware tracing
-new Sentry.Integrations.Express({ app }),
-// Automatically instrument Node.js libraries and frameworks
-...Sentry.autoDiscoverNodePerformanceMonitoringIntegrations(),
-],
-environment: params.INSTANCE_NAME,
-// Performance Monitoring
-// Capture 100% of the transactions
-tracesSampleRate: 1.0,
-});
-
-// RequestHandler creates a separate execution context, so that all
-// transactions/spans/breadcrumbs are isolated across requests
-api.use(Sentry.Handlers.requestHandler());
-// TracingHandler creates a trace for every incoming request
-api.use(Sentry.Handlers.tracingHandler());
-
-// All controllers should live here
-api.get("/", function rootHandler(req, res) {
-res.end("Hello world!");
-});
-
-// The error handler must be before any other error middleware and after all controllers
-api.use(Sentry.Handlers.errorHandler());
-
-// Optional fallthrough error handler
-api.use(function onError(err, req, res, next) {
-// The error id is attached to \`res.sentry\` to be returned
-// and optionally displayed to the user for support.
-res.statusCode = 500;
-res.end(res.sentry + "\\n");
-});`;
-
-const getVerifySnippet = () => `
-api.get("/debug-sentry", function mainHandler(req, res) {
-  throw new Error("My first Sentry error!");
-});
-`;
-
-const onboarding: OnboardingConfig = {
-  install: () => [
-    {
-      type: StepType.INSTALL,
-      description: tct('Add [code:@sentry/node] as a dependency:', {code: <code />}),
-      configurations: [
-        {
-          language: 'bash',
-          code: `cloud install @sentry/node:`,
-        },
-      ],
-    },
-  ],
-  configure: params => [
-    {
-      type: StepType.CONFIGURE,
-      description: t('Sentry should be initialized as early in your app as possible.'),
-      configurations: [
-        {
-          language: 'javascript',
-          code: getSdkSetupSnippet(params),
-        },
-      ],
-    },
-  ],
-  verify: () => [
-    {
-      type: StepType.VERIFY,
-      description: t(
-        "This snippet contains an intentional error and can be used as a test to make sure that everything's working as expected."
-      ),
-      configurations: [
-        {
-          language: 'javascript',
-          code: getVerifySnippet(),
-        },
-      ],
-    },
-  ],
-};
-
-const docs: Docs = {
-  onboarding,
-  crashReportOnboarding: CrashReportWebApiOnboarding,
-};
-
-export default docs;

+ 0 - 1
static/app/types/project.tsx

@@ -228,7 +228,6 @@ export type PlatformKey =
   | 'node-koa'
   | 'node-nodeawslambda'
   | 'node-nodegcpfunctions'
-  | 'node-serverlesscloud'
   | 'objc'
   | 'other'
   | 'perl'