@dynatrace/react-native-plugin
Version:
This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.
28 lines (27 loc) • 1.45 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.StringToDataCollectionLevel = exports.DataCollectionLevel = void 0;
const DynatraceBridge_1 = require("../DynatraceBridge");
const { DATA_COLLECTION_OFF, DATA_COLLECTION_PERFORMANCE, DATA_COLLECTION_USERBEHAVIOR, } = !!DynatraceBridge_1.DynatraceNative.getConstants
? DynatraceBridge_1.DynatraceNative.getConstants()
: DynatraceBridge_1.DynatraceNative;
var DataCollectionLevel;
(function (DataCollectionLevel) {
DataCollectionLevel[DataCollectionLevel["Off"] = DATA_COLLECTION_OFF] = "Off";
DataCollectionLevel[DataCollectionLevel["Performance"] = DATA_COLLECTION_PERFORMANCE] = "Performance";
DataCollectionLevel[DataCollectionLevel["User"] = DATA_COLLECTION_USERBEHAVIOR] = "User";
DataCollectionLevel[DataCollectionLevel["UserBehavior"] = DATA_COLLECTION_USERBEHAVIOR] = "UserBehavior";
})(DataCollectionLevel = exports.DataCollectionLevel || (exports.DataCollectionLevel = {}));
const StringToDataCollectionLevel = (level) => {
if (level === DATA_COLLECTION_OFF) {
return DataCollectionLevel.Off;
}
if (level === DATA_COLLECTION_PERFORMANCE) {
return DataCollectionLevel.Performance;
}
if (level === DATA_COLLECTION_USERBEHAVIOR) {
return DataCollectionLevel.UserBehavior;
}
return DataCollectionLevel.UserBehavior;
};
exports.StringToDataCollectionLevel = StringToDataCollectionLevel;