| 160 | // --------------------------------------------------------------------------- |
| 161 | |
| 162 | export function traceRestRequest(info: { |
| 163 | method: string; |
| 164 | path: string; |
| 165 | url: string; |
| 166 | requestId: string; |
| 167 | body?: unknown; |
| 168 | }): void { |
| 169 | if (!isTraceEnabled()) return; |
| 170 | push({ |
| 171 | source: 'rest', |
| 172 | kind: 'rest:request', |
| 173 | label: `→ ${info.method} ${info.path}`, |
| 174 | method: info.method, |
| 175 | path: info.path, |
| 176 | requestId: info.requestId, |
| 177 | detail: { url: info.url, body: detailOf(info.body) }, |
| 178 | }); |
| 179 | } |
| 180 | |
| 181 | export function traceRestResponse(info: { |
| 182 | method: string; |