Skip to content

Commit 9d9160a

Browse files
committed
Update the probe/snapshot format doc
1 parent 8a16316 commit 9d9160a

File tree

2 files changed

+44
-15
lines changed

2 files changed

+44
-15
lines changed

dd-java-agent/agent-debugging/src/main/docs/debugger_probes.md

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
- java | python | go | c# | ...
99
- **version**
1010
- the debugger version; used to properly maintain backward compatibility
11+
- **orgId**
12+
- the organization ID
13+
- **appId**
14+
- the application ID
15+
- **tags**
16+
- list of tags associated with the probe
1117
- **where**
1218
- **typeName**
1319
- class/type name
@@ -65,6 +71,8 @@ _Note: this part will get replaced once we have debugger expressions figured out
6571
"language": "java",
6672
"probeId": "12fd-8490-c111-4374-ffde",
6773
"version": 0,
74+
"orgId": 2,
75+
"appId": "test-app",
6876
"where": {
6977
"typeName": "java.lang.Object",
7078
"methodName": "toString",
@@ -80,6 +88,8 @@ _Note: this part will get replaced once we have debugger expressions figured out
8088
"language": "java",
8189
"probeId": "12fd-8490-c111-4374-ffde",
8290
"version": 0,
91+
"orgId": 2,
92+
"appId": "test-app",
8393
"where": {
8494
"typeName": "java.lang.String",
8595
"methodName": "nonSyncContentEquals",
@@ -100,6 +110,8 @@ _Note: this part will get replaced once we have debugger expressions figured out
100110
"language": "java",
101111
"probeId": "12fd-8490-c111-4374-ffde",
102112
"version": 0,
113+
"orgId": 2,
114+
"appId": "test-app",
103115
"where": {
104116
"typeName": "java.lang.String",
105117
"methodName": "nonSyncContentEquals",
@@ -130,23 +142,41 @@ Snapshot is defined by:
130142
- a list of probe capture points
131143

132144
#### Capture point
133-
- **location**
134-
- **type**
135-
- location type, one of:
136-
- **entry** - method/function enter
137-
- **exit** - method/function exit - both exceptional and non-exceptional exits are considered
138-
- **before** - before the specified code line or code offset
139-
- **after** - after the specified code line or offset
145+
- **kind**
146+
- location kind, one of:
147+
- **ENTER** - method/function enter
148+
- **RETURN** - method/function standard return
149+
- **UNHANDLED_EXCEPTION** - method/function exit due to unhandled exception
150+
- **HANDLED_EXCEPTION** - method/function is handling an exception (eg. 'catch' handler)
151+
- **BEFORE** - before the specified code line or code offset
152+
- **AFTER** - after the specified code line or offset
140153
- _[optional] _**line**
141154
- the line number if `location` is either `before` or `after`
142-
- **argumentValues**
143-
- a list of [type:value] tuples corresponding to the method/function arguments
144-
- _[optional]_ **localValues**
145-
- a [name:[type:value]] map valid at a particular place in code
155+
- **arguments**
156+
- a list of `CapturedValue` instances corresponding to the method/function arguments
157+
- _[optional]_ **locals**
158+
- a list of `CapturedValue` instances corresponding to valid local variables
159+
- not be available for `ENTER` kind
146160
- _[optional]_ **returnValue**
147-
- [type:value] tuple representing the return value
148-
- _[optional]_ **thrownException**
149-
- textual representation of the thrown exception
161+
- a `CapturedValue` instance representing the return value
162+
- available only for `RETURN` kind
163+
- _[optional]_ **throwable**
164+
- a `CapturedThrowable` instance representing the thrown exception
165+
- available only for `HANDLED_EXCEPTION` or `UNHANDLED_EXCEPTION` kinds
166+
167+
#### CapturedValue
168+
- **name**
169+
- the associated name (eg. argument name or local variable)
170+
- **type**
171+
- the value type (if available)
172+
- **value**
173+
- textual representation of the value
174+
175+
#### CapturedThrowable
176+
- **type**
177+
- the exception type
178+
- **message**
179+
- the exception message
150180

151181
### Probe snapshot collection
152182
On method/function entry a new probe snapshot is open if permitted by the rate limiter.

dd-java-agent/agent-debugging/src/main/java/com/datadog/debugging/probes/ProbesPoller.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import java.util.Collections;
1414
import java.util.concurrent.Executors;
1515
import java.util.concurrent.ScheduledExecutorService;
16-
import java.util.concurrent.ScheduledFuture;
1716
import java.util.concurrent.ThreadFactory;
1817
import java.util.concurrent.TimeUnit;
1918
import lombok.extern.slf4j.Slf4j;

0 commit comments

Comments
 (0)