-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Synthetics] Fix usage of synthetics-* index pattern the synthetics app #152473
Changes from all commits
0cab466
509b673
269e7d5
3c7cc0e
de004d1
f5f6bc6
5031a54
d25b2c8
7c1f2b2
a6b9f1a
7957f2e
992e77d
1785dae
6dcdadf
37326cc
d272072
b5daf2d
f28da41
2785a0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ function unregisterAll() { | |
unregisterDataHandler({ appName: 'apm' }); | ||
unregisterDataHandler({ appName: 'infra_logs' }); | ||
unregisterDataHandler({ appName: 'infra_metrics' }); | ||
unregisterDataHandler({ appName: 'synthetics' }); | ||
unregisterDataHandler({ appName: 'uptime' }); | ||
unregisterDataHandler({ appName: 'ux' }); | ||
} | ||
|
||
|
@@ -73,7 +73,7 @@ describe('HasDataContextProvider', () => { | |
expect(result.current).toEqual({ | ||
hasDataMap: { | ||
apm: { hasData: undefined, status: 'success' }, | ||
synthetics: { hasData: undefined, status: 'success' }, | ||
uptime: { hasData: undefined, status: 'success' }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why isn't synthetics included in the hasDataMap, in addition to Uptime? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because we don't have a UI section or need for that. |
||
infra_logs: { hasData: undefined, status: 'success' }, | ||
infra_metrics: { hasData: undefined, status: 'success' }, | ||
ux: { hasData: undefined, status: 'success' }, | ||
|
@@ -98,7 +98,7 @@ describe('HasDataContextProvider', () => { | |
}, | ||
{ appName: 'infra_metrics', hasData: async () => ({ hasData: false }) }, | ||
{ | ||
appName: 'synthetics', | ||
appName: 'uptime', | ||
hasData: async () => ({ hasData: false }), | ||
}, | ||
{ | ||
|
@@ -128,7 +128,7 @@ describe('HasDataContextProvider', () => { | |
expect(result.current).toEqual({ | ||
hasDataMap: { | ||
apm: { hasData: false, status: 'success' }, | ||
synthetics: { | ||
uptime: { | ||
hasData: false, | ||
status: 'success', | ||
}, | ||
|
@@ -161,7 +161,7 @@ describe('HasDataContextProvider', () => { | |
hasData: async () => ({ hasData: false, indices: 'metric-*' }), | ||
}, | ||
{ | ||
appName: 'synthetics', | ||
appName: 'uptime', | ||
hasData: async () => ({ hasData: false, indices: 'heartbeat-*, synthetics-*' }), | ||
}, | ||
{ | ||
|
@@ -190,7 +190,7 @@ describe('HasDataContextProvider', () => { | |
expect(result.current).toEqual({ | ||
hasDataMap: { | ||
apm: { hasData: true, status: 'success' }, | ||
synthetics: { | ||
uptime: { | ||
hasData: false, | ||
indices: 'heartbeat-*, synthetics-*', | ||
status: 'success', | ||
|
@@ -225,7 +225,7 @@ describe('HasDataContextProvider', () => { | |
hasData: async () => ({ hasData: true, indices: 'metric-*' }), | ||
}, | ||
{ | ||
appName: 'synthetics', | ||
appName: 'uptime', | ||
hasData: async () => ({ hasData: true, indices: 'heartbeat-*, synthetics-*' }), | ||
}, | ||
{ | ||
|
@@ -257,7 +257,7 @@ describe('HasDataContextProvider', () => { | |
hasData: true, | ||
status: 'success', | ||
}, | ||
synthetics: { | ||
uptime: { | ||
hasData: true, | ||
indices: 'heartbeat-*, synthetics-*', | ||
status: 'success', | ||
|
@@ -309,7 +309,7 @@ describe('HasDataContextProvider', () => { | |
expect(result.current).toEqual({ | ||
hasDataMap: { | ||
apm: { hasData: true, indices: sampleAPMIndices, status: 'success' }, | ||
synthetics: { hasData: undefined, status: 'success' }, | ||
uptime: { hasData: undefined, status: 'success' }, | ||
infra_logs: { hasData: undefined, status: 'success' }, | ||
infra_metrics: { hasData: undefined, status: 'success' }, | ||
ux: { hasData: undefined, status: 'success' }, | ||
|
@@ -358,7 +358,7 @@ describe('HasDataContextProvider', () => { | |
indices: sampleAPMIndices, | ||
status: 'success', | ||
}, | ||
synthetics: { hasData: undefined, status: 'success' }, | ||
uptime: { hasData: undefined, status: 'success' }, | ||
infra_logs: { hasData: undefined, status: 'success' }, | ||
infra_metrics: { hasData: undefined, status: 'success' }, | ||
ux: { hasData: undefined, status: 'success' }, | ||
|
@@ -391,7 +391,7 @@ describe('HasDataContextProvider', () => { | |
hasData: async () => ({ hasData: true, indices: 'metric-*' }), | ||
}, | ||
{ | ||
appName: 'synthetics', | ||
appName: 'uptime', | ||
hasData: async () => ({ hasData: true, indices: 'heartbeat-*, synthetics-*' }), | ||
}, | ||
{ | ||
|
@@ -420,7 +420,7 @@ describe('HasDataContextProvider', () => { | |
expect(result.current).toEqual({ | ||
hasDataMap: { | ||
apm: { hasData: undefined, status: 'failure' }, | ||
synthetics: { | ||
uptime: { | ||
hasData: true, | ||
indices: 'heartbeat-*, synthetics-*', | ||
status: 'success', | ||
|
@@ -465,7 +465,7 @@ describe('HasDataContextProvider', () => { | |
}, | ||
}, | ||
{ | ||
appName: 'synthetics', | ||
appName: 'uptime', | ||
hasData: async () => { | ||
throw new Error('BOOMMMMM'); | ||
}, | ||
|
@@ -498,7 +498,7 @@ describe('HasDataContextProvider', () => { | |
expect(result.current).toEqual({ | ||
hasDataMap: { | ||
apm: { hasData: undefined, status: 'failure' }, | ||
synthetics: { hasData: undefined, status: 'failure' }, | ||
uptime: { hasData: undefined, status: 'failure' }, | ||
infra_logs: { hasData: undefined, status: 'failure' }, | ||
infra_metrics: { hasData: undefined, status: 'failure' }, | ||
ux: { hasData: undefined, status: 'failure' }, | ||
|
@@ -544,7 +544,7 @@ describe('HasDataContextProvider', () => { | |
expect(result.current).toEqual({ | ||
hasDataMap: { | ||
apm: { hasData: undefined, status: 'success' }, | ||
synthetics: { hasData: undefined, status: 'success' }, | ||
uptime: { hasData: undefined, status: 'success' }, | ||
infra_logs: { hasData: undefined, status: 'success' }, | ||
infra_metrics: { hasData: undefined, status: 'success' }, | ||
ux: { hasData: undefined, status: 'success' }, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ import { | |
APM_APP, | ||
INFRA_LOGS_APP, | ||
INFRA_METRICS_APP, | ||
SYNTHETICS_APP, | ||
UPTIME_APP, | ||
UX_APP, | ||
} from './constants'; | ||
import { getDataHandler } from '../data_handler'; | ||
|
@@ -50,7 +50,7 @@ export const HasDataContext = createContext({} as HasDataContextValue); | |
|
||
const apps: DataContextApps[] = [ | ||
APM_APP, | ||
SYNTHETICS_APP, | ||
UPTIME_APP, | ||
INFRA_LOGS_APP, | ||
INFRA_METRICS_APP, | ||
UX_APP, | ||
|
@@ -100,7 +100,7 @@ export function HasDataContextProvider({ children }: { children: React.ReactNode | |
serviceName: resultUx?.serviceName as string, | ||
}); | ||
break; | ||
case SYNTHETICS_APP: | ||
case UPTIME_APP: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No has data handler for synthetics app? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because we don't have a UI section or need for that. |
||
const resultSy = await getDataHandler(app)?.hasData(); | ||
updateState({ hasData: resultSy?.hasData, indices: resultSy?.indices }); | ||
|
||
|
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.
Not necessarily related to this line, but will we need to add a Synthetics section to the observability overview page before GA?
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.
i don't think it's needed for GA