Upload source maps with cURL
In some environments, you can’t use the Faro Javascript bundler plugin to upload source maps. In these instances, you can use cURL to upload source maps.
Get started
Run the application bundler with the Faro Javascript bundler plugin enabled.
Note
The Faro JavaScript bundler plugin doesn’t include a flag to disable upload attempts, so you may receive an error when the plugin attempts to upload.
To avoid this error, you can enter a dummy URL into the
endpoint
parameter in the plugin configuration.
Create the cURL command
Use the following example to build your command.
You can find some properties, like stackID
and your-regions-faro-api-URL
, in the Frontend Observability plugin by navigating to App > Settings > Source Maps > Configure source map uploads.
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <stackID>:<apiKey>" \
-d @<filename.js.map> \
https://<your-regions-faro-api-URL>.grafana.net/faro/api/v1/app/<appId>/sourcemaps/<bundleID>
Note
If you don’t specify abundleID
in the Faro JavaScript bundler plugin, the command creates it dynamically. You will either need to retrieve thebundleID
from the output or specify your ownbundleID
if you want to automate the process.