In your build pipeline, you will need to run the CLI tool. Here's how to run it:
npx @hyperdx/cli upload-sourcemaps --path="/path/to/sourcemaps" --serviceKey="your-service-account-api-key"
You can also add this as an npm script
// In package.json
{
"scripts": {
"upload-sourcemaps": "npx @hyperdx/cli upload-sourcemaps --path=\"/path/to/sourcemaps\""
}
}
Optionally, you can set the HYPERDX_SERVICE_KEY
environment variable to avoid passing the serviceKey
flag.
You can test your changes locally by running the following commands:
yarn build
node dist/index.js upload ...