Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

newrelic-react-native-agent

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

newrelic-react-native-agent - npm Package Compare versions

Comparing version 1.3.5 to 1.3.6

2

__mocks__/nrm-modular-agent.js

@@ -41,2 +41,4 @@ /*

addHTTPHeadersTrackingFor:jest.fn(),
setMaxOfflineStorageSize: jest.fn(),

@@ -43,0 +45,0 @@ isAgentStarted: (name, callback) => {

@@ -32,2 +32,3 @@ export default newRelic;

fedRampEnabled: boolean;
offlineStorageEnabled: boolean;
};

@@ -199,2 +200,9 @@ LogLevel: {

/**
* Sets the maximum size of total data that can be stored for offline storage.By default, mobile monitoring can collect a maximum of 100 megaBytes of offline storage.
* When a data payload fails to send because the device doesn't have an internet connection, it can be stored in the file system until an internet connection has been made.
* After a typical harvest payload has been successfully sent, all offline data is sent to New Relic and cleared from storage.
* @param megaBytes {number} Maximum size in megaBytes that can be stored in the file system..
*/
setMaxOfflineStorageSize(megaBytes: number): void;
/**
* Track a method as an interaction

@@ -201,0 +209,0 @@ */

@@ -20,2 +20,3 @@ export default NRMAModularAgentWrapper;

setMaxEventPoolSize: (maxSize: any) => void;
setMaxOfflineStorageSize: (megaBytes: any) => void;
setAttribute: (attributeName: any, value: any) => void;

@@ -22,0 +23,0 @@ removeAttribute: (attributeName: any) => void;

@@ -49,3 +49,4 @@ /*

crashCollectorAddress: "",
fedRampEnabled: false
fedRampEnabled: false,
offlineStorageEnabled: true
};

@@ -367,2 +368,12 @@ }

/**
* Sets the maximum size of total data that can be stored for offline storage.By default, mobile monitoring can collect a maximum of 100 megaBytes of offline storage.
* When a data payload fails to send because the device doesn't have an internet connection, it can be stored in the file system until an internet connection has been made.
* After a typical harvest payload has been successfully sent, all offline data is sent to New Relic and cleared from storage.
* @param megaBytes {number} Maximum size in megaBytes that can be stored in the file system..
*/
setMaxOfflineStorageSize(megaBytes) {
this.NRMAModularAgentWrapper.execute('setMaxOfflineStorageSize', megaBytes);
}
/**

@@ -369,0 +380,0 @@ * Track a method as an interaction

@@ -87,2 +87,3 @@ /*

expect(NewRelic.agentConfiguration.nativeCrashReportingEnabled).toBe(true);
expect(NewRelic.agentConfiguration.offlineStorageEnabled).toBe(true);

@@ -104,3 +105,5 @@ });

crashCollectorAddress: "gov-mobile-crash.newrelic.com",
fedRampEnabled: true
fedRampEnabled: true,
nativeCrashReportingEnabled:false,
offlineStorageEnabled:false
};

@@ -122,2 +125,5 @@

expect(NewRelic.agentConfiguration.fedRampEnabled).toBe(true);
expect(NewRelic.agentConfiguration.offlineStorageEnabled).toBe(false);
expect(NewRelic.agentConfiguration.nativeCrashReportingEnabled).toBe(false);
});

@@ -282,2 +288,17 @@

it('should set max offline storage size', () => {
NewRelic.setMaxOfflineStorageSize(100);
expect(MockNRM.setMaxOfflineStorageSize.mock.calls.length).toBe(1);
expect(MockNRM.setMaxOfflineStorageSize.mock.calls[0][0]).toBe(100);
});
it('should not set max offline storage size with invalid size', () => {
NewRelic.setMaxOfflineStorageSize(null);
NewRelic.setMaxOfflineStorageSize('100');
NewRelic.setMaxOfflineStorageSize(true);
NewRelic.setMaxOfflineStorageSize(-100);
expect(MockNRM.setMaxOfflineStorageSize.mock.calls.length).toBe(4);
});
it('should set a valid Attribute', () => {

@@ -284,0 +305,0 @@ NewRelic.setAttribute('eventType', 'eventName');

@@ -140,3 +140,8 @@ /**

};
setMaxOfflineStorageSize = (megaBytes) => {
NRMModularAgent.setMaxOfflineStorageSize(megaBytes);
};
setAttribute = (attributeName, value) => {

@@ -143,0 +148,0 @@ const attribute = new Attribute({ attributeName, value });

6

package.json
{
"name": "newrelic-react-native-agent",
"version": "1.3.5",
"version": "1.3.6",
"description": "A New Relic Mobile Agent for React Native",

@@ -95,6 +95,6 @@ "main": "./index.js",

"ios": {
"newrelic": "7.4.8"
"newrelic": "7.4.9"
},
"android": {
"newrelic": "7.2.0",
"newrelic": "7.3.0",
"ndk": "1.0.4"

@@ -101,0 +101,0 @@ }

@@ -106,2 +106,5 @@ [![Community Plus header](https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus)

//fedRampEnabled: false
// Optional: Enable or disable offline data storage when no internet connection is available.
offlineStorageEnabled:true
};

@@ -129,3 +132,3 @@

...
classpath "com.newrelic.agent.android:agent-gradle-plugin:7.2.0"
classpath "com.newrelic.agent.android:agent-gradle-plugin:7.3.0"
}

@@ -417,3 +420,3 @@ }

```
### [shutdown](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/add-tracked-headers/)() : void;
### [addHTTPHeadersTrackingFor](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/add-tracked-headers/)() : void;
> This API allows you to add any header field strings to a list that gets recorded as attributes with networking request events. After header fields have been added using this function, if the headers are in a network call they will be included in networking events in NR1.

@@ -424,2 +427,9 @@ ```js

### [setMaxOfflineStorageSize](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/set-max-offline-storage/)() : void;
> Sets the maximum size of total data that can be stored for offline storage.By default, mobile monitoring can collect a maximum of 100 megaBytes of offline storage. When a data payload fails to send because the device doesn't have an internet connection, it can be stored in the file system until an internet connection has been made. After a typical harvest payload has been successfully sent, all offline data is sent to New Relic and cleared from storage.
```js
NewRelic.setMaxOfflineStorageSize(200);
```
## How to see JSErrors(Fatal/Non Fatal) in NewRelic One?

@@ -449,3 +459,3 @@

The agent supports symbolication of JavaScript errors in debug mode only. Symbolicated errors are shown as Handled Exceptions in New Relic One. If you want to manually symboliate, please follow the steps described [here for Symbolication](https://reactnative.dev/docs/symbolication).
The agent supports symbolication of JavaScript errors in debug mode only. Symbolicated errors are shown as Handled Exceptions in New Relic One. If you want to manually symboliate, please follow the steps described [here for Symbolication](https://reactnative.dev/docs/debugging-release-builds).

@@ -452,0 +462,0 @@ ### Symbolication for Javascript errors are coming in future releases.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc