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

docs: Add deprecation notice to source map upload docs #6926

Merged
merged 1 commit into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/legacy/sourcemaps.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
<titleabbrev>Create and upload source maps (RUM)</titleabbrev>
++++

IMPORTANT: {deprecation-notice-data}
If you've already upgraded, please see <<source-map-how-to>> instead.

NOTE: This guide is only for standalone APM Server users. Users running the <<apm-integration,APM integration>>
need to use the Kibana {kibana-ref}/rum-sourcemap-api.html[source map upload API] instead.
IMPORTANT: The APM Server source map endpoint has been deprecated in 7.16 and will be removed in 8.0.
It is being replaced by the {kib} source map API.
If you've already <<upgrade-to-apm-integration,upgraded to the Elastic APM integration>>,
see the new <<source-map-how-to,{kib} source map upload guide>>.
+
Standalone APM Server users will need to wait until 8.0 to use the new {kib} source map API.

Minifying JavaScript bundles in production is a common practice;
it can greatly improve the load time and network latency of your applications.
Expand Down
14 changes: 7 additions & 7 deletions docs/source-map-how-to.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ Follow the steps below to enable source mapping your error stack traces in the A
[[source-map-rum-initialize]]
=== Initialize the RUM Agent

First, set the service name and version of your application when initializing the RUM Agent.
The `serviceVersion` you choose might be the `version` from your `package.json`. For example:
Set the service name and version of your application when initializing the RUM Agent.
To make uploading subsequent source maps easier, the `serviceVersion` you choose might be the
`version` from your `package.json`. For example:

[source,js]
----
Expand All @@ -57,19 +58,18 @@ const serviceVersion = git.short()
----

It can also be any other unique string that indicates a specific version of your application.
APM Server uses the `serviceVersion` to match the correct source map file to each stack trace.
The APM integration uses the service name and version to match the correct source map file to each stack trace.

[float]
[role="child_attributes"]
[[source-map-rum-generate]]
=== Generate a source map

To be compatible with Elastic APM, source maps must follow the
https://sourcemaps.info/spec.html[source map revision 3 proposal spec].

Source maps can be generated and configured in many different ways.
For example, if you're using parcel, they are generated by default.
If you are using webpack, some configuration may need to be done to generate a source map:
For example, parcel automatically generates source maps by default.
If you're using webpack, some configuration may be needed to generate a source map:

[source,js]
----
Expand Down Expand Up @@ -138,7 +138,7 @@ curl -X POST "http://localhost:5601/api/apm/sourcemaps" \

To ensure uploading source maps become a part of your deployment process,
consider automating the process with a custom application.
Heres an example Node.js application that uploads the source map file created in the previous step:
Here's an example Node.js application that uploads the source map file created in the previous step:

[source,js]
----
Expand Down