@microsoft/applicationinsights-properties-js 3.0.0-beta.2301-12 → 3.0.0-beta.2301-14
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/browser/applicationinsights-properties-js.integrity.json +9 -9
- package/browser/applicationinsights-properties-js.js +36 -30
- package/browser/applicationinsights-properties-js.js.map +1 -1
- package/browser/applicationinsights-properties-js.min.js +2 -2
- package/browser/applicationinsights-properties-js.min.js.map +1 -1
- package/dist/applicationinsights-properties-js.api.json +69 -26
- package/dist/applicationinsights-properties-js.d.ts +1 -1
- package/dist/applicationinsights-properties-js.js +36 -30
- package/dist/applicationinsights-properties-js.js.map +1 -1
- package/dist/applicationinsights-properties-js.min.js +2 -2
- package/dist/applicationinsights-properties-js.min.js.map +1 -1
- package/dist/applicationinsights-properties-js.rollup.d.ts +1 -1
- package/dist-esm/Context/Application.js +1 -1
- package/dist-esm/Context/Device.js +1 -1
- package/dist-esm/Context/Internal.js +7 -3
- package/dist-esm/Context/Internal.js.map +1 -1
- package/dist-esm/Context/Location.js +1 -1
- package/dist-esm/Context/Session.js +22 -18
- package/dist-esm/Context/Session.js.map +1 -1
- package/dist-esm/Context/TelemetryTrace.js +1 -1
- package/dist-esm/Context/User.js +1 -1
- package/dist-esm/Interfaces/IPropTelemetryContext.js +1 -1
- package/dist-esm/Interfaces/IPropertiesConfig.js +1 -1
- package/dist-esm/PropertiesPlugin.js +9 -9
- package/dist-esm/PropertiesPlugin.js.map +1 -1
- package/dist-esm/TelemetryContext.js +1 -1
- package/dist-esm/__DynamicConstants.js +3 -3
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-properties-js.js +1 -1
- package/package.json +3 -3
- package/src/Context/Internal.ts +6 -2
- package/src/Context/Session.ts +24 -20
- package/src/PropertiesPlugin.ts +8 -9
- package/src/__DynamicConstants.ts +2 -2
- package/types/__DynamicConstants.d.ts +2 -2
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
-
"toolVersion": "7.
|
|
5
|
-
"schemaVersion":
|
|
4
|
+
"toolVersion": "7.34.0",
|
|
5
|
+
"schemaVersion": 1011,
|
|
6
6
|
"oldestForwardsCompatibleVersion": 1001,
|
|
7
7
|
"tsdocConfig": {
|
|
8
8
|
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
|
|
@@ -1099,6 +1099,7 @@
|
|
|
1099
1099
|
],
|
|
1100
1100
|
"fileUrlPath": "types/PropertiesPlugin.d.ts",
|
|
1101
1101
|
"releaseTag": "Public",
|
|
1102
|
+
"isAbstract": false,
|
|
1102
1103
|
"name": "PropertiesPlugin",
|
|
1103
1104
|
"preserveMemberOrder": false,
|
|
1104
1105
|
"members": [
|
|
@@ -1145,7 +1146,8 @@
|
|
|
1145
1146
|
"endIndex": 2
|
|
1146
1147
|
},
|
|
1147
1148
|
"isStatic": false,
|
|
1148
|
-
"isProtected": false
|
|
1149
|
+
"isProtected": false,
|
|
1150
|
+
"isAbstract": false
|
|
1149
1151
|
},
|
|
1150
1152
|
{
|
|
1151
1153
|
"kind": "Property",
|
|
@@ -1174,7 +1176,8 @@
|
|
|
1174
1176
|
"endIndex": 2
|
|
1175
1177
|
},
|
|
1176
1178
|
"isStatic": false,
|
|
1177
|
-
"isProtected": false
|
|
1179
|
+
"isProtected": false,
|
|
1180
|
+
"isAbstract": false
|
|
1178
1181
|
},
|
|
1179
1182
|
{
|
|
1180
1183
|
"kind": "Method",
|
|
@@ -1286,6 +1289,7 @@
|
|
|
1286
1289
|
}
|
|
1287
1290
|
],
|
|
1288
1291
|
"isOptional": false,
|
|
1292
|
+
"isAbstract": false,
|
|
1289
1293
|
"name": "initialize"
|
|
1290
1294
|
},
|
|
1291
1295
|
{
|
|
@@ -1315,7 +1319,8 @@
|
|
|
1315
1319
|
"endIndex": 2
|
|
1316
1320
|
},
|
|
1317
1321
|
"isStatic": false,
|
|
1318
|
-
"isProtected": false
|
|
1322
|
+
"isProtected": false,
|
|
1323
|
+
"isAbstract": false
|
|
1319
1324
|
},
|
|
1320
1325
|
{
|
|
1321
1326
|
"kind": "Method",
|
|
@@ -1380,6 +1385,7 @@
|
|
|
1380
1385
|
}
|
|
1381
1386
|
],
|
|
1382
1387
|
"isOptional": false,
|
|
1388
|
+
"isAbstract": false,
|
|
1383
1389
|
"name": "processTelemetry"
|
|
1384
1390
|
}
|
|
1385
1391
|
],
|
|
@@ -1415,6 +1421,7 @@
|
|
|
1415
1421
|
],
|
|
1416
1422
|
"fileUrlPath": "types/Context/Session.d.ts",
|
|
1417
1423
|
"releaseTag": "Public",
|
|
1424
|
+
"isAbstract": false,
|
|
1418
1425
|
"name": "Session",
|
|
1419
1426
|
"preserveMemberOrder": false,
|
|
1420
1427
|
"members": [
|
|
@@ -1445,7 +1452,8 @@
|
|
|
1445
1452
|
"endIndex": 2
|
|
1446
1453
|
},
|
|
1447
1454
|
"isStatic": false,
|
|
1448
|
-
"isProtected": false
|
|
1455
|
+
"isProtected": false,
|
|
1456
|
+
"isAbstract": false
|
|
1449
1457
|
},
|
|
1450
1458
|
{
|
|
1451
1459
|
"kind": "Property",
|
|
@@ -1474,7 +1482,8 @@
|
|
|
1474
1482
|
"endIndex": 2
|
|
1475
1483
|
},
|
|
1476
1484
|
"isStatic": false,
|
|
1477
|
-
"isProtected": false
|
|
1485
|
+
"isProtected": false,
|
|
1486
|
+
"isAbstract": false
|
|
1478
1487
|
},
|
|
1479
1488
|
{
|
|
1480
1489
|
"kind": "Property",
|
|
@@ -1503,7 +1512,8 @@
|
|
|
1503
1512
|
"endIndex": 2
|
|
1504
1513
|
},
|
|
1505
1514
|
"isStatic": false,
|
|
1506
|
-
"isProtected": false
|
|
1515
|
+
"isProtected": false,
|
|
1516
|
+
"isAbstract": false
|
|
1507
1517
|
}
|
|
1508
1518
|
],
|
|
1509
1519
|
"implementsTokenRanges": [
|
|
@@ -1525,6 +1535,7 @@
|
|
|
1525
1535
|
],
|
|
1526
1536
|
"fileUrlPath": "types/Context/Session.d.ts",
|
|
1527
1537
|
"releaseTag": "Public",
|
|
1538
|
+
"isAbstract": false,
|
|
1528
1539
|
"name": "SessionManager",
|
|
1529
1540
|
"preserveMemberOrder": false,
|
|
1530
1541
|
"members": [
|
|
@@ -1606,7 +1617,8 @@
|
|
|
1606
1617
|
"endIndex": 2
|
|
1607
1618
|
},
|
|
1608
1619
|
"isStatic": false,
|
|
1609
|
-
"isProtected": false
|
|
1620
|
+
"isProtected": false,
|
|
1621
|
+
"isAbstract": false
|
|
1610
1622
|
},
|
|
1611
1623
|
{
|
|
1612
1624
|
"kind": "Method",
|
|
@@ -1636,6 +1648,7 @@
|
|
|
1636
1648
|
"overloadIndex": 1,
|
|
1637
1649
|
"parameters": [],
|
|
1638
1650
|
"isOptional": false,
|
|
1651
|
+
"isAbstract": false,
|
|
1639
1652
|
"name": "backup"
|
|
1640
1653
|
},
|
|
1641
1654
|
{
|
|
@@ -1666,6 +1679,7 @@
|
|
|
1666
1679
|
"overloadIndex": 1,
|
|
1667
1680
|
"parameters": [],
|
|
1668
1681
|
"isOptional": false,
|
|
1682
|
+
"isAbstract": false,
|
|
1669
1683
|
"name": "update"
|
|
1670
1684
|
}
|
|
1671
1685
|
],
|
|
@@ -1692,6 +1706,7 @@
|
|
|
1692
1706
|
],
|
|
1693
1707
|
"fileUrlPath": "types/TelemetryContext.d.ts",
|
|
1694
1708
|
"releaseTag": "Public",
|
|
1709
|
+
"isAbstract": false,
|
|
1695
1710
|
"name": "TelemetryContext",
|
|
1696
1711
|
"preserveMemberOrder": false,
|
|
1697
1712
|
"members": [
|
|
@@ -1789,7 +1804,8 @@
|
|
|
1789
1804
|
"endIndex": 2
|
|
1790
1805
|
},
|
|
1791
1806
|
"isStatic": false,
|
|
1792
|
-
"isProtected": false
|
|
1807
|
+
"isProtected": false,
|
|
1808
|
+
"isAbstract": false
|
|
1793
1809
|
},
|
|
1794
1810
|
{
|
|
1795
1811
|
"kind": "Property",
|
|
@@ -1819,7 +1835,8 @@
|
|
|
1819
1835
|
"endIndex": 2
|
|
1820
1836
|
},
|
|
1821
1837
|
"isStatic": false,
|
|
1822
|
-
"isProtected": false
|
|
1838
|
+
"isProtected": false,
|
|
1839
|
+
"isAbstract": false
|
|
1823
1840
|
},
|
|
1824
1841
|
{
|
|
1825
1842
|
"kind": "Method",
|
|
@@ -1884,6 +1901,7 @@
|
|
|
1884
1901
|
}
|
|
1885
1902
|
],
|
|
1886
1903
|
"isOptional": false,
|
|
1904
|
+
"isAbstract": false,
|
|
1887
1905
|
"name": "applyApplicationContext"
|
|
1888
1906
|
},
|
|
1889
1907
|
{
|
|
@@ -1949,6 +1967,7 @@
|
|
|
1949
1967
|
}
|
|
1950
1968
|
],
|
|
1951
1969
|
"isOptional": false,
|
|
1970
|
+
"isAbstract": false,
|
|
1952
1971
|
"name": "applyDeviceContext"
|
|
1953
1972
|
},
|
|
1954
1973
|
{
|
|
@@ -2014,6 +2033,7 @@
|
|
|
2014
2033
|
}
|
|
2015
2034
|
],
|
|
2016
2035
|
"isOptional": false,
|
|
2036
|
+
"isAbstract": false,
|
|
2017
2037
|
"name": "applyInternalContext"
|
|
2018
2038
|
},
|
|
2019
2039
|
{
|
|
@@ -2079,6 +2099,7 @@
|
|
|
2079
2099
|
}
|
|
2080
2100
|
],
|
|
2081
2101
|
"isOptional": false,
|
|
2102
|
+
"isAbstract": false,
|
|
2082
2103
|
"name": "applyLocationContext"
|
|
2083
2104
|
},
|
|
2084
2105
|
{
|
|
@@ -2144,6 +2165,7 @@
|
|
|
2144
2165
|
}
|
|
2145
2166
|
],
|
|
2146
2167
|
"isOptional": false,
|
|
2168
|
+
"isAbstract": false,
|
|
2147
2169
|
"name": "applyOperatingSystemContxt"
|
|
2148
2170
|
},
|
|
2149
2171
|
{
|
|
@@ -2209,6 +2231,7 @@
|
|
|
2209
2231
|
}
|
|
2210
2232
|
],
|
|
2211
2233
|
"isOptional": false,
|
|
2234
|
+
"isAbstract": false,
|
|
2212
2235
|
"name": "applyOperationContext"
|
|
2213
2236
|
},
|
|
2214
2237
|
{
|
|
@@ -2274,6 +2297,7 @@
|
|
|
2274
2297
|
}
|
|
2275
2298
|
],
|
|
2276
2299
|
"isOptional": false,
|
|
2300
|
+
"isAbstract": false,
|
|
2277
2301
|
"name": "applySessionContext"
|
|
2278
2302
|
},
|
|
2279
2303
|
{
|
|
@@ -2339,6 +2363,7 @@
|
|
|
2339
2363
|
}
|
|
2340
2364
|
],
|
|
2341
2365
|
"isOptional": false,
|
|
2366
|
+
"isAbstract": false,
|
|
2342
2367
|
"name": "applyUserContext"
|
|
2343
2368
|
},
|
|
2344
2369
|
{
|
|
@@ -2404,6 +2429,7 @@
|
|
|
2404
2429
|
}
|
|
2405
2430
|
],
|
|
2406
2431
|
"isOptional": false,
|
|
2432
|
+
"isAbstract": false,
|
|
2407
2433
|
"name": "applyWebContext"
|
|
2408
2434
|
},
|
|
2409
2435
|
{
|
|
@@ -2469,6 +2495,7 @@
|
|
|
2469
2495
|
}
|
|
2470
2496
|
],
|
|
2471
2497
|
"isOptional": false,
|
|
2498
|
+
"isAbstract": false,
|
|
2472
2499
|
"name": "cleanUp"
|
|
2473
2500
|
},
|
|
2474
2501
|
{
|
|
@@ -2499,7 +2526,8 @@
|
|
|
2499
2526
|
"endIndex": 2
|
|
2500
2527
|
},
|
|
2501
2528
|
"isStatic": false,
|
|
2502
|
-
"isProtected": false
|
|
2529
|
+
"isProtected": false,
|
|
2530
|
+
"isAbstract": false
|
|
2503
2531
|
},
|
|
2504
2532
|
{
|
|
2505
2533
|
"kind": "Property",
|
|
@@ -2528,7 +2556,8 @@
|
|
|
2528
2556
|
"endIndex": 2
|
|
2529
2557
|
},
|
|
2530
2558
|
"isStatic": false,
|
|
2531
|
-
"isProtected": false
|
|
2559
|
+
"isProtected": false,
|
|
2560
|
+
"isAbstract": false
|
|
2532
2561
|
},
|
|
2533
2562
|
{
|
|
2534
2563
|
"kind": "Property",
|
|
@@ -2558,7 +2587,8 @@
|
|
|
2558
2587
|
"endIndex": 2
|
|
2559
2588
|
},
|
|
2560
2589
|
"isStatic": false,
|
|
2561
|
-
"isProtected": false
|
|
2590
|
+
"isProtected": false,
|
|
2591
|
+
"isAbstract": false
|
|
2562
2592
|
},
|
|
2563
2593
|
{
|
|
2564
2594
|
"kind": "Property",
|
|
@@ -2588,7 +2618,8 @@
|
|
|
2588
2618
|
"endIndex": 2
|
|
2589
2619
|
},
|
|
2590
2620
|
"isStatic": false,
|
|
2591
|
-
"isProtected": false
|
|
2621
|
+
"isProtected": false,
|
|
2622
|
+
"isAbstract": false
|
|
2592
2623
|
},
|
|
2593
2624
|
{
|
|
2594
2625
|
"kind": "Property",
|
|
@@ -2618,7 +2649,8 @@
|
|
|
2618
2649
|
"endIndex": 2
|
|
2619
2650
|
},
|
|
2620
2651
|
"isStatic": false,
|
|
2621
|
-
"isProtected": false
|
|
2652
|
+
"isProtected": false,
|
|
2653
|
+
"isAbstract": false
|
|
2622
2654
|
},
|
|
2623
2655
|
{
|
|
2624
2656
|
"kind": "Property",
|
|
@@ -2648,7 +2680,8 @@
|
|
|
2648
2680
|
"endIndex": 2
|
|
2649
2681
|
},
|
|
2650
2682
|
"isStatic": false,
|
|
2651
|
-
"isProtected": false
|
|
2683
|
+
"isProtected": false,
|
|
2684
|
+
"isAbstract": false
|
|
2652
2685
|
},
|
|
2653
2686
|
{
|
|
2654
2687
|
"kind": "Property",
|
|
@@ -2678,7 +2711,8 @@
|
|
|
2678
2711
|
"endIndex": 2
|
|
2679
2712
|
},
|
|
2680
2713
|
"isStatic": false,
|
|
2681
|
-
"isProtected": false
|
|
2714
|
+
"isProtected": false,
|
|
2715
|
+
"isAbstract": false
|
|
2682
2716
|
},
|
|
2683
2717
|
{
|
|
2684
2718
|
"kind": "Property",
|
|
@@ -2708,7 +2742,8 @@
|
|
|
2708
2742
|
"endIndex": 2
|
|
2709
2743
|
},
|
|
2710
2744
|
"isStatic": false,
|
|
2711
|
-
"isProtected": false
|
|
2745
|
+
"isProtected": false,
|
|
2746
|
+
"isAbstract": false
|
|
2712
2747
|
},
|
|
2713
2748
|
{
|
|
2714
2749
|
"kind": "Property",
|
|
@@ -2738,7 +2773,8 @@
|
|
|
2738
2773
|
"endIndex": 2
|
|
2739
2774
|
},
|
|
2740
2775
|
"isStatic": false,
|
|
2741
|
-
"isProtected": false
|
|
2776
|
+
"isProtected": false,
|
|
2777
|
+
"isAbstract": false
|
|
2742
2778
|
},
|
|
2743
2779
|
{
|
|
2744
2780
|
"kind": "Property",
|
|
@@ -2768,7 +2804,8 @@
|
|
|
2768
2804
|
"endIndex": 2
|
|
2769
2805
|
},
|
|
2770
2806
|
"isStatic": false,
|
|
2771
|
-
"isProtected": false
|
|
2807
|
+
"isProtected": false,
|
|
2808
|
+
"isAbstract": false
|
|
2772
2809
|
}
|
|
2773
2810
|
],
|
|
2774
2811
|
"implementsTokenRanges": [
|
|
@@ -2799,6 +2836,7 @@
|
|
|
2799
2836
|
],
|
|
2800
2837
|
"fileUrlPath": "types/Context/TelemetryTrace.d.ts",
|
|
2801
2838
|
"releaseTag": "Public",
|
|
2839
|
+
"isAbstract": false,
|
|
2802
2840
|
"name": "TelemetryTrace",
|
|
2803
2841
|
"preserveMemberOrder": false,
|
|
2804
2842
|
"members": [
|
|
@@ -2910,7 +2948,8 @@
|
|
|
2910
2948
|
"endIndex": 2
|
|
2911
2949
|
},
|
|
2912
2950
|
"isStatic": false,
|
|
2913
|
-
"isProtected": false
|
|
2951
|
+
"isProtected": false,
|
|
2952
|
+
"isAbstract": false
|
|
2914
2953
|
},
|
|
2915
2954
|
{
|
|
2916
2955
|
"kind": "Property",
|
|
@@ -2939,7 +2978,8 @@
|
|
|
2939
2978
|
"endIndex": 2
|
|
2940
2979
|
},
|
|
2941
2980
|
"isStatic": false,
|
|
2942
|
-
"isProtected": false
|
|
2981
|
+
"isProtected": false,
|
|
2982
|
+
"isAbstract": false
|
|
2943
2983
|
},
|
|
2944
2984
|
{
|
|
2945
2985
|
"kind": "Property",
|
|
@@ -2968,7 +3008,8 @@
|
|
|
2968
3008
|
"endIndex": 2
|
|
2969
3009
|
},
|
|
2970
3010
|
"isStatic": false,
|
|
2971
|
-
"isProtected": false
|
|
3011
|
+
"isProtected": false,
|
|
3012
|
+
"isAbstract": false
|
|
2972
3013
|
},
|
|
2973
3014
|
{
|
|
2974
3015
|
"kind": "Property",
|
|
@@ -2997,7 +3038,8 @@
|
|
|
2997
3038
|
"endIndex": 2
|
|
2998
3039
|
},
|
|
2999
3040
|
"isStatic": false,
|
|
3000
|
-
"isProtected": false
|
|
3041
|
+
"isProtected": false,
|
|
3042
|
+
"isAbstract": false
|
|
3001
3043
|
},
|
|
3002
3044
|
{
|
|
3003
3045
|
"kind": "Property",
|
|
@@ -3027,7 +3069,8 @@
|
|
|
3027
3069
|
"endIndex": 2
|
|
3028
3070
|
},
|
|
3029
3071
|
"isStatic": false,
|
|
3030
|
-
"isProtected": false
|
|
3072
|
+
"isProtected": false,
|
|
3073
|
+
"isAbstract": false
|
|
3031
3074
|
}
|
|
3032
3075
|
],
|
|
3033
3076
|
"implementsTokenRanges": [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Properties Plugin, 3.0.0-beta.2301-
|
|
2
|
+
* Application Insights JavaScript SDK - Properties Plugin, 3.0.0-beta.2301-14
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -1197,7 +1197,7 @@
|
|
|
1197
1197
|
}
|
|
1198
1198
|
|
|
1199
1199
|
var _objDefineProperty = ObjDefineProperty;
|
|
1200
|
-
var version = "3.0.0-beta.2301-
|
|
1200
|
+
var version = "3.0.0-beta.2301-14";
|
|
1201
1201
|
var instanceName = "." + newId(6);
|
|
1202
1202
|
var _dataUid = 0;
|
|
1203
1203
|
function _createAccessor(target, prop, value) {
|
|
@@ -3226,8 +3226,11 @@
|
|
|
3226
3226
|
var Version = "2.8.5";
|
|
3227
3227
|
var Internal = /** @class */ (function () {
|
|
3228
3228
|
function Internal(config) {
|
|
3229
|
-
var
|
|
3230
|
-
|
|
3229
|
+
var _this = this;
|
|
3230
|
+
onConfigChange((config), function () {
|
|
3231
|
+
var prefix = config.sdkExtension;
|
|
3232
|
+
_this.sdkVersion = (prefix ? prefix + "_" : "") + "javascript:" + Version;
|
|
3233
|
+
});
|
|
3231
3234
|
}
|
|
3232
3235
|
return Internal;
|
|
3233
3236
|
}());
|
|
@@ -3238,12 +3241,12 @@
|
|
|
3238
3241
|
return Location;
|
|
3239
3242
|
}());
|
|
3240
3243
|
|
|
3244
|
+
var _DYN_GET_TRACE_CTX = "getTraceCtx";
|
|
3245
|
+
var _DYN_TELEMETRY_TRACE = "telemetryTrace";
|
|
3241
3246
|
var _DYN_SESSION_MANAGER = "sessionManager";
|
|
3242
3247
|
var _DYN_UPDATE = "update";
|
|
3243
3248
|
var _DYN_IS_USER_COOKIE_SET = "isUserCookieSet";
|
|
3244
3249
|
var _DYN_IS_NEW_USER = "isNewUser";
|
|
3245
|
-
var _DYN_GET_TRACE_CTX = "getTraceCtx";
|
|
3246
|
-
var _DYN_TELEMETRY_TRACE = "telemetryTrace";
|
|
3247
3250
|
var _DYN_APPLY_SESSION_CONTEX0 = "applySessionContext";
|
|
3248
3251
|
var _DYN_APPLY_APPLICATION_CO1 = "applyApplicationContext";
|
|
3249
3252
|
var _DYN_APPLY_DEVICE_CONTEXT = "applyDeviceContext";
|
|
@@ -3280,20 +3283,13 @@
|
|
|
3280
3283
|
var _SessionManager = /** @class */ (function () {
|
|
3281
3284
|
function _SessionManager(config, core) {
|
|
3282
3285
|
var self = this;
|
|
3283
|
-
var _storageNamePrefix;
|
|
3284
3286
|
var _cookieUpdatedTimestamp;
|
|
3285
3287
|
var _logger = safeGetLogger(core);
|
|
3286
3288
|
var _cookieManager = safeGetCookieMgr(core);
|
|
3287
|
-
var _sessionExpirationMs;
|
|
3288
|
-
var _sessionRenewalMs;
|
|
3289
3289
|
dynamicProto(_SessionManager, self, function (_self) {
|
|
3290
3290
|
if (!config) {
|
|
3291
3291
|
config = {};
|
|
3292
3292
|
}
|
|
3293
|
-
_sessionExpirationMs = config.sessionExpirationMs || ACQUISITION_SPAN;
|
|
3294
|
-
_sessionRenewalMs = config.sessionRenewalMs || RENEWAL_SPAN;
|
|
3295
|
-
var sessionCookiePostfix = config.sessionCookiePostfix || config[_DYN_NAME_PREFIX ] || "";
|
|
3296
|
-
_storageNamePrefix = SESSION_COOKIE_NAME + sessionCookiePostfix;
|
|
3297
3293
|
_self[_DYN_AUTOMATIC_SESSION ] = new Session();
|
|
3298
3294
|
_self[_DYN_UPDATE ] = function () {
|
|
3299
3295
|
var nowMs = utcNow();
|
|
@@ -3302,12 +3298,12 @@
|
|
|
3302
3298
|
if (!session.id) {
|
|
3303
3299
|
isExpired = !_initializeAutomaticSession(session);
|
|
3304
3300
|
}
|
|
3305
|
-
if (!isExpired && _sessionExpirationMs > 0) {
|
|
3301
|
+
if (!isExpired && _sessionExpirationMs() > 0) {
|
|
3306
3302
|
var timeSinceAcqMs = nowMs - session[_DYN_ACQUISITION_DATE ];
|
|
3307
3303
|
var timeSinceRenewalMs = nowMs - session[_DYN_RENEWAL_DATE ];
|
|
3308
3304
|
isExpired = timeSinceAcqMs < 0 || timeSinceRenewalMs < 0;
|
|
3309
|
-
isExpired = isExpired || timeSinceAcqMs > _sessionExpirationMs;
|
|
3310
|
-
isExpired = isExpired || timeSinceRenewalMs > _sessionRenewalMs;
|
|
3305
|
+
isExpired = isExpired || timeSinceAcqMs > _sessionExpirationMs();
|
|
3306
|
+
isExpired = isExpired || timeSinceRenewalMs > _sessionRenewalMs();
|
|
3311
3307
|
}
|
|
3312
3308
|
if (isExpired) {
|
|
3313
3309
|
_renew(nowMs);
|
|
@@ -3322,14 +3318,24 @@
|
|
|
3322
3318
|
var session = _self[_DYN_AUTOMATIC_SESSION ];
|
|
3323
3319
|
_setStorage(session.id, session[_DYN_ACQUISITION_DATE ], session[_DYN_RENEWAL_DATE ]);
|
|
3324
3320
|
};
|
|
3321
|
+
function _storageNamePrefix() {
|
|
3322
|
+
var sessionCookiePostfix = config.sessionCookiePostfix || config[_DYN_NAME_PREFIX ] || "";
|
|
3323
|
+
return SESSION_COOKIE_NAME + sessionCookiePostfix;
|
|
3324
|
+
}
|
|
3325
|
+
function _sessionExpirationMs() {
|
|
3326
|
+
return config.sessionExpirationMs || ACQUISITION_SPAN;
|
|
3327
|
+
}
|
|
3328
|
+
function _sessionRenewalMs() {
|
|
3329
|
+
return config.sessionRenewalMs || RENEWAL_SPAN;
|
|
3330
|
+
}
|
|
3325
3331
|
function _initializeAutomaticSession(session, now) {
|
|
3326
3332
|
var isValid = false;
|
|
3327
|
-
var cookieValue = _cookieManager.get(_storageNamePrefix);
|
|
3333
|
+
var cookieValue = _cookieManager.get(_storageNamePrefix());
|
|
3328
3334
|
if (cookieValue && isFunction(cookieValue.split)) {
|
|
3329
3335
|
isValid = _initializeAutomaticSessionWithData(session, cookieValue);
|
|
3330
3336
|
}
|
|
3331
3337
|
else {
|
|
3332
|
-
var storageValue = utlGetLocalStorage(_logger, _storageNamePrefix);
|
|
3338
|
+
var storageValue = utlGetLocalStorage(_logger, _storageNamePrefix());
|
|
3333
3339
|
if (storageValue) {
|
|
3334
3340
|
isValid = _initializeAutomaticSessionWithData(session, storageValue);
|
|
3335
3341
|
}
|
|
@@ -3375,8 +3381,8 @@
|
|
|
3375
3381
|
function _setCookie(session, nowMs) {
|
|
3376
3382
|
var acq = session[_DYN_ACQUISITION_DATE ];
|
|
3377
3383
|
session[_DYN_RENEWAL_DATE ] = nowMs;
|
|
3378
|
-
var renewalPeriodMs = _sessionRenewalMs;
|
|
3379
|
-
var acqTimeLeftMs = (acq + _sessionExpirationMs) - nowMs;
|
|
3384
|
+
var renewalPeriodMs = _sessionRenewalMs();
|
|
3385
|
+
var acqTimeLeftMs = (acq + _sessionExpirationMs()) - nowMs;
|
|
3380
3386
|
var cookie = [session.id, acq, nowMs];
|
|
3381
3387
|
var maxAgeSec = 0;
|
|
3382
3388
|
if (acqTimeLeftMs < renewalPeriodMs) {
|
|
@@ -3386,11 +3392,11 @@
|
|
|
3386
3392
|
maxAgeSec = renewalPeriodMs / 1000;
|
|
3387
3393
|
}
|
|
3388
3394
|
var cookieDomain = config.cookieDomain || null;
|
|
3389
|
-
_cookieManager.set(_storageNamePrefix, cookie[_DYN_JOIN ]("|"), _sessionExpirationMs > 0 ? maxAgeSec : null, cookieDomain);
|
|
3395
|
+
_cookieManager.set(_storageNamePrefix(), cookie[_DYN_JOIN ]("|"), _sessionExpirationMs() > 0 ? maxAgeSec : null, cookieDomain);
|
|
3390
3396
|
_cookieUpdatedTimestamp = nowMs;
|
|
3391
3397
|
}
|
|
3392
3398
|
function _setStorage(guid, acq, renewal) {
|
|
3393
|
-
utlSetLocalStorage(_logger, _storageNamePrefix, [guid, acq, renewal][_DYN_JOIN ]("|"));
|
|
3399
|
+
utlSetLocalStorage(_logger, _storageNamePrefix(), [guid, acq, renewal][_DYN_JOIN ]("|"));
|
|
3394
3400
|
}
|
|
3395
3401
|
});
|
|
3396
3402
|
}
|
|
@@ -3694,6 +3700,14 @@
|
|
|
3694
3700
|
_self.initialize = function (config, core, extensions, pluginChain) {
|
|
3695
3701
|
_base.initialize(config, core, extensions, pluginChain);
|
|
3696
3702
|
_populateDefaults(config);
|
|
3703
|
+
_previousTraceCtx = core[_DYN_GET_TRACE_CTX ](false);
|
|
3704
|
+
_context = new TelemetryContext(core, _extensionConfig, _previousTraceCtx);
|
|
3705
|
+
_distributedTraceCtx = createDistributedTraceContextFromTrace(_self.context[_DYN_TELEMETRY_TRACE ], _previousTraceCtx);
|
|
3706
|
+
core.setTraceCtx(_distributedTraceCtx);
|
|
3707
|
+
_self.context.appId = function () {
|
|
3708
|
+
var breezeChannel = core.getPlugin(BreezeChannelIdentifier);
|
|
3709
|
+
return breezeChannel ? breezeChannel.plugin["_appId"] : null;
|
|
3710
|
+
};
|
|
3697
3711
|
};
|
|
3698
3712
|
_self.processTelemetry = function (event, itemCtx) {
|
|
3699
3713
|
if (!isNullOrUndefined(event)) {
|
|
@@ -3742,14 +3756,6 @@
|
|
|
3742
3756
|
_self._addHook(onConfigChange(config, function () {
|
|
3743
3757
|
var ctx = createProcessTelemetryContext(null, config, core);
|
|
3744
3758
|
_extensionConfig = ctx.getExtCfg(identifier, _defaultConfig);
|
|
3745
|
-
_previousTraceCtx = core[_DYN_GET_TRACE_CTX ](false);
|
|
3746
|
-
_context = new TelemetryContext(core, _extensionConfig, _previousTraceCtx);
|
|
3747
|
-
_distributedTraceCtx = createDistributedTraceContextFromTrace(_self.context[_DYN_TELEMETRY_TRACE ], _previousTraceCtx);
|
|
3748
|
-
core.setTraceCtx(_distributedTraceCtx);
|
|
3749
|
-
_self.context.appId = function () {
|
|
3750
|
-
var breezeChannel = core.getPlugin(BreezeChannelIdentifier);
|
|
3751
|
-
return breezeChannel ? breezeChannel.plugin["_appId"] : null;
|
|
3752
|
-
};
|
|
3753
3759
|
_self["_extConfig"] = _extensionConfig;
|
|
3754
3760
|
}));
|
|
3755
3761
|
}
|