Skip to content

Fix jq 1.6 compat: rename $end to $end_time in build_span_json#6

Merged
adagradschool merged 1 commit into
masterfrom
fix/jq-end-reserved-keyword
Mar 19, 2026
Merged

Fix jq 1.6 compat: rename $end to $end_time in build_span_json#6
adagradschool merged 1 commit into
masterfrom
fix/jq-end-reserved-keyword

Conversation

@adagradschool
Copy link
Copy Markdown
Contributor

Summary

  • $end is a reserved keyword in jq 1.6 (default in Debian bookworm / slim Docker images), causing build_span_json to silently fail with a syntax error
  • Spans are never written, so OTLP exports send empty payloads — traces don't show up in PromptLayer
  • Fix: rename the jq variable from $end to $end_time

Test plan

  • Verified fix in Modal sandbox with jq 1.6 (Debian bookworm debian_slim)
  • Confirmed spans are generated and OTLP queue drains successfully
  • Confirmed traces appear in PromptLayer dashboard

🤖 Generated with Claude Code

`$end` is a reserved keyword in jq 1.6 (shipped with Debian bookworm),
causing build_span_json to silently fail and produce empty spans.
Renaming to `$end_time` fixes compatibility with jq 1.6+.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@adagradschool adagradschool requested a review from T3XRD March 19, 2026 22:22
@adagradschool adagradschool merged commit f3796e7 into master Mar 19, 2026
2 checks passed
adagradschool added a commit to MagnivOrg/prompt-layer-library that referenced this pull request Mar 19, 2026
## Summary
- Vendor latest `promptlayer-claude-plugins`
(MagnivOrg/promptlayer-claude-plugins#6)
- Renames `$end` → `$end_time` jq variable in `build_span_json` — `$end`
is reserved in jq 1.6 (Debian bookworm), causing spans to silently fail
- Bump version to 1.2.1 (`pyproject.toml` + `__init__.py`)

## Test plan
- [x] Verified in Modal sandbox with `debian_slim` (jq 1.6) — spans now
export correctly
- [x] Traces visible in PromptLayer dashboard

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: adagradschool <adagradschool@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants