Gathering detailed insights and metrics for new-relic-synthetics-manager
Gathering detailed insights and metrics for new-relic-synthetics-manager
Gathering detailed insights and metrics for new-relic-synthetics-manager
Gathering detailed insights and metrics for new-relic-synthetics-manager
npm install new-relic-synthetics-manager
Typescript
Module System
Node Version
NPM Version
47.5
Supply Chain
89.9
Quality
67.1
Maintenance
25
Vulnerability
95.1
License
JavaScript (100%)
Total
12,689
Last Day
1
Last Week
1
Last Month
10
Last Year
571
47 Stars
92 Commits
15 Forks
15 Watching
2 Branches
3 Contributors
Minified
Minified + Gzipped
Latest Version
2.0.0
Package Id
new-relic-synthetics-manager@2.0.0
Unpacked Size
NaN GB
Size
23.17 kB
File Count
0
NPM Version
3.10.3
Node Version
6.3.0
Publised On
09 Dec 2024
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
1
Compared to previous week
Last month
-71.4%
10
Compared to previous month
Last year
-36.9%
571
Compared to previous year
This project has two goals to improve working with New Relic Synthetics:
For more information on New Relic Synthetics see New Relic's Documentation
This tool is designed to allow creating, writing and managing New Relic scripted browser synthetics. This allows synthetics to be run and debug on a local machine and then push them to New Relic when ready. This also allows synthetics to be stored in a SCM system to track changes and have a CI system push them to New Relic in an automation fashion.
new-relic-synthetics-manager contains both a command line tool and a library.
The synthmanager command line tool allows the create, update and import synthetics to/from New Relic.
The new-relic-synthetics-manager library provides the setup needed to simulate the environment that synthetics are run in New Relic. This is added to your synthetics with "require ('new-relic-synthetics-manager')" line of code at the top of your local synthetics script. This line should NOT be removed or changed. It is automatically striped out of the synthetic code when it is uploaded to New Relic.
The synthmanager command line tool makes calls to the New Relic Synthetics API, which is rate limited at 3 requests per second. Each run of the command will only make one or two calls, so a single run should not be a problem. But if commands are run in parallel or in rapid succession, the rate limit could be hit. This is especially important if the tool is added to a CI/CD system.
synthmanager was written for node.js v6 or greater. You will need to have that installed to proceed. Installation instructions can be found here: https://nodejs.org/
Install the synthmanager command via npm to allow you to use the command line tool:
$ npm install new-relic-synthetics-manager -g
Next, create an npm project to store our synthetics:
$ mkdir syntheticsProject
$ cd syntheticsProject
$ npm init
After creating a project, add new-relic-synthetics-manager as a dependency:
$ npm install new-relic-synthetics-manager --save
Now, new synthetics can be created with the 'synthmanager create' command:
$ synthmanager create --name "New Synthetic Name" --filename newSyntheticName.js
This will create the synthetic in New Relic and create a js file with the specified name under the synthetics directory. The js file has some basic setup needed to run the synthetic locally.
After, when the synthetics code has been completed, it can be uploaded to New Relic with the 'synthmanager update' command:
$ synthmanager update --name "New Synthetic Name"
synthmanager create
Create a synthetic in New Relic and a file to contain the synthetic code. The local file will be created in the directory the command was run. This is where you will put your test code.
synthmanager update
Update New Relic with the latest synthetic code for the specified synthetic.
In order to import a New Relic Synthetic, the synthetic id is needed. This can be obtained from the New Relic Synthetics website. Navigate to the Synthetic to import and the id will be the last part of the URL (It is made up of 5 hexidecimal numbers separated by dashes).
synthmanager import
--id <synthetic_id> - ID of synthetic in New Relic (this is part of the url when viewing the synthetic in New Relic)
--filename
Import an existing synthetic from New Relic.
These options can be used with any command:
Synthetics run from specified locations. You can get a list of available locations from the following command.
synthmanager locations
A synthetics configuration can be changed with the following command:
synthmanager config
The synthetic to change must be specified with one of the following options:
The following configuration changes can be made:
Configuration options can be changed by adding a 'synthetics.config.json' file in the base of the project.
Available configuration options are:
New Relic runs synthetics using the chrome web browser. So that is the recommended way to run them locally. In order to run them, the following need to be setup:
Once the prerequisites are installed and a synthetic is created, it can be run locally. This can be done with an IDE or using node:
$ node synthetics/newSyntheticName.js
See the samples directory for an example of what Synthetics look like and a sample of how synthetics might be added to a continuous delivery system.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/9 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
56 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More