Skip to content

ref(node-integration-tests): Migrate to new Http integration #10765

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

Merged
merged 2 commits into from
Feb 21, 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,6 +1,5 @@
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import cors from 'cors';
import express from 'express';

Expand All @@ -9,8 +8,7 @@ const app = express();
Sentry.init({
dsn: 'https://[email protected]/1337',
release: '1.0',
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import cors from 'cors';
import express from 'express';

Expand All @@ -9,8 +8,7 @@ const app = express();
Sentry.init({
dsn: 'https://[email protected]/1337',
release: '1.0',
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import cors from 'cors';
import express from 'express';

Expand All @@ -9,8 +8,7 @@ const app = express();
Sentry.init({
dsn: 'https://[email protected]/1337',
release: '1.0',
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import cors from 'cors';
import express from 'express';

Expand All @@ -9,8 +8,7 @@ const app = express();
Sentry.init({
dsn: 'https://[email protected]/1337',
release: '1.0',
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import cors from 'cors';
import express from 'express';

Expand All @@ -9,8 +8,7 @@ const app = express();
Sentry.init({
dsn: 'https://[email protected]/1337',
release: '1.0',
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import cors from 'cors';
import express from 'express';

Expand All @@ -9,8 +8,7 @@ const app = express();
Sentry.init({
dsn: 'https://[email protected]/1337',
release: '1.0',
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import cors from 'cors';
import express from 'express';

Expand All @@ -9,8 +8,7 @@ const app = express();
Sentry.init({
dsn: 'https://[email protected]/1337',
release: '1.0',
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ const app = express();
Sentry.init({
dsn: 'https://[email protected]/1337',
release: '1.0',
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Sentry.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import express from 'express';

const app = express();

Sentry.init({
dsn: 'https://[email protected]/1337',
release: '1.0',
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import http from 'http';
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import cors from 'cors';
import express from 'express';

Expand All @@ -14,8 +13,7 @@ Sentry.init({
release: '1.0',
environment: 'prod',
tracePropagationTargets: [/^(?!.*express).*$/],
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as http from 'http';
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import cors from 'cors';
import express from 'express';

Expand All @@ -15,8 +14,7 @@ Sentry.init({
environment: 'prod',
// disable requests to /express
tracePropagationTargets: [/^(?!.*express).*$/],
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import http from 'http';
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import cors from 'cors';
import express from 'express';

Expand All @@ -15,8 +14,7 @@ Sentry.init({
environment: 'prod',
// disable requests to /express
tracePropagationTargets: [/^(?!.*express).*$/],
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import http from 'http';
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import cors from 'cors';
import express from 'express';

Expand All @@ -16,8 +15,7 @@ Sentry.init({
environment: 'prod',
// disable requests to /express
tracePropagationTargets: [/^(?!.*express).*$/],
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
// TODO: We're rethinking the mechanism for including Pii data in DSC, hence commenting out sendDefaultPii for now
// sendDefaultPii: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import http from 'http';
import { loggingTransport, startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import cors from 'cors';
import express from 'express';

Expand All @@ -14,8 +13,7 @@ Sentry.init({
release: '1.0',
environment: 'prod',
tracePropagationTargets: [/^(?!.*express).*$/],
// eslint-disable-next-line deprecation/deprecation
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Tracing.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Sentry.init({
release: '1.0',
// disable attaching headers to /test/* endpoints
tracePropagationTargets: [/^(?!.*test).*$/],
integrations: [new Sentry.Integrations.Http({ tracing: true }), new Sentry.Integrations.Express({ app })],
integrations: [Sentry.httpIntegration({ tracing: true }), new Sentry.Integrations.Express({ app })],
tracesSampleRate: 1.0,
transport: loggingTransport,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Sentry.init({
release: '1.0',
tracesSampleRate: 1.0,
tracePropagationTargets: [/\/v0/, 'v1'],
integrations: [new Sentry.Integrations.Http({ tracing: true })],
integrations: [Sentry.httpIntegration({ tracing: true })],
});

Sentry.startSpan({ name: 'test_span' }, () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import { ApolloServer, gql } from 'apollo-server';

Sentry.init({
dsn: 'https://[email protected]/1337',
release: '1.0',
tracesSampleRate: 1.0,
// eslint-disable-next-line deprecation/deprecation
integrations: [new Tracing.Integrations.GraphQL(), new Tracing.Integrations.Apollo()],
integrations: [new Sentry.Integrations.GraphQL(), new Sentry.Integrations.Apollo()],
});

const typeDefs = gql`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { PrismaClient } from '@prisma/client';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';

const client = new PrismaClient();

Sentry.init({
dsn: 'https://[email protected]/1337',
release: '1.0',
tracesSampleRate: 1.0,
// eslint-disable-next-line deprecation/deprecation
integrations: [new Tracing.Integrations.Prisma({ client })],
integrations: [new Sentry.Integrations.Prisma({ client })],
});

// eslint-disable-next-line @typescript-eslint/no-floating-promises
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Sentry.init({
release: '1.0',
tracesSampleRate: 1.0,
tracePropagationTargets: [/\/v0/, 'v1'],
integrations: [new Sentry.Integrations.Http({ tracing: true })],
integrations: [Sentry.httpIntegration({ tracing: true })],
});

Sentry.startSpan({ name: 'test_span' }, () => {
Expand Down