-
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 start and end from setupRequest #112828
[APM] Remove start and end from setupRequest #112828
Conversation
087ee96
to
af57c6e
Compare
const { apmEventClient } = setup; | ||
const { serviceName, environment, transactionType, interval, start, end } = | ||
alertParams; | ||
|
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.
minor thing but I noticed this elsewhere also: probably unintentional on your part but it's easier for a reviewer to understand the actual changes if lines are not re-ordered like here.
x-pack/plugins/apm/server/lib/transactions/get_transaction/index.ts
Outdated
Show resolved
Hide resolved
start: number; | ||
end: number; | ||
value: number; |
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.
so much easier to read now 👍
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.
Looks great! Thanks for doing this!
af57c6e
to
c93229d
Compare
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.
Looks good to me. Can be merged when the comments in get_transaction/index.ts
are resolved.
Pinging @elastic/apm-ui (Team:apm) |
Pinging @elastic/uptime (Team:uptime) |
8b8e986
to
68d8065
Compare
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.
UX changes LGTM. Smoke-tested on Edge as well.
💚 Build SucceededMetrics [docs]Public APIs missing exports
History
To update your PR or re-run it, just comment with: |
@@ -43,7 +43,7 @@ export const getQueryWithParams = ({ params, termFilters }: QueryParams) => { | |||
getOrElse<t.Errors, { start: number; end: number }>((errors) => { | |||
throw new Error(failure(errors).join('\n')); | |||
}) | |||
) as Setup & SetupTimeRange; | |||
) as Setup & { start: number; end: number }; |
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.
This looks a bit odd. It looks like we are creating a fake setup
object that actually only contains start
and end
.
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.
You should drop the explicit type annotations:
// converts string based start/end to epochmillis
const decodedRange = pipe(
rangeRt.decode({ start, end }),
getOrElse<t.Errors, { start: number; end: number }>((errors) => {
throw new Error(failure(errors).join('\n'));
})
);
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.
Sorry, I saw the comments after merging. I can do a small PR to fix this 🙏
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.
Thanks!
* [APM] Remove start and end from setupRequest * fix some types * fix some conflicts * PR review comments * fix typing
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Summary
Closes #103878
start
andend
are the only url params that not explicitly passed to the underlying handler.What was done
start
andend
fromsetupRequest
start
andend
params from the query