Skip to content

Commit

Permalink
docs: release 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ndesai-newrelic committed Aug 21, 2024
1 parent 4c959b9 commit 5387448
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 31 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 1.4.2

## New Features

1. **Distributed Tracing Control**
- Introducing a new feature flag: `distributedTracingEnabled`, providing the ability to enable or disable distributed tracing functionality.

## Bug Fixes

- Addressed an issue where console debug logs were incorrectly displayed as console errors.


## 1.4.1
## New Features

Expand Down
76 changes: 48 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,14 @@ import {Platform} from 'react-native';

// iOS Specific
// Optional: Enable or disable Background Reporting.
backgroundReportingEnabled:true,
backgroundReportingEnabled:false,

// iOS Specific
// Optional: Enable or disable to use our new, more stable, event system for iOS agent.
newEventSystemEnabled:true
newEventSystemEnabled:false,

// Optional: Enable or disable distributed tracing.
distributedTracingEnabled: true,
};


Expand All @@ -126,33 +129,50 @@ AppToken is platform-specific. You need to generate the seprate token for Androi

### Android Setup
1. Install the New Relic native Android agent ([instructions here](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-apps-gradle-android-studio)).
2. Update `build.gradle`:
```groovy
buildscript {
...
repositories {
...
mavenCentral()
}
dependencies {
...
classpath "com.newrelic.agent.android:agent-gradle-plugin:7.5.0"
}
}
```

3. Update `app/build.gradle`:
```groovy
plugins {
id 'newrelic'
}
```
For legacy plugin application:
```groovy
apply plugin: 'newrelic'
```

4. Make sure your app requests INTERNET and ACCESS_NETWORK_STATE permissions by adding these lines to your `AndroidManifest.xml`
2. Add the following changes to Apply Gradle Plugin:

If you are using Plugins DSL to Apply the NewRelic Gradle Plugin, make the following changes:

In android/settings.gradle:
```groovy
plugins {
id "com.android.application" version "7.4.2" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
id "com.newrelic.agent.android" version "7.5.1" apply false // <-- include this
}
```

In android/app/build.gradle:
```groovy
plugins {
id "com.android.application"
id "kotlin-android"
id "com.newrelic.agent.android" //<-- include this
}
```

Or, if you are using the traditional way to apply the plugin:
```groovy
buildscript {
...
repositories {
...
mavenCentral()
}
dependencies {
...
classpath "com.newrelic.agent.android:agent-gradle-plugin:7.5.1"
}
}
```

Apply the NewRelic plugin to the top of the android/app/build.gradle file:
```groovy
apply plugin: "com.android.application"
apply plugin: 'newrelic' // <-- include this
```
3. Make sure your app requests INTERNET and ACCESS_NETWORK_STATE permissions by adding these lines to your `AndroidManifest.xml`
```
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class NewRelic {
fedRampEnabled: false,
offlineStorageEnabled: true,
backgroundReportingEnabled: false,
newEventSystemEnabled: true,
newEventSystemEnabled: false,
distributedTracingEnabled: true,
};
}
Expand Down
2 changes: 1 addition & 1 deletion new-relic/__tests__/new-relic.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe('New Relic', () => {
expect(NewRelic.agentConfiguration.fedRampEnabled).toBe(false);
expect(NewRelic.agentConfiguration.nativeCrashReportingEnabled).toBe(true);
expect(NewRelic.agentConfiguration.offlineStorageEnabled).toBe(true);
expect(NewRelic.agentConfiguration.newEventSystemEnabled).toBe(true);
expect(NewRelic.agentConfiguration.newEventSystemEnabled).toBe(false);
expect(NewRelic.agentConfiguration.backgroundReportingEnabled).toBe(false);
expect(NewRelic.agentConfiguration.distributedTracingEnabled).toBe(true);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "newrelic-react-native-agent",
"version": "1.4.1",
"version": "1.4.2",
"description": "A New Relic Mobile Agent for React Native",
"main": "./index.js",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit 5387448

Please sign in to comment.