Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
da8397b
Merge pull request #17988 from getsentry/master
github-actions[bot] Oct 21, 2025
718a3ea
feat(core): Truncate request messages in AI integrations (#17921)
RulaKhaled Oct 21, 2025
cefcdbc
chore: Upgrade madge to v8 (#17957)
AbhiPrasad Oct 21, 2025
7333e18
feat(core): Instrument LangChain AI (#17955)
RulaKhaled Oct 22, 2025
f895f09
fix(node): Pino child loggers (#17934)
timfish Oct 22, 2025
7aa886c
test(hono): Fix hono e2e tests (#18000)
JPeer264 Oct 22, 2025
e05acdd
fix(node): Pino capture serialized `err` (#17999)
timfish Oct 22, 2025
39f85b3
feat: Align sentry origin with documentation (#17998)
JPeer264 Oct 23, 2025
f75c3ed
feat(node): Pass requestHook and responseHook option to OTel (#17996)
JPeer264 Oct 23, 2025
152b9d4
feat(nextjs): Support node runtime on proxy files (#17995)
chargome Oct 23, 2025
43b383c
feat(firebase): Instrument cloud functions for firebase v2 (#17952)
JPeer264 Oct 23, 2025
027ab90
fix(nextjs): Remove usage of chalk to avoid runtime errors (#18010)
chargome Oct 23, 2025
7968cd8
fix(react): Don't trim index route `/` when getting pathname (#17985)
s1gr1d Oct 23, 2025
925a4ea
feat(cloudflare,vercel-edge): Add support for LangChain instrumentati…
RulaKhaled Oct 23, 2025
7d050b5
fix(core): Fix wrong async types when instrumenting anthropic's strea…
andreiborza Oct 23, 2025
1513161
chore: Add required size_check for GH Actions (#18009)
JPeer264 Oct 23, 2025
0bac0ea
test(react): Add parameterized route tests for `createHashRouter` (#1…
chargome Oct 23, 2025
9c0397c
test(react-router): Fix `getMetaTagTransformer` tests for Vitest comp…
s1gr1d Oct 23, 2025
fd26569
fix(react): Patch `spanEnd` for potentially cancelled lazy-route tran…
onurtemizkan Oct 23, 2025
8debb05
meta(changelog): Update changelog for 10.22.0
chargome Oct 23, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,7 @@ jobs:
job_lint,
job_check_format,
job_circular_dep_check,
job_size_check,
]
# Always run this, even if a dependent job failed
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ module.exports = [
import: createImport('init'),
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
gzip: true,
limit: '156 KB',
limit: '158 KB',
},
{
name: '@sentry/node - without tracing',
Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,54 @@

- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott

## 10.22.0

### Important Changes

- **feat(node): Instrument cloud functions for firebase v2 ([#17952](https://github.com/getsentry/sentry-javascript/pull/17952))**

We added instrumentation for Cloud Functions for Firebase v2, enabling automatic performance tracking and error monitoring. This will be added automatically if you have enabled tracing.

- **feat(core): Instrument LangChain AI ([#17955](https://github.com/getsentry/sentry-javascript/pull/17955))**

Instrumentation was added for LangChain AI operations. You can configure what is recorded like this:

```ts
Sentry.init({
integrations: [
Sentry.langChainIntegration({
recordInputs: true, // Record prompts/messages
recordOutputs: true, // Record responses
}),
],
});
```

### Other Changes

- feat(cloudflare,vercel-edge): Add support for LangChain instrumentation ([#17986](https://github.com/getsentry/sentry-javascript/pull/17986))
- feat: Align sentry origin with documentation ([#17998](https://github.com/getsentry/sentry-javascript/pull/17998))
- feat(core): Truncate request messages in AI integrations ([#17921](https://github.com/getsentry/sentry-javascript/pull/17921))
- feat(nextjs): Support node runtime on proxy files ([#17995](https://github.com/getsentry/sentry-javascript/pull/17995))
- feat(node): Pass requestHook and responseHook option to OTel ([#17996](https://github.com/getsentry/sentry-javascript/pull/17996))
- fix(core): Fix wrong async types when instrumenting anthropic's stream api ([#18007](https://github.com/getsentry/sentry-javascript/pull/18007))
- fix(nextjs): Remove usage of chalk to avoid runtime errors ([#18010](https://github.com/getsentry/sentry-javascript/pull/18010))
- fix(node): Pino capture serialized `err` ([#17999](https://github.com/getsentry/sentry-javascript/pull/17999))
- fix(node): Pino child loggers ([#17934](https://github.com/getsentry/sentry-javascript/pull/17934))
- fix(react): Don't trim index route `/` when getting pathname ([#17985](https://github.com/getsentry/sentry-javascript/pull/17985))
- fix(react): Patch `spanEnd` for potentially cancelled lazy-route transactions ([#17962](https://github.com/getsentry/sentry-javascript/pull/17962))

<details>
<summary> <strong>Internal Changes</strong> </summary>

- chore: Add required size_check for GH Actions ([#18009](https://github.com/getsentry/sentry-javascript/pull/18009))
- chore: Upgrade madge to v8 ([#17957](https://github.com/getsentry/sentry-javascript/pull/17957))
- test(hono): Fix hono e2e tests ([#18000](https://github.com/getsentry/sentry-javascript/pull/18000))
- test(react-router): Fix `getMetaTagTransformer` tests for Vitest compatibility ([#18013](https://github.com/getsentry/sentry-javascript/pull/18013))
- test(react): Add parameterized route tests for `createHashRouter` ([#17789](https://github.com/getsentry/sentry-javascript/pull/17789))

</details>

## 10.21.0

### Important Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'console.trace 123 false',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
'sentry.message.template': { value: 'console.trace {} {}', type: 'string' },
Expand All @@ -45,7 +45,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'console.debug 123 false',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
'sentry.message.template': { value: 'console.debug {} {}', type: 'string' },
Expand All @@ -60,7 +60,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'console.log 123 false',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
'sentry.message.template': { value: 'console.log {} {}', type: 'string' },
Expand All @@ -75,7 +75,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'console.info 123 false',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
'sentry.message.template': { value: 'console.info {} {}', type: 'string' },
Expand All @@ -90,7 +90,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'console.warn 123 false',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
'sentry.message.template': { value: 'console.warn {} {}', type: 'string' },
Expand All @@ -105,7 +105,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'console.error 123 false',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
'sentry.message.template': { value: 'console.error {} {}', type: 'string' },
Expand All @@ -120,7 +120,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'Assertion failed: console.assert 123 false',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
},
Expand All @@ -132,7 +132,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'Object: {"key":"value","nested":{"prop":123}}',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
'sentry.message.template': { value: 'Object: {}', type: 'string' },
Expand All @@ -146,7 +146,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'Array: [1,2,3,"string"]',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
'sentry.message.template': { value: 'Array: {}', type: 'string' },
Expand All @@ -160,7 +160,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'Mixed: prefix {"obj":true} [4,5,6] suffix',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
'sentry.message.template': { value: 'Mixed: {} {} {} {}', type: 'string' },
Expand All @@ -177,7 +177,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: '',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
},
Expand All @@ -189,7 +189,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'String substitution %s %d test 42',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
},
Expand All @@ -201,7 +201,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'Object substitution %o {"key":"value"}',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
},
Expand All @@ -213,7 +213,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'first 0 1 2',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
'sentry.message.template': { value: 'first {} {} {}', type: 'string' },
Expand All @@ -229,7 +229,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
trace_id: expect.any(String),
body: 'hello true null undefined',
attributes: {
'sentry.origin': { value: 'auto.console.logging', type: 'string' },
'sentry.origin': { value: 'auto.log.console', type: 'string' },
'sentry.sdk.name': { value: 'sentry.javascript.browser', type: 'string' },
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
'sentry.message.template': { value: 'hello {} {} {}', type: 'string' },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import * as Sentry from '@sentry/cloudflare';
import { MockChain, MockChatModel, MockTool } from './mocks';

interface Env {
SENTRY_DSN: string;
}

export default Sentry.withSentry(
(env: Env) => ({
dsn: env.SENTRY_DSN,
tracesSampleRate: 1.0,
}),
{
async fetch(_request, _env, _ctx) {
// Create LangChain callback handler
const callbackHandler = Sentry.createLangChainCallbackHandler({
recordInputs: false,
recordOutputs: false,
});

// Test 1: Chat model invocation
const chatModel = new MockChatModel({
model: 'claude-3-5-sonnet-20241022',
temperature: 0.7,
maxTokens: 100,
});

await chatModel.invoke('Tell me a joke', {
callbacks: [callbackHandler],
});

// Test 2: Chain invocation
const chain = new MockChain('my_test_chain');
await chain.invoke(
{ input: 'test input' },
{
callbacks: [callbackHandler],
},
);

// Test 3: Tool invocation
const tool = new MockTool('search_tool');
await tool.call('search query', {
callbacks: [callbackHandler],
});

return new Response(JSON.stringify({ success: true }));
},
},
);
Loading
Loading