-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12987 from getsentry/prepare-release/8.19.0
meta(changelog): Update changelog for 8.19.0
- Loading branch information
Showing
67 changed files
with
1,429 additions
and
1,425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
dev-packages/browser-integration-tests/suites/public-api/init/built-pkg/test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as fs from 'node:fs'; | ||
import * as path from 'node:path'; | ||
|
||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
|
||
// Regression test against https://github.com/getsentry/sentry-javascript/pull/1896 | ||
sentryTest('should not contain tslib_1__default', async ({ getLocalTestPath }) => { | ||
await getLocalTestPath({ testDir: __dirname }); | ||
|
||
const initBundle = fs.readFileSync(path.join(__dirname, 'dist', 'init.bundle.js'), 'utf-8'); | ||
expect(initBundle.length).toBeGreaterThan(0); | ||
expect(initBundle).not.toContain('tslib_1__default'); | ||
|
||
const subjectBundle = fs.readFileSync(path.join(__dirname, 'dist', 'subject.bundle.js'), 'utf-8'); | ||
expect(subjectBundle.length).toBeGreaterThan(0); | ||
expect(subjectBundle).not.toContain('tslib_1__default'); | ||
}); |
40 changes: 40 additions & 0 deletions
40
dev-packages/node-integration-tests/suites/express/tracing/tracesSampler/server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const { loggingTransport } = require('@sentry-internal/node-integration-tests'); | ||
const Sentry = require('@sentry/node'); | ||
|
||
Sentry.init({ | ||
dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
release: '1.0', | ||
transport: loggingTransport, | ||
tracesSampler: samplingContext => { | ||
// The name we get here is inferred at span creation time | ||
// At this point, we sadly do not have a http.route attribute yet, | ||
// so we infer the name from the unparametrized route instead | ||
return ( | ||
samplingContext.name === 'GET /test/123' && | ||
samplingContext.attributes['sentry.op'] === 'http.server' && | ||
samplingContext.attributes['http.method'] === 'GET' | ||
); | ||
}, | ||
debug: true, | ||
}); | ||
|
||
// express must be required after Sentry is initialized | ||
const express = require('express'); | ||
const cors = require('cors'); | ||
const { startExpressServerAndSendPortToRunner } = require('@sentry-internal/node-integration-tests'); | ||
|
||
const app = express(); | ||
|
||
app.use(cors()); | ||
|
||
app.get('/test/:id', (_req, res) => { | ||
res.send('Success'); | ||
}); | ||
|
||
app.get('/test2', (_req, res) => { | ||
res.send('Success'); | ||
}); | ||
|
||
Sentry.setupExpressErrorHandler(app); | ||
|
||
startExpressServerAndSendPortToRunner(app); |
24 changes: 24 additions & 0 deletions
24
dev-packages/node-integration-tests/suites/express/tracing/tracesSampler/test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { cleanupChildProcesses, createRunner } from '../../../../utils/runner'; | ||
|
||
describe('express tracesSampler', () => { | ||
afterAll(() => { | ||
cleanupChildProcesses(); | ||
}); | ||
|
||
describe('CJS', () => { | ||
test('correctly samples & passes data to tracesSampler', done => { | ||
const runner = createRunner(__dirname, 'server.js') | ||
.expect({ | ||
transaction: { | ||
transaction: 'GET /test/:id', | ||
}, | ||
}) | ||
.start(done); | ||
|
||
// This is not sampled | ||
runner.makeRequest('get', '/test2?q=1'); | ||
// This is sampled | ||
runner.makeRequest('get', '/test/123?q=1'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
import type { UserConfig } from 'vitest'; | ||
|
||
import baseConfig from '../../vite/vite.config'; | ||
|
||
export default { | ||
...baseConfig, | ||
test: { | ||
// test exists, no idea why TS doesn't recognize it | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
...(baseConfig as UserConfig & { test: any }).test, | ||
...baseConfig.test, | ||
environment: 'jsdom', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.