Skip to content

Comments

chore: add event on span row click#7406

Merged
srikanthccv merged 3 commits intomainfrom
add-event
Mar 24, 2025
Merged

chore: add event on span row click#7406
srikanthccv merged 3 commits intomainfrom
add-event

Conversation

@srikanthccv
Copy link
Member

@srikanthccv srikanthccv commented Mar 22, 2025

Summary

Fix https://github.com/SigNoz/engineering-pod/issues/2243


Important

Add logging for span row clicks and tab changes across various components to track user interactions.

  • Logging:
    • Add logEvent for row click in HostMetricTraces.tsx and EntityTraces.tsx to log ItemClicked event.
    • Add logEvent for tab change in HostMetricsDetails.tsx and ClusterDetails.tsx to log TabChanged event.
  • Entity Details:
    • Add category prop to ClusterDetails.tsx, DaemonSetDetails.tsx, and DeploymentDetails.tsx for logging purposes.
    • Add category prop to JobDetails.tsx, NamespaceDetails.tsx, and NodeDetails.tsx for logging purposes.
    • Add category prop to PodDetails.tsx and StatefulSetDetails.tsx for logging purposes.

This description was created by Ellipsis for 3bc1008. It will automatically update as commits are pushed.

@srikanthccv srikanthccv requested a review from amlannandy March 22, 2025 09:59
@srikanthccv srikanthccv requested a review from YounixM as a code owner March 22, 2025 09:59
@github-actions github-actions bot added the chore label Mar 22, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 4a1b9fa in 2 minutes and 1 seconds

More details
  • Looked at 225 lines of code in 11 files
  • Skipped 0 files when reviewing.
  • Skipped posting 13 drafted comments based on config settings.
1. frontend/src/container/InfraMonitoringK8s/StatefulSets/StatefulSetDetails/StatefulSetDetails.tsx:429
  • Draft comment:
    Avoid using inline styles. The Drawer’s closeIcon prop uses an inline style (marginTop from Spacing), which can be moved to a CSS class or styled component for better consistency and easier maintenance.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. frontend/src/container/InfraMonitoringK8s/StatefulSets/StatefulSetDetails/StatefulSetDetails.tsx:200
  • Draft comment:
    There is a pattern of logging events (e.g. in handleTabChange, handleTimeChange, etc.) that is repeated across several components. Consider abstracting these logEvent calls into a custom hook or helper function to reduce duplication and improve maintainability.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. frontend/src/container/InfraMonitoringK8s/StatefulSetDetails/StatefulSetDetails.tsx:75
  • Draft comment:
    Inline style objects (for example, the style prop on the Drawer) are used directly. It’s preferable to use CSS classes or styled components for these styles to ensure consistency with design tokens and easier debugging.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. frontend/src/container/InfraMonitoringK8s/StatefulSetDetails/StatefulSetDetails.tsx:181
  • Draft comment:
    The logic for updating filter states (e.g. in handleChangeLogFilters and handleChangeTracesFilters) is repeated across similar components. Consider abstracting this logic into a reusable utility or custom hook to minimize duplication.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. frontend/src/container/InfraMonitoringK8s/Namespaces/NamespaceDetails/NamespaceDetails.tsx:341
  • Draft comment:
    The Drawer component uses inline styles for background and overscrollBehavior. To maintain design consistency and theming, consider moving these styles to a dedicated CSS class.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. frontend/src/container/InfraMonitoringK8s/Jobs/JobDetails/JobDetails.tsx:203
  • Draft comment:
    The useCallback hook for handleTimeChange is using an empty dependency array (with eslint disabled). Please verify that all necessary dependencies are included to avoid potential stale closures in future updates.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. frontend/src/container/InfraMonitoringK8s/StatefulSets/StatefulSetDetails/StatefulSetDetails.tsx:181
  • Draft comment:
    There is a lot of duplicated logic for filtering and event logging across Kubernetes entity detail components. Consider refactoring the common filtering and logging logic into reusable functions to reduce duplication and improve maintainability.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
8. frontend/src/container/InfraMonitoringK8s/DaemonSets/DaemonSetDetails/DaemonSetDetails.tsx:107
  • Draft comment:
    Typo in the 'id' field of the namespace filter key: it uses 'k8s_daemonSet_name--string--resource--false' instead of something like 'k8s_namespace_name--string--resource--false'. Please update it for consistency.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
9. frontend/src/container/InfraMonitoringK8s/Deployments/DeploymentDetails/DeploymentDetails.tsx:109
  • Draft comment:
    Typographical error: In the initialFilters, the id for the namespace filter (using QUERY_KEYS.K8S_NAMESPACE_NAME) is incorrectly set to 'k8s_deployment_name--string--resource--false'. It should be updated to something like 'k8s_namespace_name--string--resource--false' to avoid confusion.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
10. frontend/src/container/InfraMonitoringK8s/Jobs/JobDetails/JobDetails.tsx:111
  • Draft comment:
    Typographical Error: In the second filter definition within 'initialFilters', the 'id' field for the key corresponding to QUERY_KEYS.K8S_NAMESPACE_NAME is incorrectly set to 'k8s_job_name--string--resource--false'. It should be changed to 'k8s_namespace_name--string--resource--false' for clarity and correctness.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
11. frontend/src/container/InfraMonitoringK8s/Pods/PodDetails/PodDetails.tsx:116
  • Draft comment:
    Typographical Error: In the namespace filter object, the id property is set to 'k8s_pod_name--string--resource--false', which is identical to the pod name filter. It seems like a copy-paste error. Consider changing it to 'k8s_namespace_name--string--resource--false' for clarity and correctness.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
12. frontend/src/container/InfraMonitoringK8s/Pods/PodDetails/PodDetails.tsx:622
  • Draft comment:
    Typographical Error: The prop passed to the PodEvents component is named handleChangeEventFilters, but the corresponding handler is defined as handleChangeEventsFilters (note the extra 's'). For consistency and clarity, please align the naming.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
13. frontend/src/container/InfraMonitoringK8s/StatefulSets/StatefulSetDetails/StatefulSetDetails.tsx:461
  • Draft comment:
    Consider updating the label 'Statefulset Name' to 'StatefulSet Name' for consistency with naming conventions.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_l4Ut1avWjVhXRgSZ


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

amlannandy
amlannandy previously approved these changes Mar 24, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Incremental review on 3bc1008 in 1 minute and 40 seconds

More details
  • Looked at 24 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. frontend/src/container/InfraMonitoringK8s/EntityDetailsUtils/EntityTraces/EntityTraces.tsx:213
  • Draft comment:
    Removed inline style for pointer cursor. Ensure a CSS class is applied instead for visual feedback on clickable rows.
  • Reason this comment was not posted:
    Marked as duplicate.
2. frontend/src/components/HostMetricsDetail/HostMetricTraces/HostMetricTraces.tsx:202
  • Draft comment:
    Suggestion: Remove inline style is good practice. Ensure the clickable row still shows a pointer cursor by applying a CSS class in HostMetricTraces.styles.scss.
  • Reason this comment was not posted:
    Marked as duplicate.
3. frontend/src/container/InfraMonitoringK8s/EntityDetailsUtils/EntityTraces/EntityTraces.tsx:212
  • Draft comment:
    Suggestion: Instead of inline style, use a CSS class (defined in entityTraces.styles.scss) to set the pointer cursor for clickable rows.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_3wSqguNiWOosPMe7


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@srikanthccv srikanthccv merged commit 88aa29e into main Mar 24, 2025
26 of 28 checks passed
@srikanthccv srikanthccv deleted the add-event branch March 24, 2025 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants