Skip to content

Conversation

jasonyuezhang
Copy link
Owner

This adds a small project badge to log rows so users can tell which project a log line is from at a glance when looking at multiple projects.

Other:

  • This memoizes project badge as we shouldn't be rerendering ~2-5ms components when none of the props change, this especially hurts log table performance as hundreds of lines can be rendered at once.

Closes LOGS-385


Copied from getsentry#100910
Original PR: getsentry#100910

This adds a small project badge to log rows so users can tell which project a log line is from at a glance when looking at multiple projects.

Other:
- This memoizes project badge as we shouldn't be rerendering ~2-5ms components when none of the props change, this especially hurts log table performance as hundreds of lines can be rendered at once.
Copy link

Add Project Badge to Log Row for Multi-Project Log Visibility

This PR introduces a ProjectBadge visual identifier into each log row in the logs table, enabling users to quickly determine the originating project for each log entry when viewing multi-project logs. The ProjectBadge component is now memoized to avoid unnecessary rerenders, which helps maintain optimal performance especially when rendering hundreds of log lines.

Key Changes

• Inserted ProjectBadge in each log row within static/app/views/explore/logs/tables/logsTableRow.tsx to display project identity.
• Memoized the ProjectBadge component in static/app/components/idBadge/projectBadge.tsx to reduce rerender overhead and improve log table performance.
• Adjusted the retrieval of project context to use the full projects list instead of the useProjectFromId hook directly for more efficient access.
• Made minor imports and style adjustments to ensure all necessary dependencies are included and to normalize row rendering styles.

Affected Areas

static/app/views/explore/logs/tables/logsTableRow.tsx
static/app/views/explore/logs/fieldRenderers.tsx
static/app/components/idBadge/projectBadge.tsx
static/app/views/explore/logs/tables/logsInfiniteTable.tsx

This summary was automatically generated by @propel-code-bot

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