Skip to content

Commit 3973f21

Browse files
committed
update
1 parent dbc45f0 commit 3973f21

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

.size-limit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ module.exports = [
276276
path: createCDNPath('bundle.tracing.replay.logs.metrics.min.js'),
277277
gzip: false,
278278
brotli: false,
279-
limit: '251 KB',
279+
limit: '250 KB',
280280
},
281281
{
282282
name: 'CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed',

dev-packages/node-integration-tests/suites/tracing/langchain/instrument-no-truncation.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Sentry.init({
1010
integrations: [
1111
Sentry.langChainIntegration({
1212
enableTruncation: false,
13+
recordInputs: true,
14+
recordOutputs: true,
1315
}),
1416
],
1517
beforeSendTransaction: event => {

dev-packages/node-integration-tests/suites/tracing/langchain/scenario-no-truncation.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ async function run() {
4141

4242
// Long content that would normally be truncated
4343
const longContent = 'A'.repeat(50_000);
44-
await model.invoke([{ role: 'user', content: longContent }]);
44+
await model.invoke([
45+
{ role: 'user', content: longContent },
46+
{ role: 'assistant', content: 'Some reply' },
47+
{ role: 'user', content: 'Follow-up question' },
48+
]);
4549
});
4650

4751
await Sentry.flush(2000);

dev-packages/node-integration-tests/suites/tracing/langchain/test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,12 @@ describe('LangChain integration', () => {
557557
spans: expect.arrayContaining([
558558
expect.objectContaining({
559559
data: expect.objectContaining({
560-
[GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: expect.stringContaining(longContent),
560+
[GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: JSON.stringify([
561+
{ role: 'user', content: longContent },
562+
{ role: 'assistant', content: 'Some reply' },
563+
{ role: 'user', content: 'Follow-up question' },
564+
]),
565+
[GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE]: 3,
561566
}),
562567
}),
563568
]),

0 commit comments

Comments
 (0)