UNPKG

@dynatrace/react-native-plugin

Version:

This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.

58 lines (57 loc) 2.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ALL_APP_START_KEYS = exports.MODIFY_EVENT_WHITELIST_NAMESPACE = exports.MODIFY_EVENT_WHITELIST_FIELDS = exports.SEND_SESSION_PROPERTY_EVENT_WHITELIST_FIELDS = exports.SEND_EVENT_WHITELIST_FIELDS = exports.SEND_SESSION_PROPERTY_EVENT_WHITELIST_NAMESPACES = exports.SEND_EVENT_WHITELIST_NAMESPACES = exports.AllCharacteristicsKeys = exports.KEY_NAME_REGEX = exports.MAX_CUSTOM_EVENT_VALUE_LENGTH = exports.MAX_CUSTOM_EVENT_KEY_LENGTH = exports.MAX_CUSTOM_EVENT_FIELDS = void 0; const SPECIFICATION_VERSION = '0.19'; exports.MAX_CUSTOM_EVENT_FIELDS = 50; exports.MAX_CUSTOM_EVENT_KEY_LENGTH = 100; exports.MAX_CUSTOM_EVENT_VALUE_LENGTH = 5000; exports.KEY_NAME_REGEX = RegExp('^[a-z0-9]+(?:\\.[a-z][a-z0-9]*|_[a-z0-9]+)*$'); const characteristicsKeyMap = { ["characteristics.has_anr"]: null, ["characteristics.has_crash"]: null, ["characteristics.has_csp_violation"]: null, ["characteristics.has_error"]: null, ["characteristics.has_exception"]: null, ["characteristics.has_failed_request"]: null, ["characteristics.has_request"]: null, ["characteristics.has_w3c_navigation_timings"]: null, ["characteristics.has_w3c_resource_timings"]: null, ["characteristics.has_navigation"]: null, ["characteristics.has_page_summary"]: null, ["characteristics.has_user_interaction"]: null, ["characteristics.has_view_summary"]: null, ["characteristics.is_api_reported"]: null, ["characteristics.has_app_start"]: null, ["characteristics.is_internal"]: null, ["characteristics.is_self_monitoring"]: null, ["characteristics.has_visibility_change"]: null, ["characteristics.has_event_properties"]: null, ["characteristics.has_session_properties"]: null, }; exports.AllCharacteristicsKeys = Object.keys(characteristicsKeyMap); exports.SEND_EVENT_WHITELIST_NAMESPACES = [ "event_properties", ]; exports.SEND_SESSION_PROPERTY_EVENT_WHITELIST_NAMESPACES = [ "session_properties", ]; exports.SEND_EVENT_WHITELIST_FIELDS = [ "duration", ]; exports.SEND_SESSION_PROPERTY_EVENT_WHITELIST_FIELDS = exports.SEND_EVENT_WHITELIST_FIELDS; exports.MODIFY_EVENT_WHITELIST_FIELDS = [ "exception.stack_trace", ]; exports.MODIFY_EVENT_WHITELIST_NAMESPACE = [ "session_properties", "event_properties", ]; const appStartKeyMap = { ["app_start.react_native.content_appeared"]: null, ["app_start.react_native.download.end_time"]: null, ["app_start.react_native.download.start_time"]: null, ["app_start.react_native.run_js_bundle.load_time"]: null, ["app_start.react_native.run_js_bundle.end_time"]: null, ["app_start.react_native.run_js_bundle.start_time"]: null, }; exports.ALL_APP_START_KEYS = Object.keys(appStartKeyMap);