-
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] Agent remote configuration #39555
Conversation
x-pack/legacy/plugins/apm/server/lib/settings/cm/save_configuration.ts
Outdated
Show resolved
Hide resolved
💚 Build Succeeded |
@ogupte I tested APM Server playing together with this branch. I did find some unexpected behavior related to |
I'll make sure to address this and add tests to make sure only entries with both |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
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.
@ogupte Starting to take shape and it's looking really good. I have a few nits and changes to request.
x-pack/legacy/plugins/apm/public/components/app/Settings/AddSettings/AddSettingFlyout.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/apm/public/components/app/Settings/AddSettings/AddSettingFlyout.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/apm/public/components/app/Settings/AddSettings/AddSettingFlyoutBody.tsx
Outdated
Show resolved
Hide resolved
@@ -143,7 +169,7 @@ export function AddSettingFlyoutBody({ onSubmit }: { onSubmit: () => void }) { | |||
<EuiFieldNumber | |||
min={0} | |||
max={1} | |||
step={0.1} | |||
step={0.001} |
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 think this might need to change to 0.01
as I don't think we need to support 0.5%. @graphaelli thoughts?
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.
Notes from Slack conversation: we agreed to keep the 0.001 validation because it should be possible for users to do 0.1% sample rate configuration.
We could do something like this, but it would be a shortcut to adding one configuration per each existing environment. This means if a new environment comes online after this configuration is set, it would not apply to the new environment. I'm not sure if users will understand this subtly. Also, would selecting 'all environments' like this apply to those services with no value in |
@ogupte I can see how it might be confusing to users that 1. is it going to work for my future environments and 2. how does it apply to services where environment is not set. I reckon we leave it for now. It's more of a shortcut or making that bulk action easier for the user. Let's focus on getting this and other planned features in good shape for next week 👍 |
x-pack/legacy/plugins/apm/public/components/app/Settings/ListSettings.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/apm/public/components/app/Settings/AddSettings/AddSettingFlyout.tsx
Outdated
Show resolved
Hide resolved
💚 Build Succeeded |
@bmorelli25 I'm not sure if you already did a pass on the copy, but I would like some help on possible improvements. Thanks! |
💔 Build Failed |
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.
@formgeist - looks like you updated the copy since yesterday. I'm liking the changes! Just a few recommendations.
x-pack/legacy/plugins/apm/public/components/app/Settings/ListSettings.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/apm/public/components/app/Settings/ListSettings.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/apm/public/components/app/Settings/ListSettings.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/apm/public/components/app/Settings/AddSettings/AddSettingFlyoutBody.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/apm/public/components/app/Settings/AddSettings/AddSettingFlyout.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/apm/public/components/app/Settings/AddSettings/AddSettingFlyoutBody.tsx
Outdated
Show resolved
Hide resolved
💔 Build Failed |
💔 Build Failed |
0534851
to
c35a8ee
Compare
💔 Build Failed |
- Creates apmCm index mapping on plugin initialization. - Links from home page to settings page - Polishes settings page to match design
- Adds ability to update/edit existing setting value - Adds delete functionality to edit settings flyout
…ttings/AddSettingFlyout.tsx sentence updated to remove "central" Co-Authored-By: Brandon Morelli <bmorelli25@gmail.com>
…ettings.tsx fix wording Co-Authored-By: Brandon Morelli <bmorelli25@gmail.com>
…ttings/AddSettingFlyoutBody.tsx fix typo Co-Authored-By: Brandon Morelli <bmorelli25@gmail.com>
…ttings/AddSettingFlyoutBody.tsx fix wording Co-Authored-By: Brandon Morelli <bmorelli25@gmail.com>
Co-Authored-By: Brandon Morelli <bmorelli25@gmail.com>
- adds last updated to config table - fixes validation for all form fields - adds text for toast notifications (create,edit,delete) - makes service name clickable to open edit flyout - adds i18n for all text
- memoized returned object from useFetcher when data doesn't change - changed delete query refresh from true to 'wait_for' - added ignore_above: 1024 to all keyword typed fields in .apm-cm index - fixed some wording around sample_rate granularity - various code cleanup
a7f71ad
to
f734012
Compare
💚 Build Succeeded |
* [APM] Agent remote configuration UI - Creates apmCm index mapping on plugin initialization. - Links from home page to settings page
* [APM] Agent remote configuration (#39555) * [APM] Agent remote configuration UI - Creates apmCm index mapping on plugin initialization. - Links from home page to settings page * [APM] removes apm agent config index from list of indices that match the apm index patter. Fixes smoke tests.
selectedConfig ? parseFloat(selectedConfig.settings.sample_rate) : NaN | ||
); | ||
const { data: serviceNames = [], status: serviceNamesStatus } = useFetcher< | ||
string[] |
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 don't need to supply a type to useFetcher
. It is inferred from the promise return type.
string[] | ||
>(async () => (await loadCMServices()).sort(), [], { | ||
preservePreviousResponse: 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.
I think you should move the sort
to the rest method (loadCMServices
) and jsut do:
useFetcher(loadCMServices, [], { preservePreviousResponse: false });
}); | ||
const { data: environments = [], status: environmentStatus } = useFetcher< | ||
Array<{ name: string; available: boolean }> | ||
>( |
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.
Same as above: no type needs to be supplied to useFetcher
Summary
Closes #34990. Adds support for remote configuration of agents within the APM UI.
This is based off the work of this PR: #36031.