Skip to content

Conversation

@narsaynorath
Copy link
Member

@narsaynorath narsaynorath commented Oct 14, 2025

  • Removes spans and logs columns
  • Add call to discover endpoint to get error counts by trace ID
  • Renders timestamp using the same renderer as logs
Screenshot 2025-10-14 at 1 26 23 PM

Closes LOGS-407

@narsaynorath narsaynorath requested a review from a team as a code owner October 14, 2025 17:30
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 14, 2025
@linear
Copy link

linear bot commented Oct 14, 2025

cursor[bot]

This comment was marked as outdated.

@narsaynorath narsaynorath enabled auto-merge (squash) October 14, 2025 17:34
limit: traceIds.length,
referrer: 'api.explore.trace-errors-count',
orgSlug: organization.slug,
location,
Copy link
Contributor

Choose a reason for hiding this comment

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

Potential bug: The useDiscoverQuery hook is called with an undefined location variable, which will cause a runtime ReferenceError.
  • Description: The useDiscoverQuery hook is called on line 56 with a location variable. However, this variable is not defined within the scope of the useTraceTelemetry hook. It is not passed as a parameter, imported, or declared locally. Since useDiscoverQuery requires location as a mandatory prop, this will result in a ReferenceError: location is not defined when the component renders and the query is executed, causing a runtime crash.

  • Suggested fix: The useTraceTelemetry hook needs to accept location as a parameter. Update its options interface, add it to the function signature, and pass it down to useDiscoverQuery. The calling component, samplesTab.tsx, should then pass its location object to the hook.
    severity: 0.85, confidence: 1.0

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Member Author

Choose a reason for hiding this comment

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

Weird, this wasn't caught by my linter earlier.


return dataMap;
}, [traceIds, spansResult.data, logsResult.data]);
}, [traceIds, spansResult.data, logsResult.data, errorsResult.data]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Incorrect Dependency in useMemo Hook

The telemetryData useMemo hook's dependency array includes errorsResult.data, but the error count data is accessed via errorsResult.data.data. This means the memoized value won't update when the actual error data changes, leading to stale error counts and an inconsistent data access pattern compared to other queries.

Additional Locations (1)

Fix in Cursor Fix in Web

@narsaynorath narsaynorath merged commit 43d0453 into master Oct 14, 2025
45 checks passed
@narsaynorath narsaynorath deleted the nar/feat/tracemetrics-improve-samples-panel-rendering branch October 14, 2025 17:48
chromy pushed a commit that referenced this pull request Oct 17, 2025
- Removes spans and logs columns
- Add call to discover endpoint to get error counts by trace ID
- Renders timestamp using the same renderer as logs

Closes LOGS-407
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants