Skip to content

fix(trace-logs): timestamp_precise is a number, not a string#323

Merged
BYK merged 1 commit intomainfrom
fix/trace-log-timestamp-type
Mar 3, 2026
Merged

fix(trace-logs): timestamp_precise is a number, not a string#323
BYK merged 1 commit intomainfrom
fix/trace-log-timestamp-type

Conversation

@BYK
Copy link
Member

@BYK BYK commented Mar 3, 2026

Fixes a runtime Zod validation error when running sentry trace logs. The trace-logs API returns timestamp_precise as a nanosecond integer (same as Explore/Events logs), not an ISO string as originally assumed.

Changes:

  • TraceLogSchema.timestamp_precise: z.string()z.number()
  • Updated JSDoc and test fixtures to match

Follow-up to #311.

The trace-logs API returns timestamp_precise as a nanosecond integer,
same as the Explore/Events logs endpoint. The schema incorrectly
declared it as z.string() which caused Zod validation failures at
runtime.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (api) Add --data/-d flag and auto-detect JSON body in fields by BYK in #320
  • (formatters) Render all terminal output as markdown by BYK in #297
  • (issue-list) Global limit with fair distribution, compound cursor, and richer progress by BYK in #306
  • (trace) Add sentry trace logs subcommand (Add CLI support for fetching logs associated with a trace #247) by BYK in #311

Bug Fixes 🐛

Api

  • Use numeric project ID to avoid "not actively selected" error by betegon in #312
  • Use limit param for issues endpoint page size by BYK in #309
  • Auto-correct ':' to '=' in --field values with a warning by BYK in #302

Formatters

  • Expand streaming table to fill terminal width by betegon in #314
  • Fix HTML entities and escaped underscores in table output by betegon in #313

Other

  • (ci) Generate JUnit XML to silence codecov-action warnings by BYK in #300
  • (nightly) Push to GHCR from artifacts dir so layer titles are bare filenames by BYK in #301
  • (region) Resolve DSN org prefix at resolution layer by BYK in #316
  • (test) Handle 0/-0 in getComparator anti-symmetry property test by BYK in #308
  • (trace-logs) Timestamp_precise is a number, not a string by BYK in #323

Internal Changes 🔧

Api

  • Upgrade @sentry/api to 0.21.0, remove raw HTTP pagination workarounds by BYK in #321
  • Wire listIssuesPaginated through @sentry/api SDK for type safety by BYK in #310

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Codecov Results 📊

2408 passed | Total: 2408 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 3192 uncovered lines.
✅ Project coverage is 80.84%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    80.84%    80.84%        —%
==========================================
  Files          121       121         —
  Lines        16662     16662         —
  Branches         0         0         —
==========================================
+ Hits         13470     13470         —
- Misses        3192      3192         —
- Partials         0         0         —

Generated by Codecov Action

@BYK BYK marked this pull request as ready for review March 3, 2026 01:16
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@BYK BYK merged commit c6d6e3d into main Mar 3, 2026
20 checks passed
@BYK BYK deleted the fix/trace-log-timestamp-type branch March 3, 2026 01:19
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.

1 participant