@coralogix/rum-cli v1.1.21
Official Coralogix RUM CLI
The Coralogix RUM CLI is a command-line interface tool that simplifies the process of uploading source maps for your applications to the Coralogix RUM service. This CLI tool provides an easy and efficient way to authenticate with the Coralogix API, specify the application and application version information, and traverse a folder to upload the relevant source map files.
Links
Installation
To install the Coralogix RUM CLI, follow these steps:
- Open a terminal or command prompt.
- Run the following command to install the CLI globally:
npm install -g coralogix-rum-cli
- Once the installation is complete, you can use the CLI by running the
coralogix-rum-cli
command in your terminal.
Commands
Here are some examples of how to use the Coralogix RUM CLI:
Create source maps:
coralogix-rum-cli upload-source-maps -k <privateKey> -a <application> -v <version> -f <folderPath> -e <env> -c <commitHash> -n <repoName> -o <orgName>
Delete source maps:
coralogix-rum-cli delete-source-maps -k <privateKey> -a <application> -v <version> -e <env>
Update existing source maps:
coralogix-rum-cli update-source-maps -k <privateKey> -a <application> -v <version> -f <folderPath> -e <env> -c <commitHash> -n <repoName> -o <orgName>
Update existing source maps or create a new one if not found:
coralogix-rum-cli update-source-maps -k <privateKey> -a <application> -v <version> -f <folderPath> -e <env> -c <commitHash> -n <repoName> -o <orgName> -g
Display help for upload command:
coralogix-rum-cli upload-source-maps --help
Options
-k, --private-key <privateKey>
: Private key to authenticate with the Coralogix API.-a, --application <application>
: Name of the application.-v, --version <version>
: The application version - must match the version used by RUM sdk.-f, --folder-path <folderPath>
: Path to the folder containing the source maps.-e, --env <env>
: Your environment.-c, --commit-hash <commitHash>
: GitHub commit hash (optional).-n, --repo-name <repoName>
: GitHub repository name (optional).-o, --org-name <orgName>
: GitHub organization name (optional).-g, --generate <generate>
: Update existing release or create a new one if not found (optional).-h, --help
: Display help.
Environments
The Coralogix RUM CLI supports the following environments:
- EU1: https://ng-api-grpc.coralogix.com:443, // eu-west-1 (Ireland)
- EU2: https://ng-api-grpc.eu2.coralogix.com:443, // eu-north-1 (Stockholm)
- US1: https://ng-api-grpc.coralogix.us:443, // us-east-2 (Ohio)
- US2: https://ng-api-grpc.cx498.coralogix.com:443, // us-west-2 (Oregon)
- AP1: https://ng-api-grpc.app.coralogix.in:443, // ap-south-1 (Mumbai)
- AP2: https://ng-api-grpc.coralogixsg.com:443, // ap-southeast-1 (Singapore)
Please use the appropriate environment value when specifying the -e, --env
option.
Source maps folder size limit
The source map folder size limit is 100MB in this project. Please ensure that it does not exceed this limit.
Integration
CI Integration:
Create a new file named
upload-source-maps.sh
and open it for editing.Copy and paste the following script into the file, replacing the placeholder values with your actual information:
#! /usr/bin/env bash
# Replace these values with your actual information
REPO_NAME="your-repo-name"
ORG_NAME="your-github-username"
APPLICATION="your-application-name"
ENV="your-environment"
SOURCE_MAPS_PATH="your-source-maps-path"
PRIVATE_KEY="your-coralogix-private-key"
VERSION="your-application-version"
# Get the commit hash using git rev-parse
COMMIT_HASH=$(git rev-parse HEAD)
# Run Coralogix RUM CLI to upload source maps
coralogix-rum-cli upload-source-maps -k "$PRIVATE_KEY" -a "$APPLICATION" -v "$VERSION" -f "$SOURCE_MAPS_PATH" -e "$ENV" -c "$COMMIT_HASH" -n "$REPO_NAME" -o "$ORG_NAME"
Non-CI Integration:
- Open a terminal window,and run the following command:
coralogix-rum-cli upload-source-maps -k "$PRIVATE_KEY" -a "$APPLICATION" -v "$VERSION" -f "$SOURCE_MAPS_PATH" -e "$ENV" -c "$COMMIT_HASH" -n "$REPO_NAME" -o "$ORG_NAME"
IMPORTANT: The $VERSION param must align with the content of the version field in your CoralogixRum.init() configuration in Coralogix SDK for Browsers |
---|
Optional GitHub Information
The following options are optional and relate to GitHub information, providing context for source maps:
-c, --commit-hash <commitHash>
: This option allows you to provide the GitHub commit hash associated with the source maps. Including this hash can help in tracking down issues specific to a particular commit.
-n, --repo-name <repoName>
: By specifying the GitHub repository name, you're indicating the repository where the source code is hosted. This information aids in correlating source maps with the correct repository.
-o, --org-name <orgName>
: This option enables you to input your GitHub organization user, helping to attribute the source maps to the appropriate organization user.
License
This project is licensed under the MIT License. See the LICENSE file for details.
3 months ago
4 months ago
4 months ago
5 months ago
5 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago