@vzn/vx-otel 0.0.650 → 0.0.651

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/sink.ts +12 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vzn/vx-otel",
3
- "version": "0.0.650",
3
+ "version": "0.0.651",
4
4
  "license": "MIT",
5
5
  "description": "OpenTelemetry exporter for vx — a telemetry plugin mapping runs to OTLP traces + metrics (CI/CD + VCS semantic conventions).",
6
6
  "keywords": [
@@ -34,7 +34,7 @@
34
34
  "access": "public"
35
35
  },
36
36
  "peerDependencies": {
37
- "@vzn/vx": "^0.0.650"
37
+ "@vzn/vx": "^0.0.651"
38
38
  },
39
39
  "repository": {
40
40
  "type": "git",
package/src/sink.ts CHANGED
@@ -245,10 +245,19 @@ function retryAfterMs(value: string | null): number {
245
245
  return Number.isFinite(ms) && ms > 0 ? ms : 0
246
246
  }
247
247
 
248
- /** One line of a collector's error body, bounded — it is remote text. */
248
+ /**
249
+ * One line of a collector's error body, bounded, each control written as
250
+ * `\xNN`: it is remote text, and an `ESC ]` in it retitled the terminal
251
+ * the warning printed to (L-31).
252
+ */
249
253
  function detail(body: string): string {
250
- const line = body.replace(/\s+/g, ' ').trim()
251
- return line === '' ? '' : `: ${line.slice(0, 200)}`
254
+ const line = body
255
+ .replace(/\s+/g, ' ')
256
+ .trim()
257
+ .slice(0, 200)
258
+ // oxlint-disable-next-line no-control-regex
259
+ .replace(/[\x00-\x1f\x7f-\x9f]/g, (c) => `\\x${c.charCodeAt(0).toString(16).padStart(2, '0')}`)
260
+ return line === '' ? '' : `: ${line}`
252
261
  }
253
262
 
254
263
  /** An export the collector accepted whole, with a word about it. */