Skip to content

fix(ourlogs): resolve received time in the timestamp hover tooltip - #121477

Draft
JoshuaKGoldberg wants to merge 1 commit into
masterfrom
joshgoldberg/logs-937-timestamp-loading-forever-in-hover
Draft

fix(ourlogs): resolve received time in the timestamp hover tooltip#121477
JoshuaKGoldberg wants to merge 1 commit into
masterfrom
joshgoldberg/logs-937-timestamp-loading-forever-in-hover

Conversation

@JoshuaKGoldberg

@JoshuaKGoldberg JoshuaKGoldberg commented Aug 6, 2026

Copy link
Copy Markdown
Member

The "Received" row in the log timestamp hover tooltip spun on a loading indicator forever in the expanded log details.

observed_timestamp is declared with search_type="number" but stored as a string, and LOGS_INTERNAL_TO_PUBLIC_ALIAS_MAPPINGS is keyed by search_type. The trace item details endpoint looks the alias up using the type of the value it actually got back ("string") so it misses the "number"` bucket and falls back to emitting the internal name:

{"name": "sentry.observed_timestamp_nanos", "type": "str", "value": "1786046484244158487"}

The log table row works because it maps that internal name in while merging the prefetched attributes. But the tooltip only read the observed_timestamp alias. The expanded log details key their attribute map by the raw response names, so the lookup missed and the placeholder spinner added in #115505 had nothing to resolve to.

The tooltip now accepts either name. It also stops spinning once the trace item details request has settled, so a log that just misses the attribute no longer leaves a spinner up forever.

Before After
before after

Closes LOGS-937.

The trace item details endpoint only aliases the observed timestamp to `observed_timestamp` when it comes back as an int. It is stored as a string, so it arrives as `sentry.observed_timestamp_nanos` instead, which the tooltip never looked up. In the expanded log details and the metrics sample details, whose attribute maps are keyed by the raw response names, "Received" therefore spun on a loading indicator forever.

The tooltip now reads either name, and only renders the "Received" row once it has a value instead of falling back to an unbounded spinner.

Fixes LOGS-937
@linear-code

linear-code Bot commented Aug 6, 2026

Copy link
Copy Markdown

LOGS-937

@JoshuaKGoldberg JoshuaKGoldberg changed the title fix(logs): Resolve the received time in the timestamp hover tooltip fix(ourlogs): resolve received time in the timestamp hover tooltip Aug 6, 2026
@JoshuaKGoldberg
JoshuaKGoldberg force-pushed the joshgoldberg/logs-937-timestamp-loading-forever-in-hover branch from 368f560 to a50d323 Compare August 6, 2026 20:25
@JoshuaKGoldberg

Copy link
Copy Markdown
Member Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit a50d323. Configure here.

setIsPending(false);
},
() => {}
() => setIsPending(false)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pending flag can stick forever

Medium Severity

isPending starts as true and is only cleared when fetchQuery settles. If prefetch returns early without a project slug, or the hover timeout is cleared before the request starts (common when moving into the isHoverable timestamp tooltip), isTraceItemDetailsPending stays true and the Received row can spin forever again.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a50d323. Configure here.

@JoshuaKGoldberg
JoshuaKGoldberg force-pushed the joshgoldberg/logs-937-timestamp-loading-forever-in-hover branch from a50d323 to 368f560 Compare August 6, 2026 20:48
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