-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Stabilize agent configuration API #57767
[APM] Stabilize agent configuration API #57767
Conversation
2198518
to
d65d6a5
Compare
x-pack/legacy/plugins/apm/common/runtime_types/agent_configuration_intake_rt/index.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/apm/common/runtime_types/agent_configuration_intake_rt/index.ts
Outdated
Show resolved
Hide resolved
...y/plugins/apm/public/components/app/Settings/AgentConfigurations/AddEditFlyout/saveConfig.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/configuration_types.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/apm/common/runtime_types/agent_configuration_intake_rt/index.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/apm/server/routes/settings/agent_configuration.ts
Outdated
Show resolved
Hide resolved
6a0b116
to
0d4ffc9
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.
An HTML preview of the documentation changes is available here.
Remove unused `deleteByQuery` Fix issues with query param decoding Fix tests Fix tsc Use hashed service as id Revert "Use hashed service as id" This reverts commit 9e943ea6f22cbcdfeec6711818db535d09b31342. Ensure that overwriting only happens when updating configurations Add comment to explain “markAppliedByAgent”
f65c277
to
3f46e63
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 AFAICT! I have one last suggestion for serviceRt
: if we want to prevent an accidental omission of service
, what about:
const serviceRt = t.intersection([
t.null,
t.type({ environment: t.string, name: t.string }),
t.type({ environment: t.string }),
t.type({ name: t.string })
]);
That might be a little safer than just using t.partial()
, which might just move the risk to the {name,environment}
values.
x-pack/plugins/apm/common/runtime_types/agent_configuration_intake_rt/index.ts
Show resolved
Hide resolved
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.
Docs LGTM
…re/files-and-filetree * 'master' of github.com:elastic/kibana: (174 commits) [SIEM] Fix unnecessary re-renders on the Overview page (elastic#56587) Don't mutate error message (elastic#58452) Fix service map popover transaction duration (elastic#58422) [ML] Adding filebeat config to file dataviz (elastic#58152) [Uptime] Improve refresh handling when generating test data (elastic#58285) [Logs / Metrics UI] Remove path prefix from ViewSourceConfigur… (elastic#58238) [ML] Functional tests - adjust classification model memory (elastic#58445) [ML] Use event.timezone instead of beat.timezone in file upload (elastic#58447) [Logs UI] Unskip and stabilitize log column configuration tests (elastic#58392) [Telemetry] Separate the license retrieval from the stats in the usage collectors (elastic#57332) hide welcome screen for cloud (elastic#58371) Move src/legacy/ui/public/notify/app_redirect to kibana_legacy (elastic#58127) [ML] Functional tests - stabilize typing during df analytics creation (elastic#58227) fix short url in spaces (elastic#58313) [SIEM] Upgrades cypress to version 4.0.2 (elastic#58400) [Index management] Move to new platform "plugins" folder (elastic#58109) [kbn/optimizer] disable parallelization in terser plugin (elastic#58396) [Uptime] Delete useless try...catch blocks (elastic#58263) [Uptime] Use scripted metric for snapshot calculation (elastic#58247) (elastic#58389) [APM] Stabilize agent configuration API (elastic#57767) ... # Conflicts: # src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
💔 Build FailedTest FailuresKibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/machine_learning/data_frame_analytics/classification_creation·ts.machine learning data frame analytics classification creation bank marketing starts the analytics jobStandard Out
Stack Trace
Kibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/machine_learning/data_frame_analytics/classification_creation·ts.machine learning data frame analytics classification creation bank marketing starts the analytics jobStandard Out
Stack Trace
History
To update your PR or re-run it, just comment with: |
Closes #57018
Closes #57005
Closes #57659
This PR contains:
Create and update APIs are merged
Previously a config was created with
POST '/api/apm/settings/agent-configuration/new'
and a config was updated withPUT /api/apm/settings/agent-configuration/{configurationId}
.Now both are handled with
PUT /api/apm/settings/agent-configuration
.It is possible to overwrite an existing configuration (determined by
service.name
/service.environment
) by providing?overwrite=true
. Without it a 400 error will be returned if a matching config already exists.Delete API modified
Before:
DELETE /api/apm/settings/agent-configuration/{configurationId}
.After:
DELETE /api/apm/settings/agent-configuration
To specify a config, the request body must contain:
To setup the docs locally
Clone docs repo as a sibling to kibana
Run from Kibana:
Docs can be accessed on http://localhost:8000/guide/agent-config-api.html
Improvements of flaky tests
I did some changes to the API tests that should make them more stable. Related issue: #51764