Skip to content

Commit

Permalink
[8.8] Profiling: symbolization created on user opt-in (#156089) (#156449
Browse files Browse the repository at this point in the history
)

# Backport

This will backport the following commits from `main` to `8.8`:
- [Profiling: symbolization created on user opt-in
(#156089)](#156089)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Francesco
Gualazzi","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-05-02T18:24:54Z","message":"Profiling:
symbolization created on user opt-in (#156089)\n\nSigned-off-by:
inge4pres <[email protected]>\r\n\r\n##
Summary\r\n\r\nInclude the creation of symbolizer package policy in the
setup initiated\r\nby users when they opt-in Universal
Profiling.\r\n\r\n### Checklist\r\n\r\n-
[X]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [X] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Related issues or PRs\r\n*
https://github.com/elastic/kibana/pull/155642\r\n*
https://github.com/elastic/kibana/pull/150885\r\n\r\n---------\r\n\r\nSigned-off-by:
inge4pres <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by: Jen
Huang
<[email protected]>","sha":"d4f6cf703da8022aeedfabca6ff7689faf67e071","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","auto-backport","ci:build-cloud-image","8.8
candidate","v8.8.0","v8.9.0"],"number":156089,"url":"https://github.com/elastic/kibana/pull/156089","mergeCommit":{"message":"Profiling:
symbolization created on user opt-in (#156089)\n\nSigned-off-by:
inge4pres <[email protected]>\r\n\r\n##
Summary\r\n\r\nInclude the creation of symbolizer package policy in the
setup initiated\r\nby users when they opt-in Universal
Profiling.\r\n\r\n### Checklist\r\n\r\n-
[X]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [X] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Related issues or PRs\r\n*
https://github.com/elastic/kibana/pull/155642\r\n*
https://github.com/elastic/kibana/pull/150885\r\n\r\n---------\r\n\r\nSigned-off-by:
inge4pres <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by: Jen
Huang
<[email protected]>","sha":"d4f6cf703da8022aeedfabca6ff7689faf67e071"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156089","number":156089,"mergeCommit":{"message":"Profiling:
symbolization created on user opt-in (#156089)\n\nSigned-off-by:
inge4pres <[email protected]>\r\n\r\n##
Summary\r\n\r\nInclude the creation of symbolizer package policy in the
setup initiated\r\nby users when they opt-in Universal
Profiling.\r\n\r\n### Checklist\r\n\r\n-
[X]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [X] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Related issues or PRs\r\n*
https://github.com/elastic/kibana/pull/155642\r\n*
https://github.com/elastic/kibana/pull/150885\r\n\r\n---------\r\n\r\nSigned-off-by:
inge4pres <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by: Jen
Huang
<[email protected]>","sha":"d4f6cf703da8022aeedfabca6ff7689faf67e071"}}]}]
BACKPORT-->

Co-authored-by: Francesco Gualazzi <[email protected]>
  • Loading branch information
kibanamachine and inge4pres authored May 2, 2023
1 parent e5a60a8 commit 4782455
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,35 @@ export function getFleetPolicyStep({
...omit(apmPolicy, 'id', 'revision', 'updated_at', 'updated_by'),
inputs: modifiedPolicyInputs,
});

// We add here the creation of the new package_policy for symbolizer.
// We create the new policy and bind it to the Cloud default agent policy;
// to do so, force s required to be set to true.
const cloudAgentPolicyId = 'policy-elastic-agent-on-cloud';
await packagePolicyClient.create(
soClient,
esClient,
{
policy_id: cloudAgentPolicyId,
enabled: true,
package: {
name: 'profiler_symbolizer',
title: 'Universal Profiling Symbolizer',
version: '8.8.0-preview',
},
name: 'elastic-universal-profiling-symbolizer',
namespace: 'default',
inputs: [
{
policy_template: 'universal_profiling_symbolizer',
enabled: true,
streams: [],
type: 'pf-elastic-symbolizer',
},
],
},
{ force: true }
);
},
};
}

0 comments on commit 4782455

Please sign in to comment.