1.1.21 • Published 3 months ago

@coralogix/rum-cli v1.1.21

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

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.

npm version

Links

Installation

To install the Coralogix RUM CLI, follow these steps:

  1. Open a terminal or command prompt.
  2. Run the following command to install the CLI globally: npm install -g coralogix-rum-cli
  3. 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:

  1. 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>
  2. Delete source maps:

    • coralogix-rum-cli delete-source-maps -k <privateKey> -a <application> -v <version> -e <env>
  3. 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>
  4. 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
  5. 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:

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:

  1. Create a new file named upload-source-maps.sh and open it for editing.

  2. 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:

  1. 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.

1.1.21

3 months ago

1.1.20

4 months ago

1.1.19

4 months ago

1.1.18

5 months ago

1.1.17

5 months ago

1.1.16

7 months ago

1.1.15

7 months ago

1.1.14

8 months ago

1.1.13

8 months ago

1.1.12

8 months ago

1.1.11

8 months ago

1.1.9

9 months ago

1.1.8

9 months ago

1.1.7

9 months ago

1.1.6

9 months ago

1.1.5

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.0

9 months ago

0.3.10

9 months ago

0.3.9

9 months ago

0.3.8

9 months ago

0.3.7

9 months ago

0.3.6

9 months ago

0.3.5

9 months ago

0.3.4

10 months ago

0.3.3

10 months ago

0.3.2

10 months ago

0.3.1

10 months ago

0.3.0

10 months ago

0.2.9

10 months ago