Skip to content

Commit

Permalink
Fix wrong punctuation for arguments in curl commands (#9359) (#11847)
Browse files Browse the repository at this point in the history
* Fix wrong punctuation for arguments in curl commands

Removed the redundant symbol " carried in the curl parameter in the example. In the original example, this will cause the id of the sourcemap managed by kibana to have more escape characters when uploading by referring to the example, which will cause the sourcemap to map to the error stack and cannot work. For example The correct id should be "apm-foo-1.0-xxx", the original example would result in an id of "apm:\"demo\"-\"1.0\-xxx"".
This issue is mentioned in [sourcemap to error stack doesn't work](elastic/apm-agent-rum-js#1289)

* fixed: js.map to js

-F 'bundle_filepath=/test/e2e/general-usecase/bundle.js.map' -> -F 'bundle_filepath=/test/e2e/general-usecase/app.min.js'
- fixed: js.map to js
- fixed: change filename, in actual project development, js and js.map often have the same name except for the suffix name. Such examples will help readers to understand better.

Co-authored-by: Silvia Mitter <[email protected]>
(cherry picked from commit 5af0d4c)

Co-authored-by: LHB6540 <[email protected]>
  • Loading branch information
mergify[bot] and LHB6540 authored Oct 13, 2023
1 parent c3c7580 commit 9ec7402
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/source-map-how-to.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ curl -X POST "http://localhost:5601/api/apm/sourcemaps" \
-H 'Content-Type: multipart/form-data' \
-H 'kbn-xsrf: true' \
-H 'Authorization: ApiKey ${YOUR_API_KEY}' \ <2>
-F 'service_name="foo"' \
-F 'service_version="$SERVICEVERSION"' \
-F 'bundle_filepath="/test/e2e/general-usecase/bundle.js.map"' \
-F 'sourcemap="@./dist/app.min.js.map"'
-F 'service_name=foo' \
-F 'service_version=$SERVICEVERSION' \
-F 'bundle_filepath=/test/e2e/general-usecase/app.min.js' \
-F 'sourcemap=@./dist/app.min.js.map'
----
<1> This example uses the version from `package.json`
<2> The API key used here needs to have appropriate {kibana-ref}/rum-sourcemap-api.html[privileges]
Expand Down

0 comments on commit 9ec7402

Please sign in to comment.