From 53874484f289692620766d2d614a55d9c1da6c41 Mon Sep 17 00:00:00 2001 From: ndesai Date: Wed, 21 Aug 2024 14:02:10 -0500 Subject: [PATCH] docs: release 1.4.2 --- CHANGELOG.md | 12 +++++ README.md | 76 +++++++++++++++++---------- index.js | 2 +- new-relic/__tests__/new-relic.spec.js | 2 +- package.json | 2 +- 5 files changed, 63 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 987d516..bdc412a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 38598b5..8e965c8 100644 --- a/README.md +++ b/README.md @@ -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, }; @@ -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` ``` diff --git a/index.js b/index.js index d56535c..b0f8bc6 100644 --- a/index.js +++ b/index.js @@ -47,7 +47,7 @@ class NewRelic { fedRampEnabled: false, offlineStorageEnabled: true, backgroundReportingEnabled: false, - newEventSystemEnabled: true, + newEventSystemEnabled: false, distributedTracingEnabled: true, }; } diff --git a/new-relic/__tests__/new-relic.spec.js b/new-relic/__tests__/new-relic.spec.js index eb7811b..85aee81 100644 --- a/new-relic/__tests__/new-relic.spec.js +++ b/new-relic/__tests__/new-relic.spec.js @@ -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); }); diff --git a/package.json b/package.json index 5e8e348..377ef2b 100644 --- a/package.json +++ b/package.json @@ -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",