Skip to content

fix(metrics): Pass timestamp to trace item details#116315

Merged
nsdeschenes merged 5 commits into
masterfrom
nd/LOGS-828/fix-metrics-pass-timestamp-to-trace-item-details
May 28, 2026
Merged

fix(metrics): Pass timestamp to trace item details#116315
nsdeschenes merged 5 commits into
masterfrom
nd/LOGS-828/fix-metrics-pass-timestamp-to-trace-item-details

Conversation

@nsdeschenes
Copy link
Copy Markdown
Contributor

Pass the timestamp along for the given metrics trace item details.

Closes LOGS-828

nsdeschenes and others added 2 commits May 27, 2026 13:42
Allow trace item details callers to pass a unix timestamp so lookup can be scoped to the relevant trace item occurrence. Existing callers omit the value and keep the previous request shape.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Use the metric sample timestamp when fetching trace item details so the request matches trace meta scoping. Add a regression assertion for the expanded sample details request.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 27, 2026

LOGS-828

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.59%

@nsdeschenes nsdeschenes changed the title fix(metrics):Pass timestamp to trace item details fix(metrics): Pass timestamp to trace item details May 27, 2026
Use the page filter datetime selection when trace item details do not receive an explicit item timestamp. Keep explicit metric sample timestamps as the more specific lookup key and cover the shared hook behavior with focused tests.

Refs LOGS-828
Co-Authored-By: OpenAI Codex <noreply@openai.com>
nsdeschenes and others added 2 commits May 28, 2026 08:56
Treat null trace item timestamps the same as missing timestamps so page-filter datetime params are sent as the fallback. This keeps statsPeriod available when no specific timestamp is present while preserving zero as a valid timestamp.

Co-Authored-By: Codex <noreply@openai.com>
Use renderHook initialProps in the trace item details hook tests and move project store setup into beforeEach. This keeps the test setup explicit after adding null timestamp coverage.

Co-Authored-By: Codex <noreply@openai.com>
@nsdeschenes
Copy link
Copy Markdown
Contributor Author

@sentry review

@nsdeschenes
Copy link
Copy Markdown
Contributor Author

@cursor review

Copy link
Copy Markdown
Contributor

@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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 8abf4b7. Configure here.

@nsdeschenes nsdeschenes marked this pull request as ready for review May 28, 2026 12:14
@nsdeschenes nsdeschenes requested a review from a team as a code owner May 28, 2026 12:14
@nsdeschenes nsdeschenes merged commit 973462c into master May 28, 2026
76 checks passed
@nsdeschenes nsdeschenes deleted the nd/LOGS-828/fix-metrics-pass-timestamp-to-trace-item-details branch May 28, 2026 17:10
nsdeschenes added a commit that referenced this pull request May 28, 2026
This PR wires up the logs query to pass the `timestamp` while fetching
the trace item details for a given log.

Closes LOGS-829
Requires: #116315

---------

Co-authored-by: OpenAI Codex <noreply@openai.com>
nsdeschenes added a commit that referenced this pull request May 28, 2026
This PR updates the calls to trace item details when it comes to the
trace waterfall to ensure that timestamps are passed to the request.

Also introducing a helper function to convert precise timestamps to
seconds based timestamps.

Closes LOGS-830
Requires: #116315

---------

Co-authored-by: OpenAI Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants