Skip to content
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] Fleet: Introduce API for uploading source maps for RUM #95393

Closed
axw opened this issue Mar 25, 2021 · 1 comment · Fixed by #101623
Closed

[APM] Fleet: Introduce API for uploading source maps for RUM #95393

axw opened this issue Mar 25, 2021 · 1 comment · Fixed by #101623
Assignees
Labels
apm:fleet enhancement New value added to drive a business result Team:APM All issues that need APM UI Team support v7.14.0

Comments

@axw
Copy link
Member

axw commented Mar 25, 2021

APM Server has an API endpoint for users to upload source maps for RUM: https://www.elastic.co/guide/en/apm/server/current/sourcemap-api.html. Users upload source maps using this API, and then APM Server fetches the source maps back out of Elasticsearch when RUM events are received, in order to map from generated back to source locations in stacktrace frames.

As part of the move to Fleet we will need to move away from fetching source maps directly from (and indexing source maps into) Elasticsearch, as the privileges APM Server is given do not cover this.

I propose that we introduce an API endpoint to Kibana that is roughly equivalent: users will upload source maps to Kibana (e.g. /api/apm/sourcemaps), and then:

  • the source map will be recorded as a Fleet Artifact
  • a reference to the source map will be injected into APM Fleet policies, including: service name, service version, bundle filepath, artifact download URL

After the server receives the Fleet policy update, it will fetch the source map from Fleet Server, using the given artifact download URL. See elastic/apm-server#5002.

Although the current API is probably not ideal, I think we should make the API in Kibana as close to it as possible. This will simplify users' migration of uploading from APM Server to Kibana.

I've written some horrible POC code for reference: axw@e529752

@axw axw added Team:APM All issues that need APM UI Team support enhancement New value added to drive a business result v7.14.0 apm:fleet labels Mar 25, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:fleet enhancement New value added to drive a business result Team:APM All issues that need APM UI Team support v7.14.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants