From 212269bd91b8efab1c4d1a0e56280685e533b4c8 Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Wed, 17 Apr 2024 12:07:40 +0100 Subject: [PATCH 1/2] feat(node): Add `connect` instrumentation --- .github/workflows/build.yml | 1 + .../node-connect-app/.gitignore | 1 + .../test-applications/node-connect-app/.npmrc | 2 + .../node-connect-app/package.json | 31 +++++ .../node-connect-app/playwright.config.ts | 62 +++++++++ .../node-connect-app/src/app.ts | 59 ++++++++ .../node-connect-app/start-event-proxy.ts | 6 + .../node-connect-app/tests/errors.test.ts | 71 ++++++++++ .../tests/transactions.test.ts | 126 ++++++++++++++++++ .../node-connect-app/tsconfig.json | 10 ++ .../node-integration-tests/package.json | 1 + .../suites/tracing/connect/scenario.js | 37 +++++ .../suites/tracing/connect/test.ts | 63 +++++++++ packages/aws-serverless/src/index.ts | 2 + packages/bun/src/index.ts | 2 + packages/google-cloud-serverless/src/index.ts | 2 + packages/node/package.json | 1 + packages/node/src/index.ts | 1 + .../node/src/integrations/tracing/connect.ts | 30 +++++ .../node/src/integrations/tracing/index.ts | 2 + yarn.lock | 17 +++ 21 files changed, 527 insertions(+) create mode 100644 dev-packages/e2e-tests/test-applications/node-connect-app/.gitignore create mode 100644 dev-packages/e2e-tests/test-applications/node-connect-app/.npmrc create mode 100644 dev-packages/e2e-tests/test-applications/node-connect-app/package.json create mode 100644 dev-packages/e2e-tests/test-applications/node-connect-app/playwright.config.ts create mode 100644 dev-packages/e2e-tests/test-applications/node-connect-app/src/app.ts create mode 100644 dev-packages/e2e-tests/test-applications/node-connect-app/start-event-proxy.ts create mode 100644 dev-packages/e2e-tests/test-applications/node-connect-app/tests/errors.test.ts create mode 100644 dev-packages/e2e-tests/test-applications/node-connect-app/tests/transactions.test.ts create mode 100644 dev-packages/e2e-tests/test-applications/node-connect-app/tsconfig.json create mode 100644 dev-packages/node-integration-tests/suites/tracing/connect/scenario.js create mode 100644 dev-packages/node-integration-tests/suites/tracing/connect/test.ts create mode 100644 packages/node/src/integrations/tracing/connect.ts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81ca274c81b3..233e21c812a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1051,6 +1051,7 @@ jobs: 'node-nestjs-app', 'node-exports-test-app', 'node-koa-app', + 'node-connect-app', 'vue-3', 'webpack-4', 'webpack-5' diff --git a/dev-packages/e2e-tests/test-applications/node-connect-app/.gitignore b/dev-packages/e2e-tests/test-applications/node-connect-app/.gitignore new file mode 100644 index 000000000000..1521c8b7652b --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-connect-app/.gitignore @@ -0,0 +1 @@ +dist diff --git a/dev-packages/e2e-tests/test-applications/node-connect-app/.npmrc b/dev-packages/e2e-tests/test-applications/node-connect-app/.npmrc new file mode 100644 index 000000000000..070f80f05092 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-connect-app/.npmrc @@ -0,0 +1,2 @@ +@sentry:registry=http://127.0.0.1:4873 +@sentry-internal:registry=http://127.0.0.1:4873 diff --git a/dev-packages/e2e-tests/test-applications/node-connect-app/package.json b/dev-packages/e2e-tests/test-applications/node-connect-app/package.json new file mode 100644 index 000000000000..ad93a513eca8 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-connect-app/package.json @@ -0,0 +1,31 @@ +{ + "name": "node-connect-app", + "version": "1.0.0", + "private": true, + "scripts": { + "start": "ts-node src/app.ts", + "test": "playwright test", + "clean": "npx rimraf node_modules pnpm-lock.yaml", + "typecheck": "tsc", + "test:build": "pnpm install && pnpm run typecheck", + "test:assert": "pnpm test" + }, + "dependencies": { + "@sentry/node": "latest || *", + "@sentry/types": "latest || *", + "@sentry/core": "latest || *", + "@sentry/utils": "latest || *", + "@sentry/opentelemetry": "latest || *", + "@types/node": "18.15.1", + "connect": "3.7.0", + "typescript": "4.9.5", + "ts-node": "10.9.1" + }, + "devDependencies": { + "@sentry-internal/event-proxy-server": "link:../../../event-proxy-server", + "@playwright/test": "^1.38.1" + }, + "volta": { + "extends": "../../package.json" + } +} diff --git a/dev-packages/e2e-tests/test-applications/node-connect-app/playwright.config.ts b/dev-packages/e2e-tests/test-applications/node-connect-app/playwright.config.ts new file mode 100644 index 000000000000..b66c64ac5f4c --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-connect-app/playwright.config.ts @@ -0,0 +1,62 @@ +import type { PlaywrightTestConfig } from '@playwright/test'; +import { devices } from '@playwright/test'; + +const connectPort = 3030; +const eventProxyPort = 3031; + +/** + * See https://playwright.dev/docs/test-configuration. + */ +const config: PlaywrightTestConfig = { + testDir: './tests', + /* Maximum time one test can run for. */ + timeout: 150_000, + expect: { + /** + * Maximum time expect() should wait for the condition to be met. + * For example in `await expect(locator).toHaveText();` + */ + timeout: 10000, + }, + /* Run tests in files in parallel */ + fullyParallel: true, + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + retries: 0, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: 'list', + /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + use: { + /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ + actionTimeout: 0, + /* Base URL to use in actions like `await page.goto('/')`. */ + baseURL: `http://localhost:${connectPort}`, + + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + trace: 'on-first-retry', + }, + + /* Configure projects for major browsers */ + projects: [ + { + name: 'chromium', + use: { + ...devices['Desktop Chrome'], + }, + }, + ], + + /* Run your local dev server before starting the tests */ + webServer: [ + { + command: 'pnpm ts-node-script start-event-proxy.ts', + port: eventProxyPort, + }, + { + command: 'pnpm start', + port: connectPort, + }, + ], +}; + +export default config; diff --git a/dev-packages/e2e-tests/test-applications/node-connect-app/src/app.ts b/dev-packages/e2e-tests/test-applications/node-connect-app/src/app.ts new file mode 100644 index 000000000000..375554845d6f --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-connect-app/src/app.ts @@ -0,0 +1,59 @@ +import type * as S from '@sentry/node'; +const Sentry = require('@sentry/node') as typeof S; + +Sentry.init({ + environment: 'qa', // dynamic sampling bias to keep transactions + dsn: process.env.E2E_TEST_DSN, + integrations: [], + tracesSampleRate: 1, + tunnel: 'http://localhost:3031/', // proxy server + tracePropagationTargets: ['http://localhost:3030', '/external-allowed'], +}); + +import type * as H from 'http'; +import type C from 'connect'; + +const connect = require('connect') as typeof C; +const http = require('http') as typeof H; + +const app = connect(); +const port = 3030; + +app.use('/test-success', (req, res, next) => { + res.end( + JSON.stringify({ + version: 'v1', + }), + ); +}); + +app.use('/test-error', async (req, res, next) => { + const exceptionId = Sentry.captureException(new Error('Sentry Test Error')); + + await Sentry.flush(); + + res.end(JSON.stringify({ exceptionId })); + next(); +}); + +app.use('/test-exception', () => { + throw new Error('This is an exception'); +}); + +app.use('/test-transaction', (req, res, next) => { + Sentry.startSpan({ name: 'test-span' }, () => {}); + + res.end( + JSON.stringify({ + version: 'v1', + }), + ); + + next(); +}); + +Sentry.setupConnectErrorHandler(app); + +const server = http.createServer(app); + +server.listen(port); diff --git a/dev-packages/e2e-tests/test-applications/node-connect-app/start-event-proxy.ts b/dev-packages/e2e-tests/test-applications/node-connect-app/start-event-proxy.ts new file mode 100644 index 000000000000..97434b7c7b07 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-connect-app/start-event-proxy.ts @@ -0,0 +1,6 @@ +import { startEventProxyServer } from '@sentry-internal/event-proxy-server'; + +startEventProxyServer({ + port: 3031, + proxyServerName: 'node-connect-app', +}); diff --git a/dev-packages/e2e-tests/test-applications/node-connect-app/tests/errors.test.ts b/dev-packages/e2e-tests/test-applications/node-connect-app/tests/errors.test.ts new file mode 100644 index 000000000000..68ba042612d9 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-connect-app/tests/errors.test.ts @@ -0,0 +1,71 @@ +import { expect, test } from '@playwright/test'; +import { waitForError } from '@sentry-internal/event-proxy-server'; +import axios, { AxiosError } from 'axios'; + +const authToken = process.env.E2E_TEST_AUTH_TOKEN; +const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG; +const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT; +const EVENT_POLLING_TIMEOUT = 90_000; + +test('Sends exception to Sentry', async ({ baseURL }) => { + const { data } = await axios.get(`${baseURL}/test-error`); + const { exceptionId } = data; + + const url = `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${exceptionId}/`; + + console.log(`Polling for error eventId: ${exceptionId}`); + + await expect + .poll( + async () => { + try { + const response = await axios.get(url, { headers: { Authorization: `Bearer ${authToken}` } }); + + return response.status; + } catch (e) { + if (e instanceof AxiosError && e.response) { + if (e.response.status !== 404) { + throw e; + } else { + return e.response.status; + } + } else { + throw e; + } + } + }, + { timeout: EVENT_POLLING_TIMEOUT }, + ) + .toBe(200); +}); + +test('Sends correct error event', async ({ baseURL }) => { + const errorEventPromise = waitForError('node-connect-app', event => { + return !event.type && event.exception?.values?.[0]?.value === 'This is an exception'; + }); + + try { + await axios.get(`${baseURL}/test-exception`); + } catch { + // this results in an error, but we don't care - we want to check the error event + } + + const errorEvent = await errorEventPromise; + + expect(errorEvent.exception?.values).toHaveLength(1); + expect(errorEvent.exception?.values?.[0]?.value).toBe('This is an exception'); + + expect(errorEvent.request).toEqual({ + method: 'GET', + cookies: {}, + headers: expect.any(Object), + url: 'http://localhost:3030/test-exception', + }); + + expect(errorEvent.transaction).toEqual('GET /test-exception'); + + expect(errorEvent.contexts?.trace).toEqual({ + trace_id: expect.any(String), + span_id: expect.any(String), + }); +}); diff --git a/dev-packages/e2e-tests/test-applications/node-connect-app/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/node-connect-app/tests/transactions.test.ts new file mode 100644 index 000000000000..f42c417371c6 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-connect-app/tests/transactions.test.ts @@ -0,0 +1,126 @@ +import { expect, test } from '@playwright/test'; +import { waitForTransaction } from '@sentry-internal/event-proxy-server'; +import axios, { AxiosError } from 'axios'; + +const authToken = process.env.E2E_TEST_AUTH_TOKEN; +const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG; +const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT; +const EVENT_POLLING_TIMEOUT = 90_000; + +test('Sends an API route transaction', async ({ baseURL }) => { + const pageloadTransactionEventPromise = waitForTransaction('node-connect-app', transactionEvent => { + return ( + transactionEvent?.contexts?.trace?.op === 'http.server' && + transactionEvent?.transaction === 'GET /test-transaction' + ); + }); + + await axios.get(`${baseURL}/test-transaction`); + + const transactionEvent = await pageloadTransactionEventPromise; + const transactionEventId = transactionEvent.event_id; + + expect(transactionEvent.contexts?.trace).toEqual({ + data: { + 'sentry.source': 'route', + 'sentry.origin': 'auto.http.otel.http', + 'sentry.op': 'http.server', + 'sentry.sample_rate': 1, + url: 'http://localhost:3030/test-transaction', + 'otel.kind': 'SERVER', + 'http.response.status_code': 200, + 'http.url': 'http://localhost:3030/test-transaction', + 'http.host': 'localhost:3030', + 'net.host.name': 'localhost', + 'http.method': 'GET', + 'http.scheme': 'http', + 'http.target': '/test-transaction', + 'http.user_agent': 'axios/1.6.7', + 'http.flavor': '1.1', + 'net.transport': 'ip_tcp', + 'net.host.ip': expect.any(String), + 'net.host.port': expect.any(Number), + 'net.peer.ip': expect.any(String), + 'net.peer.port': expect.any(Number), + 'http.status_code': 200, + 'http.status_text': 'OK', + 'http.route': '/test-transaction', + }, + op: 'http.server', + span_id: expect.any(String), + status: 'ok', + trace_id: expect.any(String), + origin: 'auto.http.otel.http', + }); + + expect(transactionEvent).toEqual( + expect.objectContaining({ + spans: [ + { + data: { + 'sentry.origin': 'manual', + 'otel.kind': 'INTERNAL', + }, + description: 'test-span', + parent_span_id: expect.any(String), + span_id: expect.any(String), + start_timestamp: expect.any(Number), + status: 'ok', + timestamp: expect.any(Number), + trace_id: expect.any(String), + origin: 'manual', + }, + { + data: { + 'sentry.origin': 'manual', + 'http.route': '/test-transaction', + 'connect.type': 'request_handler', + 'connect.name': '/test-transaction', + 'otel.kind': 'INTERNAL', + }, + description: 'request handler - /test-transaction', + parent_span_id: expect.any(String), + span_id: expect.any(String), + start_timestamp: expect.any(Number), + status: 'ok', + timestamp: expect.any(Number), + trace_id: expect.any(String), + origin: 'manual', + }, + ], + transaction: 'GET /test-transaction', + type: 'transaction', + transaction_info: { + source: 'route', + }, + }), + ); + + await expect + .poll( + async () => { + try { + const response = await axios.get( + `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`, + { headers: { Authorization: `Bearer ${authToken}` } }, + ); + + return response.status; + } catch (e) { + if (e instanceof AxiosError && e.response) { + if (e.response.status !== 404) { + throw e; + } else { + return e.response.status; + } + } else { + throw e; + } + } + }, + { + timeout: EVENT_POLLING_TIMEOUT, + }, + ) + .toBe(200); +}); diff --git a/dev-packages/e2e-tests/test-applications/node-connect-app/tsconfig.json b/dev-packages/e2e-tests/test-applications/node-connect-app/tsconfig.json new file mode 100644 index 000000000000..17bd2c1f4c00 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-connect-app/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "types": ["node"], + "esModuleInterop": true, + "lib": ["dom", "dom.iterable", "esnext"], + "strict": true, + "outDir": "dist" + }, + "include": ["*.ts"] +} diff --git a/dev-packages/node-integration-tests/package.json b/dev-packages/node-integration-tests/package.json index 2d16529cc748..870c2e204f82 100644 --- a/dev-packages/node-integration-tests/package.json +++ b/dev-packages/node-integration-tests/package.json @@ -37,6 +37,7 @@ "@types/pg": "^8.6.5", "apollo-server": "^3.11.1", "axios": "^1.6.7", + "connect": "^3.7.0", "cors": "^2.8.5", "cron": "^3.1.6", "express": "^4.17.3", diff --git a/dev-packages/node-integration-tests/suites/tracing/connect/scenario.js b/dev-packages/node-integration-tests/suites/tracing/connect/scenario.js new file mode 100644 index 000000000000..b4013cd20434 --- /dev/null +++ b/dev-packages/node-integration-tests/suites/tracing/connect/scenario.js @@ -0,0 +1,37 @@ +const { loggingTransport, sendPortToRunner } = require('@sentry-internal/node-integration-tests'); +const Sentry = require('@sentry/node'); + +const port = 5986; + +Sentry.init({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + release: '1.0', + tracesSampleRate: 1.0, + transport: loggingTransport, +}); + +const connect = require('connect'); +const http = require('http'); + +const init = async () => { + const app = connect(); + + app.use('/', function (req, res, next) { + res.end('Hello World'); + next(); + }); + + app.use('/error', function () { + throw new Error('Sentry Test Error'); + }); + + Sentry.setupConnectErrorHandler(app); + + const server = http.createServer(app); + + server.listen(port); + + sendPortToRunner(port); +}; + +init(); diff --git a/dev-packages/node-integration-tests/suites/tracing/connect/test.ts b/dev-packages/node-integration-tests/suites/tracing/connect/test.ts new file mode 100644 index 000000000000..01ea447a1feb --- /dev/null +++ b/dev-packages/node-integration-tests/suites/tracing/connect/test.ts @@ -0,0 +1,63 @@ +import { cleanupChildProcesses, createRunner } from '../../../utils/runner'; + +jest.setTimeout(20000); + +describe('connect auto-instrumentation', () => { + afterAll(async () => { + cleanupChildProcesses(); + }); + + const EXPECTED_TRANSACTION = { + transaction: 'GET /', + spans: expect.arrayContaining([ + expect.objectContaining({ + data: expect.objectContaining({ + 'connect.name': '/', + 'connect.type': 'request_handler', + 'http.route': '/', + 'otel.kind': 'INTERNAL', + 'sentry.origin': 'manual', + }), + description: 'request handler - /', + origin: 'manual', + status: 'ok', + }), + ]), + }; + + const EXPECTED_EVENT = { + exception: { + values: [ + { + type: 'Error', + value: 'Sentry Test Error', + }, + ], + }, + }; + + test('CJS - should auto-instrument `connect` package.', done => { + createRunner(__dirname, 'scenario.js') + .expect({ transaction: EXPECTED_TRANSACTION }) + .start(done) + .makeRequest('get', '/'); + }); + + test('CJS - should capture errors in `connect` middleware.', done => { + createRunner(__dirname, 'scenario.js') + .ignore('transaction', 'session', 'sessions') + .expectError() + .expect({ event: EXPECTED_EVENT }) + .start(done) + .makeRequest('get', '/error'); + }); + + test('CJS - should report errored transactions.', done => { + createRunner(__dirname, 'scenario.js') + .ignore('event', 'session', 'sessions') + .expect({ transaction: { transaction: 'GET /error' } }) + .expectError() + .start(done) + .makeRequest('get', '/error'); + }); +}); diff --git a/packages/aws-serverless/src/index.ts b/packages/aws-serverless/src/index.ts index 0f1e801f99ed..4aef54724236 100644 --- a/packages/aws-serverless/src/index.ts +++ b/packages/aws-serverless/src/index.ts @@ -77,6 +77,8 @@ export { setupExpressErrorHandler, koaIntegration, setupKoaErrorHandler, + connectIntegration, + setupConnectErrorHandler, fastifyIntegration, graphqlIntegration, mongoIntegration, diff --git a/packages/bun/src/index.ts b/packages/bun/src/index.ts index f13e3a666c50..789d7ac0b00f 100644 --- a/packages/bun/src/index.ts +++ b/packages/bun/src/index.ts @@ -98,6 +98,8 @@ export { setupFastifyErrorHandler, koaIntegration, setupKoaErrorHandler, + connectIntegration, + setupConnectErrorHandler, graphqlIntegration, mongoIntegration, mongooseIntegration, diff --git a/packages/google-cloud-serverless/src/index.ts b/packages/google-cloud-serverless/src/index.ts index 6acc37ce419b..a2e9653f8a72 100644 --- a/packages/google-cloud-serverless/src/index.ts +++ b/packages/google-cloud-serverless/src/index.ts @@ -77,6 +77,8 @@ export { setupExpressErrorHandler, koaIntegration, setupKoaErrorHandler, + connectIntegration, + setupConnectErrorHandler, fastifyIntegration, graphqlIntegration, mongoIntegration, diff --git a/packages/node/package.json b/packages/node/package.json index 8474a22122e4..7e5391987448 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -57,6 +57,7 @@ "@opentelemetry/context-async-hooks": "^1.23.0", "@opentelemetry/core": "^1.23.0", "@opentelemetry/instrumentation": "0.48.0", + "@opentelemetry/instrumentation-connect": "0.35.0", "@opentelemetry/instrumentation-express": "0.35.0", "@opentelemetry/instrumentation-fastify": "0.33.0", "@opentelemetry/instrumentation-graphql": "0.37.0", diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index 1ece2f0d81b0..01cc4c1de1ce 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -22,6 +22,7 @@ export { postgresIntegration } from './integrations/tracing/postgres'; export { prismaIntegration } from './integrations/tracing/prisma'; export { hapiIntegration, setupHapiErrorHandler } from './integrations/tracing/hapi'; export { koaIntegration, setupKoaErrorHandler } from './integrations/tracing/koa'; +export { connectIntegration, setupConnectErrorHandler } from './integrations/tracing/connect'; export { spotlightIntegration } from './integrations/spotlight'; export { init, getDefaultIntegrations } from './sdk/init'; diff --git a/packages/node/src/integrations/tracing/connect.ts b/packages/node/src/integrations/tracing/connect.ts new file mode 100644 index 000000000000..7214321be42a --- /dev/null +++ b/packages/node/src/integrations/tracing/connect.ts @@ -0,0 +1,30 @@ +import { registerInstrumentations } from '@opentelemetry/instrumentation'; +import { ConnectInstrumentation } from '@opentelemetry/instrumentation-connect'; +import { captureException, defineIntegration } from '@sentry/core'; +import type { IntegrationFn } from '@sentry/types'; + +type ConnectApp = { + use: (middleware: any) => void; +}; + +const _connectIntegration = (() => { + return { + name: 'Connect', + setupOnce() { + registerInstrumentations({ + instrumentations: [new ConnectInstrumentation({})], + }); + }, + }; +}) satisfies IntegrationFn; + +export const connectIntegration = defineIntegration(_connectIntegration); + +function connectErrorMiddleware(err: any, req: any, res: any, next: any): void { + captureException(err); + next(err); +} + +export const setupConnectErrorHandler = (app: ConnectApp): void => { + app.use(connectErrorMiddleware); +}; diff --git a/packages/node/src/integrations/tracing/index.ts b/packages/node/src/integrations/tracing/index.ts index 85a72dac28c7..446a23e91a3b 100644 --- a/packages/node/src/integrations/tracing/index.ts +++ b/packages/node/src/integrations/tracing/index.ts @@ -1,5 +1,6 @@ import type { Integration } from '@sentry/types'; +import { connectIntegration } from './connect'; import { expressIntegration } from './express'; import { fastifyIntegration } from './fastify'; import { graphqlIntegration } from './graphql'; @@ -32,5 +33,6 @@ export function getAutoPerformanceIntegrations(): Integration[] { nestIntegration(), hapiIntegration(), koaIntegration(), + connectIntegration(), ]; } diff --git a/yarn.lock b/yarn.lock index 1a81f9473805..b181dadb5439 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4940,6 +4940,16 @@ "@opentelemetry/context-base" "^0.12.0" semver "^7.1.3" +"@opentelemetry/instrumentation-connect@0.35.0": + version "0.35.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.35.0.tgz#d7c68f46ab04f10dc8792ef1fd023eb01748d8db" + integrity sha512-COcQdFNVXyqaVGSuBgIyLu1qZUebjWyQhMAdMOOulCRznhquoyffeymQDZ0LB8XjD7kkG8if8PbykL4b8tjbNA== + dependencies: + "@opentelemetry/core" "^1.8.0" + "@opentelemetry/instrumentation" "^0.50.0" + "@opentelemetry/semantic-conventions" "^1.0.0" + "@types/connect" "3.4.36" + "@opentelemetry/instrumentation-express@0.35.0": version "0.35.0" resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-express/-/instrumentation-express-0.35.0.tgz#4391c46f4ce00d840633fd79391028c38eca01bc" @@ -6248,6 +6258,13 @@ dependencies: "@types/node" "*" +"@types/connect@3.4.36": + version "3.4.36" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.36.tgz#e511558c15a39cb29bd5357eebb57bd1459cd1ab" + integrity sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w== + dependencies: + "@types/node" "*" + "@types/content-disposition@*": version "0.5.8" resolved "https://registry.yarnpkg.com/@types/content-disposition/-/content-disposition-0.5.8.tgz#6742a5971f490dc41e59d277eee71361fea0b537" From b8660d7a731482c346f13e3062226661261d0d56 Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Wed, 17 Apr 2024 13:28:20 +0100 Subject: [PATCH 2/2] Don't emit transpiled server in test app. --- .../e2e-tests/test-applications/node-connect-app/.gitignore | 1 - .../e2e-tests/test-applications/node-connect-app/tsconfig.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 dev-packages/e2e-tests/test-applications/node-connect-app/.gitignore diff --git a/dev-packages/e2e-tests/test-applications/node-connect-app/.gitignore b/dev-packages/e2e-tests/test-applications/node-connect-app/.gitignore deleted file mode 100644 index 1521c8b7652b..000000000000 --- a/dev-packages/e2e-tests/test-applications/node-connect-app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -dist diff --git a/dev-packages/e2e-tests/test-applications/node-connect-app/tsconfig.json b/dev-packages/e2e-tests/test-applications/node-connect-app/tsconfig.json index 17bd2c1f4c00..90116e3ff023 100644 --- a/dev-packages/e2e-tests/test-applications/node-connect-app/tsconfig.json +++ b/dev-packages/e2e-tests/test-applications/node-connect-app/tsconfig.json @@ -4,7 +4,7 @@ "esModuleInterop": true, "lib": ["dom", "dom.iterable", "esnext"], "strict": true, - "outDir": "dist" + "noEmit": true }, "include": ["*.ts"] }