-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #19860: Added Diagnostic tab to display diagnostic information || Added Sync offset button #19980
base: main
Are you sure you want to change the base?
Conversation
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
test('Alert Diagnostic Info', async ({ page }) => { | ||
const ALERT_NAME = generateAlertName(); | ||
|
||
await test.step('Create alert', async () => { | ||
await visitObservabilityAlertPage(page); | ||
data.alertDetails = await createAlert({ | ||
page, | ||
alertName: ALERT_NAME, | ||
sourceName: SOURCE_NAME_1, | ||
sourceDisplayName: SOURCE_DISPLAY_NAME_1, | ||
user: user1, | ||
createButtonId: 'create-observability', | ||
selectId: 'Owner Name', | ||
addTrigger: true, | ||
}); | ||
}); | ||
|
||
await test.step('Verify diagnostic info tab', async () => { | ||
await visitObservabilityAlertPage(page); | ||
await visitAlertDetailsPage(page, data.alertDetails); | ||
|
||
const diagnosticTab = page.getByRole('tab', { name: /diagnostic info/i }); | ||
const diagnosticInfoResponse = page.waitForResponse( | ||
`/api/v1/events/subscriptions/**/diagnosticInfo` | ||
); | ||
await diagnosticTab.click(); | ||
await diagnosticInfoResponse; | ||
}); | ||
|
||
await test.step('Delete alert', async () => { | ||
await deleteAlert(page, data.alertDetails, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to create a separate alert just for the diagnostics info check. Can we add a test for a created alert somewhere above?
@@ -223,12 +222,13 @@ const UserListPageV1 = () => { | |||
|
|||
const handleShowDeletedUserChange = (value: boolean) => { | |||
handlePageChange(INITIAL_PAGING_VALUE); | |||
handlePageSizeChange(PAGE_SIZE_MEDIUM); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not mix up 2 separate fixes in a single PR. Can you please create a separate PR for the User list?
...i/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/AlertDiagnosticInfoTab.interface.ts
Outdated
Show resolved
Hide resolved
...sources/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/AlertDiagnosticInfoTab.tsx
Outdated
Show resolved
Hide resolved
openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/AlertDetailsPage.tsx
Outdated
Show resolved
Hide resolved
...sources/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/AlertDiagnosticInfoTab.tsx
Outdated
Show resolved
Hide resolved
...ces/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/alert-diagnostic-info-tab.less
Outdated
Show resolved
Hide resolved
...ces/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/alert-diagnostic-info-tab.less
Outdated
Show resolved
Hide resolved
...ces/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/alert-diagnostic-info-tab.less
Outdated
Show resolved
Hide resolved
@@ -61,6 +61,7 @@ | |||
"alert-lowercase": "alert", | |||
"alert-lowercase-plural": "alerts", | |||
"alert-plural": "Alerts", | |||
"alert-synced-successfully": "Alert synced successfully", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add these changes to other language files as well, with the respective translations.
...sources/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/AlertDiagnosticInfoTab.tsx
Outdated
Show resolved
Hide resolved
...sources/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/AlertDiagnosticInfoTab.tsx
Outdated
Show resolved
Hide resolved
...sources/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/AlertDiagnosticInfoTab.tsx
Outdated
Show resolved
Hide resolved
...sources/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/AlertDiagnosticInfoTab.tsx
Outdated
Show resolved
Hide resolved
...ces/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/alert-diagnostic-info-tab.less
Outdated
Show resolved
Hide resolved
.text-grey-muted { | ||
display: inline; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The styles do not match the class name we are giving. Use a completely different class with all the stylings if there are many, or just use the pre-defined classes for the specific style. Ex. in this case inline
already exists with the display:inline style.
openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-pt.json
Outdated
Show resolved
Hide resolved
openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json
Outdated
Show resolved
Hide resolved
openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/AlertDetailsPage.tsx
Outdated
Show resolved
Hide resolved
title={t('label.sync-entity', { | ||
entity: t('label.alert'), | ||
})}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally this should be Sync Alert Offset
|
Fixes #19860
I worked on adding a Diagnostics tab in the alert details page to help users troubleshoot delayed alerts. This includes:
A Sync Offset button to prioritize alert events by syncing their offsets.
API: PUT /api/v1/events/subscriptions/name/{name}/syncOffset
Displaying diagnostic information to show the current and total offsets of alerts.
API: GET /api/v1/events/subscriptions/name/{name}/diagnosticInfo
These changes ensure that users receive alerts in real time even when offsets fall behind in the queue.
BEFORE
AFTER
Screen.Recording.2025-02-27.at.1.37.46.PM.mov
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>