@dynatrace/react-native-plugin 2.287.2 → 2.287.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1320,9 +1320,11 @@ If you are struggling with a problem, submit a support ticket to Dynatrace (supp
1320
1320
  <br/><br/>
1321
1321
  ## Changelog
1322
1322
 
1323
- 2.287.2
1323
+ 2.287.3
1324
1324
  * Update Android (8.287.1.1006) & iOS Agent (8.287.2.1009)
1325
1325
  * Added request and response size to [manual web request tagging](#manual-web-request-tagging)
1326
+ * Improved logging of configuration at startup
1327
+ * Fixed dtActionName when using ActionNamePrivacy
1326
1328
 
1327
1329
  2.285.2
1328
1330
  * Fixed bridge module issue for older React Native versions (< 0.65.0)
@@ -9,7 +9,7 @@ exports.ApplicationHandler = {
9
9
  if (!ConfigurationHandler_1.ConfigurationHandler.isConfigurationAvailable()) {
10
10
  const config = new ConfigurationBuilder_1.ConfigurationBuilder('', '').buildConfiguration();
11
11
  ConfigurationHandler_1.ConfigurationHandler.setConfiguration(config);
12
- Logger_1.Logger.logDebug('Configuration set: ' + JSON.stringify(config));
12
+ Logger_1.Logger.logDebug('Configuration set: ' + config.toString());
13
13
  Logger_1.Logger.logInfo('Dynatrace React Native Plugin started!');
14
14
  }
15
15
  },
@@ -28,7 +28,7 @@ exports.Dynatrace = {
28
28
  if (configuration !== undefined) {
29
29
  DynatraceBridge_1.DynatraceNative.start(configuration);
30
30
  ConfigurationHandler_1.ConfigurationHandler.setConfiguration(configuration);
31
- Logger_1.Logger.logDebug('Manual Configuration set: ' + JSON.stringify(configuration));
31
+ Logger_1.Logger.logDebug('Configuration set: ' + configuration.toString());
32
32
  }
33
33
  else {
34
34
  throw new Error('Configuration is empty! Not allowed for Manual Startup!');
@@ -25,7 +25,7 @@ const TouchableHelper = (Dynatrace, Logger) => ({
25
25
  }
26
26
  else {
27
27
  let finalNameOfAction = nameOfAction;
28
- if (ConfigurationHandler_1.ConfigurationHandler.isActionNamePrivacyEnabled()) {
28
+ if (!(0, IDynatraceProperties_1.isDynatraceNaming)(props) && ConfigurationHandler_1.ConfigurationHandler.isActionNamePrivacyEnabled()) {
29
29
  finalNameOfAction = isButton ? 'Button' : 'Touchable';
30
30
  }
31
31
  const action = Dynatrace.enterAutoAction(`Touch on ${finalNameOfAction}`);
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Configuration = void 0;
4
+ const LogLevel_1 = require("../model/LogLevel");
4
5
  class Configuration {
5
6
  constructor(beaconUrl, applicationId, reportCrash, logLevel, lifecycleUpdate, userOptIn, actionNamePrivacy, bundleName) {
6
7
  this.beaconUrl = beaconUrl;
@@ -12,5 +13,22 @@ class Configuration {
12
13
  this.actionNamePrivacy = actionNamePrivacy;
13
14
  this.bundleName = bundleName;
14
15
  }
16
+ toString() {
17
+ let configurationString;
18
+ if (this.beaconUrl === '' && this.applicationId === '') {
19
+ configurationString = '{Startup: Auto Start,';
20
+ }
21
+ else {
22
+ configurationString = `{Startup: Manual Start, applicationId: ${this.applicationId}, beaconUrl: ${this.beaconUrl},`;
23
+ }
24
+ configurationString += ` reportCrash: ${this.reportCrash}, lifecycleUpdate: ${this.lifecycleUpdate},`
25
+ + ` userOptIn: ${this.userOptIn}, actionNamePrivacy: ${this.actionNamePrivacy},`
26
+ + ` logLevel: ${(0, LogLevel_1.LogLevelToString)(this.logLevel)}`;
27
+ if (this.bundleName !== undefined) {
28
+ configurationString += `, bundleName: ${this.bundleName}`;
29
+ }
30
+ configurationString += '}';
31
+ return configurationString;
32
+ }
15
33
  }
16
34
  exports.Configuration = Configuration;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ManualStartupConfiguration = void 0;
4
+ const LogLevel_1 = require("../model/LogLevel");
4
5
  const ConfigurationDefaults_1 = require("./ConfigurationDefaults");
5
6
  const ConfigurationPreset_1 = require("./ConfigurationPreset");
6
7
  class ManualStartupConfiguration {
@@ -36,5 +37,15 @@ class ManualStartupConfiguration {
36
37
  this.bundleName = bundleName;
37
38
  }
38
39
  }
40
+ toString() {
41
+ let configurationString = `{Startup: Manual Start, applicationId: ${this.applicationId}, beaconUrl: ${this.beaconUrl},`
42
+ + ` reportCrash: ${this.reportCrash}, lifecycleUpdate: ${this.lifecycleUpdate}, userOptIn: ${this.userOptIn},`
43
+ + ` actionNamePrivacy: ${this.actionNamePrivacy}, logLevel: ${(0, LogLevel_1.LogLevelToString)(this.logLevel)}`;
44
+ if (this.bundleName !== undefined) {
45
+ configurationString += `, bundleName: ${this.bundleName}`;
46
+ }
47
+ configurationString += '}';
48
+ return configurationString;
49
+ }
39
50
  }
40
51
  exports.ManualStartupConfiguration = ManualStartupConfiguration;
@@ -1,8 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LogLevel = void 0;
3
+ exports.LogLevelToString = exports.LogLevel = void 0;
4
4
  var LogLevel;
5
5
  (function (LogLevel) {
6
6
  LogLevel[LogLevel["Debug"] = 0] = "Debug";
7
7
  LogLevel[LogLevel["Info"] = 1] = "Info";
8
8
  })(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
9
+ const LogLevelToString = (level) => {
10
+ if (level === LogLevel.Debug) {
11
+ return 'Debug';
12
+ }
13
+ else {
14
+ return 'Info';
15
+ }
16
+ };
17
+ exports.LogLevelToString = LogLevelToString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace/react-native-plugin",
3
- "version": "2.287.2",
3
+ "version": "2.287.3",
4
4
  "description": "This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.",
5
5
  "main": "index.js",
6
6
  "types": "typings/react-native-dynatrace.d.ts",
@@ -71,7 +71,7 @@
71
71
  "author": "Dynatrace",
72
72
  "license": "SEE LICENSE IN LICENSE.md",
73
73
  "dependencies": {
74
- "@babel/runtime": "^7.24.1",
74
+ "@babel/runtime": "^7.24.4",
75
75
  "jscodeshift": "^0.15.2",
76
76
  "plist": "^3.1.0",
77
77
  "proxy-polyfill": "^0.3.2",