-
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] Make fleet optional again: Store source maps in APM index #146367
Labels
apm:fleet
apm:release-feature
APM UI - Release Feature Goal
apm:test-plan-done
Pull request that was successfully tested during the test plan
Team:APM
All issues that need APM UI Team support
v8.7.0
Comments
sorenlouv
changed the title
Make fleet optional: Store source maps in APM index
Make fleet optional again: Store source maps in APM index
Nov 28, 2022
Pinging @elastic/apm-ui (Team:APM) |
sorenlouv
added
apm:release-feature
APM UI - Release Feature Goal
v8.7.0
apm:fleet
labels
Nov 28, 2022
sorenlouv
changed the title
Make fleet optional again: Store source maps in APM index
[APM] Make fleet optional again: Store source maps in APM index
Nov 30, 2022
This was referenced Dec 6, 2022
sorenlouv
added a commit
to elastic/elasticsearch
that referenced
this issue
Dec 9, 2022
…92160) In elastic/kibana#146367 Kibana will create a system index `.apm-source-map` at startup. All access to the index (creation, indexing, reading) will happen through the system user (`kibana_system`). `kibana_system` already has access to `.apm-agent-configuration` and `.apm-custom-link`. Following this pattern the role should also be granted access to `.apm-source-map`.
sorenlouv
added
the
apm:test-plan-done
Pull request that was successfully tested during the test plan
label
Feb 27, 2023
Upload source maps for run in {1..1000}; do
curl --request POST \
--url https://deploy-kibana-mjgyh-custom.kb.us-west2.gcp.elastic-cloud.com/api/apm/sourcemaps \
--header 'Authorization: ApiKey encodeApiKey' \
--header 'Content-Type: multipart/form-data' \
--header 'kbn-xsrf: true' \
--form service_version=4.20.$run \
--form service_name=opbeans-node \
--form bundle_filepath=https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js \
--form sourcemap=@/Users/sqren/Downloads/source-map-files/jquery.min.map
done Verify source maps show up in new index:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
apm:fleet
apm:release-feature
APM UI - Release Feature Goal
apm:test-plan-done
Pull request that was successfully tested during the test plan
Team:APM
All issues that need APM UI Team support
v8.7.0
Pitch: https://github.com/elastic/apm-dev/issues/852 (internal)
APM currently requires Fleet for powering several APM-specific features. To make Fleet optional we need to replicate those features.
Source maps
Source maps are currently stored as Fleet artifacts. In addition to this we should store source maps in an APM owned index that APM Server can query directly.
Privileges
The source map index should most likely be accessed using the internal kibana user. The reason for this is that we need to create an API token for APM Server with access to the index. We may also need to run the migrations in the background (with the system user)
The kibana system user may not have access to the source map index by default. Privileges for built in roles is defined her:
https://github.com/elastic/elasticsearch/blob/fb38095598953f1e5eb3ade7272f2c4e1064f7ed/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java
Privilieges added to
kibana_system
in elastic/elasticsearch#92160.Deprecate existing source map settings
There is a legacy setting
xpack.apm.indices.sourcemap
that is not longer used. This should be marked as deprecated (and later removed) to avoid confusion.kibana/x-pack/plugins/apm/server/index.ts
Line 54 in 185993c
Index naming
Possible name for the index:
.apm-source-map
to align with other APM system indices:kibana/x-pack/plugins/apm/server/routes/settings/apm_indices/get_apm_indices.ts
Lines 53 to 56 in b9ffc29
The text was updated successfully, but these errors were encountered: