Conversation
a77f088 to
564dbc9
Compare
x-pack/legacy/plugins/apm/index.ts
Outdated
There was a problem hiding this comment.
Is it possible to grant users granular access, like alerting:show bu not actions:show?
There was a problem hiding this comment.
Possible for us? Or for admins?
.../plugins/apm/public/components/app/ServiceDetails/AlertIntegrations/AlertingFlyout/index.tsx
Outdated
Show resolved
Hide resolved
|
I don't think so. Previously (IIRC) there were instance specific properties
(setFlyoutVisible etc) passed to the context component but they were
recently moved to the form, so might be fine as a root component now.
Op di 10 mrt. 2020 23:30 schreef Søren Louv-Jansen <notifications@github.com
…:
***@***.**** commented on this pull request.
------------------------------
In
x-pack/legacy/plugins/apm/public/components/app/ServiceDetails/AlertIntegrations/AlertingFlyout/index.tsx
<#59566 (comment)>:
> +
+export function AlertingFlyout(props: Props) {
+ const { addFlyoutVisible, setAddFlyoutVisibility, alertType } = props;
+
+ const plugin = useApmPluginContext();
+
+ return (
+ <AlertsContextProvider
+ value={{
+ http: plugin.core.http,
+ toastNotifications: plugin.core.notifications.toasts,
+ actionTypeRegistry:
+ plugin.plugins.triggers_actions_ui.actionTypeRegistry,
+ alertTypeRegistry: plugin.plugins.triggers_actions_ui.alertTypeRegistry
+ }}
+ >
is it overkill adding AlertsContextProvider at the application root?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#59566?email_source=notifications&email_token=AACWDXAPE5MGLEZRWXKJHADRG25Q7A5CNFSM4LDD7UK2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCYY5ULQ#pullrequestreview-372365870>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACWDXHSABERLQPJLX7BHJDRG25Q7ANCNFSM4LDD7UKQ>
.
|
x-pack/legacy/plugins/apm/index.ts
Outdated
There was a problem hiding this comment.
apm_write uses snake_case. Should we stay consistent?
There was a problem hiding this comment.
Btw. Should apm be renamed to apm_read?
There was a problem hiding this comment.
ah.. actions-read is what's defined in the Action app endpoints...
My mind is a little hazy on this mapping concept. Are we mapping tags to privileges here? How does it work?
There was a problem hiding this comment.
I understood it last time I looked into it, but that was last year. It seems this mapping concept is not immediately intuitive so adding some comments (albeit a bit verbose) might be a good idea.
There was a problem hiding this comment.
Would just linking to x-pack/plugins/features/common/feature_kibana_privileges.ts where it's explained be OK? Rather than copying documentation between files?
There was a problem hiding this comment.
This is such an underrated ts helper
There was a problem hiding this comment.
Should the error be handled somehow?
There was a problem hiding this comment.
It shouldn't, but I'll leave a comment there with the reason.
There was a problem hiding this comment.
In that case this feels like something that shouldn't be thrown from parseEsInterval. But I can see how that is not easily changed.
There was a problem hiding this comment.
This key looks off durationField..last
There was a problem hiding this comment.
To allow the user to clear the number input. I'll add a comment there as well:
// we use a ref that we only update when we've succesfully parsed
// the interval. this allows the user to clear the number input
// without us having to fill it with a 0 in order for it to be
// succesfully parsed.
There was a problem hiding this comment.
Why do we have to fill it with a 0? Is "" (empty string) not valid?
There was a problem hiding this comment.
That's what this is (was) about - supporting anything that is not a valid number, which is e.g. what happens when the user clears the field. Once that happens we can no longer successfully parse the interval.
In any case I'm now using the ForLastExpression that the triggers_actions_ui plugin provides.
There was a problem hiding this comment.
😬I'll add a comment.
564dbc9 to
c0dc3c7
Compare
There was a problem hiding this comment.
I think we should use the ecs constants:
| `service.name:${params.serviceName}`, | |
| `transaction.type:${params.transactionType}` | |
| `${SERVICE_NAME}:${params.serviceName}`, | |
| `${TRANSACTION_TYPE}:${params.transactionType}` |
Ntw. what do you think about renaming elasticsearch_fieldnames.ts to ecs.ts ?
There was a problem hiding this comment.
It's not all ECS (unfortunately). ie, service.environment is not in the ECS specification. Same goes for error.grouping_key and a couple of others. So maybe elasticsearch_fieldnames is good enough for now?
There was a problem hiding this comment.
btw, I'm removing the service.name and transaction.type tags. We're not doing anything wiht lookups now, and in the future (IIRC) we can use the params.
|
@dgieselaar I've collected some immediate design feedback and polish comments;
Also, can you tell me how exactly we calculate the Error rate? The number of new errors over the selected time range? Not sure the label title and append copy are good enough... Looks great otherwise 🙌 |
YulNaumenko
left a comment
There was a problem hiding this comment.
LGTM. Happy to see one more alerting integration!
c0dc3c7 to
5a28653
Compare
formgeist
left a comment
There was a problem hiding this comment.
Some minor label changes that move for consistency across Observability apps.
There was a problem hiding this comment.
| defaultMessage: 'View active alerts' | |
| defaultMessage: 'Manage alerts' |
There was a problem hiding this comment.
| defaultMessage: 'Create threshold alert' | |
| defaultMessage: 'Create alert' |
There was a problem hiding this comment.
| defaultMessage: 'Transaction duration' | |
| defaultMessage: 'Transaction duration threshold' |
There was a problem hiding this comment.
| defaultMessage: 'Error rate' | |
| defaultMessage: 'Error rate threshold' |
5a28653 to
fcb78c7
Compare
fcb78c7 to
cdf77ce
Compare
4a9bcf5 to
bd7a6f0
Compare
bd7a6f0 to
5ff8d75
Compare
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Add alerting/actions permissions for APM * Export TIME_UNITS, getTimeUnitLabel from triggers actions UI plugin * Add APM alert types and UI * Review feedback * Use Expression components for triggers * Update alert name for transaction duration * Change defaults for error rate trigger
* Add alerting/actions permissions for APM * Export TIME_UNITS, getTimeUnitLabel from triggers actions UI plugin * Add APM alert types and UI * Review feedback * Use Expression components for triggers * Update alert name for transaction duration * Change defaults for error rate trigger
* master: Updating our direct usage of https-proxy-agent to 5.0.0 (elastic#58296) allow users to unset the throttle of an alert (elastic#60964) [Lens] Fix bug in metric config panel (elastic#60982) [SearchProfiler] Minor fixes (elastic#60919) [ML] Renaming ML setup and start contracts (elastic#60980) introduce StartServicesAccessor type for `CoreSetup.getStartServices` (elastic#60748) [SIEM][Detection Engine] Add rule's notification alert type (elastic#60832) [APM] Re-revert "Collect telemetry about data/API performance" (elastic#61030) [NP] Graph: get rid of saved objects class wrapper (elastic#59917) [EPM] merge duplicate fields when creating index patterns (elastic#60957) [Uptime] Ml detection of duration anomalies (elastic#59785) [Alerting] removes unimplemented buttons from Alert Details page (elastic#60934) [skip-ci] Fix CODEOWNERS paths for the Pulse team (elastic#60944) [APM] Threshold alerts (elastic#59566) [ML] Add support for percentiles aggregation to Transform wizard (elastic#60763) Cahgen save object duplicate message (elastic#60901)
|
Tests ok. |









Closes #49038 (
actually, does it? should we remove the watcher functionality in this PR as wellwe'll keep the Watcher one as well for the time being).Out of scope:
I've not yet tested all scenarios, but it would be helpful to get some feedback while I'm out on spacetime so I can pick it up directly after.
Related issues:
Relevant changes for @elastic/kibana-alerting-services are mostly in a77f088bd5aec73716cb68a0fb9ceaeb19fa9adc and 73d6bdc5b111c61038e06e488ef37212c55a74bc.