Repository navigation
Commit 9ce9308
authored
fix(cursor): improve automatic and manual sdk tracing (#2698)
With this we should be in a great place for supporting the new
https://cursor.com/blog/agent-sdk
> π€ **This text was AI-generated.**
Fix matching for minified ESM/CommonJS builds while preserving
automatic/manual tracing parity. Capture nested tools, reported
status/errors, cancellation, truncation flags, and request IDs. Report
cache-inclusive prompt usage without double-counting.
Before:
```text
Cursor Agent [task]
|-- tool: shell [tool]
`-- tool: task [tool]
`-- Agent: task [task]
(nested tool calls omitted)
```
After:
```text
Cursor Agent [task]
|-- shell [tool]
`-- task [tool]
`-- Cursor Subagent [task]
`-- read [tool]
```
Example for SDK-reported task steps; available detail depends on the
SDK.1 parent 5286934 commit 9ce9308
21 files changed
Lines changed: 1463 additions & 1493 deletions
File tree
- .changeset
- e2e/scenarios/cursor-sdk-instrumentation
- __snapshots__
- js
- src
- auto-instrumentations
- configs
- orchestrion-js
- instrumentation/plugins
- vendor-sdk-types
- wrappers
- tests/auto-instrumentations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 14 | | |
| 15 | + | |
23 | 16 | | |
24 | 17 | | |
25 | 18 | | |
| |||
31 | 24 | | |
32 | 25 | | |
33 | 26 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 27 | + | |
37 | 28 | | |
38 | 29 | | |
39 | 30 | | |
| |||
51 | 42 | | |
52 | 43 | | |
53 | 44 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 45 | + | |
57 | 46 | | |
58 | 47 | | |
59 | 48 | | |
| |||
71 | 60 | | |
72 | 61 | | |
73 | 62 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 63 | + | |
77 | 64 | | |
78 | 65 | | |
79 | 66 | | |
| |||
90 | 77 | | |
91 | 78 | | |
92 | 79 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 80 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 14 | | |
| 15 | + | |
23 | 16 | | |
24 | 17 | | |
25 | 18 | | |
| |||
31 | 24 | | |
32 | 25 | | |
33 | 26 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 27 | + | |
37 | 28 | | |
38 | 29 | | |
39 | 30 | | |
| |||
51 | 42 | | |
52 | 43 | | |
53 | 44 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 45 | + | |
57 | 46 | | |
58 | 47 | | |
59 | 48 | | |
| |||
71 | 60 | | |
72 | 61 | | |
73 | 62 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 63 | + | |
77 | 64 | | |
78 | 65 | | |
79 | 66 | | |
| |||
90 | 77 | | |
91 | 78 | | |
92 | 79 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 80 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 14 | | |
23 | 15 | | |
24 | 16 | | |
| |||
30 | 22 | | |
31 | 23 | | |
32 | 24 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 25 | + | |
36 | 26 | | |
37 | 27 | | |
38 | 28 | | |
| |||
50 | 40 | | |
51 | 41 | | |
52 | 42 | | |
53 | | - | |
54 | | - | |
55 | | - | |
| 43 | + | |
56 | 44 | | |
57 | 45 | | |
58 | 46 | | |
| |||
70 | 58 | | |
71 | 59 | | |
72 | 60 | | |
73 | | - | |
74 | | - | |
75 | | - | |
| 61 | + | |
76 | 62 | | |
77 | 63 | | |
78 | 64 | | |
| |||
89 | 75 | | |
90 | 76 | | |
91 | 77 | | |
92 | | - | |
93 | | - | |
94 | | - | |
| 78 | + | |
0 commit comments