-
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
[APM] Remove v1 and make required ECS changes #28068
[APM] Remove v1 and make required ECS changes #28068
Conversation
💚 Build Succeeded |
💔 Build Failed |
e67db01
to
cdeec6b
Compare
💔 Build Failed |
cdeec6b
to
96c2285
Compare
💔 Build Failed |
96c2285
to
2bc99be
Compare
💚 Build Succeeded |
2bc99be
to
6775814
Compare
💔 Build Failed |
14e3081
to
740bf96
Compare
💔 Build Failed |
💚 Build Succeeded |
1b8406e
to
81b19f4
Compare
💚 Build Succeeded |
💔 Build Failed |
retest |
💔 Build Failed |
💚 Build Succeeded |
a76ba0f
to
7bd8798
Compare
💔 Build Failed |
retest |
💚 Build Succeeded |
💔 Build Failed |
? FunctionWithRequiredReturnType<T> | ||
: NonNullable<T> extends object | ||
? DeepRequiredObject<NonNullable<T>> | ||
: T; |
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.
What a ternary!
* DeepRequired | ||
* Required that works for deeply nested structure | ||
*/ | ||
type DeepRequired<T> = NonNullable<T> extends never |
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.
What does this DeepRequired
mean for the idx
accessor?
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.
It recursively make optional properties required, so typescript won't complain when accessing props that are maybe undefined.
@@ -281,7 +281,7 @@ export function TabContent({ | |||
<Stacktrace stackframes={excStackframes} codeLanguage={codeLanguage} /> | |||
); | |||
default: | |||
const propData = error.context[currentTab.key] as any; | |||
const propData = get(error, currentTab); |
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 can't switch to idx here because the path is dynamic, is that right?
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.
Yes, idx
was giving me more problems than help here so punting it for now. But I have some ideas how we can make all the properties statically typed.
? `${SPAN_HEX_ID}:"${span.span.hex_id}"` | ||
: `${SPAN_ID}:"${span.span.id}"`; | ||
|
||
const query = `${SPAN_ID}:"${span.span.id}"`; |
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 thought the "v2" schema was using the hex_id
?
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.
Yes, it was. But hex_id
has been renamed to id
as part of the ECS changes (I know - so many changes...!)
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.
Phew!
retest |
💚 Build Succeeded |
💚 Build Succeeded |
Closes #25536
APM Server has already moved to ECS fields. This aligns the UI with APM Server and makes master usable again.