Commit ba96eb4
authored
✨ Evaluate http bodies for Java EE with Hypertrace Filter (#349)
* ♻️ enhance mock filter to block when block=true
* ✅ add request for blocking servlet request bodies'
* 🚧 add exception for blocking request'
* ✨ suppress HT evaluation exception for servlets
* ✨ block request based on filter response when reading from servlet request bodies
* 🐛 fix bad null check resulting in NPE being thrown and polluting logs/hurting performance
* ✨ remove suppression for body reading instrumentation
* 🐛 remove log statement that causes module to not load in production
* ♻️ modify Filter API to accept headers for evaluateRequestBody
* 🚧 provide headers to ByteBufferSpanPair via ServletRequestInstrumentation
* ✨ include headers in SpanAndObjectPair
* ✨ rovide headers to ByteBufferSpanPair from SpanAndObject pair
* ✨ support body evaluation for char buffers
* ➕ add bootstrap api to compile classpath
* 🚧 functional custom exception handler
* ♻️ avoid exception handler approach, instead use try-catch in each onMethodExit1 parent 0070c2c commit ba96eb4
File tree
18 files changed
+343
-101
lines changed- filter-api/src/main/java/org/hypertrace/agent/filter
- api
- instrumentation/servlet
- servlet-3.0
- src
- main/java/io/opentelemetry/javaagent/instrumentation/hypertrace/servlet/v3_0/nowrapping
- request
- response
- test/java/io/opentelemetry/javaagent/instrumentation/hypertrace/servlet/v3_0/nowrapping
- request
- servlet-rw/src/test/java/io/opentelemetry/javaagent/instrumentation/hypertrace/servlet/rw/reader
- javaagent-core/src/main/java/org/hypertrace/agent/core
- instrumentation
- buffer
- testing-common/src/testFixtures/java/org/hypertrace/agent/testing/mockfilter
18 files changed
+343
-101
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
| 45 | + | |
44 | 46 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
Lines changed: 23 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| 83 | + | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| |||
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 105 | | |
112 | 106 | | |
113 | 107 | | |
| |||
130 | 124 | | |
131 | 125 | | |
132 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
136 | | - | |
| 140 | + | |
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
| |||
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
156 | 169 | | |
157 | 170 | | |
158 | 171 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
0 commit comments