Skip to content

Commit d0c4b7c

Browse files
fix: Add changes for upload sourcemaps snippet (#4763) (#4767)
(cherry picked from commit 27c7b5a) Co-authored-by: David Luna <[email protected]>
1 parent 29c1135 commit d0c4b7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/en/observability/apm/collect-application-data/agents/source-map-how-to.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ var formData = {
156156
service_name: 'service-name’,
157157
service_version: require("./package.json").version, // Or use 'git-rev-sync' for git commit hash
158158
bundle_filepath: 'http://localhost/app.min.js',
159-
sourcemap: fs.createReadStream(filepath)
159+
sourcemap: fs.readFileSync(filepath, { encoding: 'utf-8' })
160160
}
161161
request.post({url: 'http://localhost:5601/api/apm/sourcemaps',formData: formData}, function (err, resp, body) {
162162
if (err) {

0 commit comments

Comments
 (0)