@@ -231,6 +231,75 @@ describe("qa-otel-smoke receiver bounds", () => {
|
231 | 231 | expect(assertion.failures).toContain("OTLP traces request /v1/traces returned status 400"); |
232 | 232 | }); |
233 | 233 | |
| 234 | +it("allows safe operational OTLP log bodies while leak checks inspect raw payloads", () => { |
| 235 | +const assertion = testing.assertSmoke({ |
| 236 | +bodyText: { |
| 237 | +logs: ["diagnostics-otel: logs exporter enabled"], |
| 238 | +}, |
| 239 | +childExitCode: 0, |
| 240 | +disallowedBodyNeedles: ["OTEL-QA-SECRET"], |
| 241 | +logRecords: [ |
| 242 | +{ |
| 243 | +body: "diagnostics-otel: logs exporter enabled", |
| 244 | +traceId: "trace", |
| 245 | +spanId: "span", |
| 246 | +}, |
| 247 | +], |
| 248 | +metrics: [{ name: "openclaw.harness.duration_ms" }], |
| 249 | +requests: [ |
| 250 | +{ |
| 251 | +path: "/v1/traces", |
| 252 | +signal: "traces", |
| 253 | +bytes: 16, |
| 254 | +contentEncoding: undefined, |
| 255 | +status: 200, |
| 256 | +spanCount: 5, |
| 257 | +metricCount: 0, |
| 258 | +logCount: 0, |
| 259 | +}, |
| 260 | +{ |
| 261 | +path: "/v1/metrics", |
| 262 | +signal: "metrics", |
| 263 | +bytes: 16, |
| 264 | +contentEncoding: undefined, |
| 265 | +status: 200, |
| 266 | +spanCount: 0, |
| 267 | +metricCount: 1, |
| 268 | +logCount: 0, |
| 269 | +}, |
| 270 | +{ |
| 271 | +path: "/v1/logs", |
| 272 | +signal: "logs", |
| 273 | +bytes: 16, |
| 274 | +contentEncoding: undefined, |
| 275 | +status: 200, |
| 276 | +spanCount: 0, |
| 277 | +metricCount: 0, |
| 278 | +logCount: 1, |
| 279 | +}, |
| 280 | +], |
| 281 | +spans: [ |
| 282 | +{ name: "openclaw.run", parent: false, attributes: {} }, |
| 283 | +{ name: "openclaw.harness.run", parent: true, attributes: {} }, |
| 284 | +{ name: "openclaw.context.assembled", parent: true, attributes: {} }, |
| 285 | +{ name: "openclaw.message.delivery", parent: true, attributes: {} }, |
| 286 | +{ |
| 287 | +name: "chat gpt-5.5", |
| 288 | +parent: true, |
| 289 | +attributes: { |
| 290 | +"gen_ai.operation.name": "chat", |
| 291 | +"gen_ai.request.model": "gpt-5.5", |
| 292 | +"openclaw.model": "gpt-5.5", |
| 293 | +"openclaw.provider": "openai", |
| 294 | +}, |
| 295 | +}, |
| 296 | +], |
| 297 | +}); |
| 298 | + |
| 299 | +expect(assertion.passed).toBe(true); |
| 300 | +expect(assertion.failures).toEqual([]); |
| 301 | +}); |
| 302 | + |
234 | 303 | it("preserves leak markers even when later body text is truncated", () => { |
235 | 304 | const captured: { traces?: string[] } = {}; |
236 | 305 | |
|