-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
696 lines (566 loc) · 27.7 KB
/
index.js
File metadata and controls
696 lines (566 loc) · 27.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
/**
* Trakerr Client API
* Get your application events and errors to Trakerr via the *Trakerr API*.
*
* OpenAPI spec version: 1.0.0
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['./generated/src/trakerr/index', 'stacktrace-js'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('./generated/src/trakerr/index'), require('stacktrace-js'));
} else {
root.TrakerrClient = factory(root.TrakerrApi, root.StackTrace);
}
}(this, function (TrakerrApi, StackTrace) {
'use strict';
/**
* Create a TrakerrClient instance
* @param apiKey API Key for the application
* @param contextAppVersion (optional) application version, defaults to 1.0
* @param contextEnvName (optional) environment name like "development", "staging", "production" or a custom string
* @param contextAppSKU (optional) String representation of the application sku
* @param contextTags (optional) An Array.<String> that represent tags about your module. We recommend module and submodule to start with (ie database, mongo)
* @module index
* @version 1.0.2
*/
var exports = function TrakerrClient(apiKey,
contextAppVersion,
contextDeploymentStage, contextAppSKU, contextTags) {
var _this = this;
_this.apiKey = apiKey;
_this.contextAppVersion = contextAppVersion ? contextAppVersion : '1.0';
_this.contextDeploymentStage = contextDeploymentStage ? contextDeploymentStage : 'development';
_this.contextEnvLanguage = "JavaScript";
_this.contextEnvName = "JavaScript/Node";
if (typeof navigator !== 'undefined') {
//from http://stackoverflow.com/questions/9514179/how-to-find-the-operating-system-version-using-javascript
// browser
var nVer = navigator.appVersion;
var nAgt = navigator.userAgent;
var browser = navigator.appName;
var version = '' + parseFloat(navigator.appVersion);
var majorVersion = parseInt(navigator.appVersion, 10);
var nameOffset, verOffset, ix;
// Opera
if ((verOffset = nAgt.indexOf('Opera')) != -1) {
browser = 'Opera';
version = nAgt.substring(verOffset + 6);
if ((verOffset = nAgt.indexOf('Version')) != -1) {
version = nAgt.substring(verOffset + 8);
}
}
// Opera Next
else if ((verOffset = nAgt.indexOf('OPR')) != -1) {
browser = 'Opera';
version = nAgt.substring(verOffset + 4);
}
// Edge
else if ((verOffset = nAgt.indexOf('Edge')) != -1) {
browser = 'Microsoft Edge';
version = nAgt.substring(verOffset + 5);
}
// MSIE
else if ((verOffset = nAgt.indexOf('MSIE')) != -1) {
browser = 'Microsoft Internet Explorer';
version = nAgt.substring(verOffset + 5);
}
//IE 11 no longer identifies itself as MS IE, so trap it
//http://stackoverflow.com/questions/17907445/how-to-detect-ie11
else if ((browser == 'Netscape') && (nAgt.indexOf('Trident/') != -1)) {
browser = 'Microsoft Internet Explorer';
version = nAgt.substring(verOffset + 5);
if ((verOffset = nAgt.indexOf('rv:')) != -1) {
version = nAgt.substring(verOffset + 3);
}
}
// Chrome
else if ((verOffset = nAgt.indexOf('Chrome')) != -1) {
browser = 'Chrome';
version = nAgt.substring(verOffset + 7);
}
// Safari
else if ((verOffset = nAgt.indexOf('Safari')) != -1) {
browser = 'Safari';
version = nAgt.substring(verOffset + 7);
if ((verOffset = nAgt.indexOf('Version')) != -1) {
version = nAgt.substring(verOffset + 8);
}
// Chrome on iPad identifies itself as Safari. Actual results do not match what Google claims
// at: https://developers.google.com/chrome/mobile/docs/user-agent?hl=ja
// No mention of chrome in the user agent string. However it does mention CriOS, which presumably
// can be keyed on to detect it.
if ((verOffset = nAgt.indexOf('CriOS')) != -1) {
//Chrome on iPad spoofing Safari...correct it.
browser = 'Chrome';
version = nAgt.substring(verOffset + 6);//should get the criOS ver.
}
}
// Firefox
else if ((verOffset = nAgt.indexOf('Firefox')) != -1) {
browser = 'Firefox';
version = nAgt.substring(verOffset + 8);
}
// MSIE 11+
else if (nAgt.indexOf('Trident/') != -1) {
browser = 'Microsoft Internet Explorer';
version = nAgt.substring(nAgt.indexOf('rv:') + 3);
}
// Other browsers
else if ((nameOffset = nAgt.lastIndexOf(' ') + 1) < (verOffset = nAgt.lastIndexOf('/'))) {
browser = 'Other';
version = 'Unknown';
if (browser.toLowerCase() == browser.toUpperCase()) {
browser = navigator.appName;
}
}
// trim the version string
if ((ix = version.indexOf(';')) != -1) version = version.substring(0, ix);
if ((ix = version.indexOf(' ')) != -1) version = version.substring(0, ix);
if ((ix = version.indexOf(')')) != -1) version = version.substring(0, ix);
majorVersion = parseInt('' + version, 10);
if (isNaN(majorVersion)) {
version = '' + parseFloat(navigator.appVersion);
majorVersion = parseInt(navigator.appVersion, 10);
}
// mobile version
var mobile = /Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(nVer);
// cookie
var cookieEnabled = (navigator.cookieEnabled) ? true : false;
if (typeof navigator.cookieEnabled == 'undefined' && !cookieEnabled) {
document.cookie = 'testcookie';
cookieEnabled = (document.cookie.indexOf('testcookie') != -1) ? true : false;
}
// system
var os = undefined;
var clientStrings = [
{ s: 'Windows 10', r: /(Windows 10.0|Windows NT 10.0)/ },
{ s: 'Windows 8.1', r: /(Windows 8.1|Windows NT 6.3)/ },
{ s: 'Windows 8', r: /(Windows 8|Windows NT 6.2)/ },
{ s: 'Windows 7', r: /(Windows 7|Windows NT 6.1)/ },
{ s: 'Windows Vista', r: /Windows NT 6.0/ },
{ s: 'Windows Server 2003', r: /Windows NT 5.2/ },
{ s: 'Windows XP', r: /(Windows NT 5.1|Windows XP)/ },
{ s: 'Windows 2000', r: /(Windows NT 5.0|Windows 2000)/ },
{ s: 'Windows ME', r: /(Win 9x 4.90|Windows ME)/ },
{ s: 'Windows 98', r: /(Windows 98|Win98)/ },
{ s: 'Windows 95', r: /(Windows 95|Win95|Windows_95)/ },
{ s: 'Windows NT 4.0', r: /(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/ },
{ s: 'Windows CE', r: /Windows CE/ },
{ s: 'Windows 3.11', r: /Win16/ },
{ s: 'Android', r: /Android/ },
{ s: 'Open BSD', r: /OpenBSD/ },
{ s: 'Sun OS', r: /SunOS/ },
{ s: 'Linux', r: /(Linux|X11)/ },
{ s: 'iOS', r: /(iPhone|iPad|iPod)/ },
{ s: 'Mac OS X', r: /Mac OS X/ },
{ s: 'Mac OS', r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/ },
{ s: 'QNX', r: /QNX/ },
{ s: 'UNIX', r: /UNIX/ },
{ s: 'BeOS', r: /BeOS/ },
{ s: 'OS/2', r: /OS\/2/ },
{ s: 'Search Bot', r: /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/ }
];
for (var id in clientStrings) {
var cs = clientStrings[id];
if (cs.r.test(nAgt)) {
os = cs.s;
break;
}
}
var osVersion = undefined;
if (/Windows/.test(os)) {
osVersion = /Windows (.*)/.exec(os)[1];
}
switch (os) {
case 'Mac OS X':
osVersion = /Mac OS X (10[\.\_\d]+)/.exec(nAgt)[1];
break;
case 'Android':
osVersion = /Android ([\.\_\d]+)/.exec(nAgt)[1];
break;
case 'iOS':
osVersion = /OS (\d+)_(\d+)_?(\d+)?/.exec(nVer);
osVersion = osVersion[1] + '.' + osVersion[2] + '.' + (osVersion[3] | 0);
break;
case 'Linux':
if (/ubuntu/i.test(nAgt)) {
ubuntuver = /(ubuntu) (\d+\.\d+)/.exec(nAgt)
if (ubuntuver === null) {
ubuntuver = /(ubuntu)\/(\d+\.\d+)/i.exec(nAgt)
}
osVersion = ubuntuver[1] + ' ' + ubuntuver[2]
}
if (/centos/i.test(nAgt)) {
centver = /(centos)\/([\w.]+)/i.exec(nAgt)
if (centver !== null) {
osVersion = centver[1] + ' ' + centver[2]
}
}
break;
}
//document.getElementById("outputhook").innerHTML = "I'm a browser!"; Debug statement. Commented out for hotfix
_this.contextEnvVersion = 'Browser';
_this.contextAppOS = os;
_this.contextAppOSVersion = osVersion.replace(/_/g, '.');
_this.contextAppBrowser = browser;
_this.contextAppBrowserVersion = version;
} else {
try {
var os = require('os');
_this.opsys = os
if (typeof os !== 'undefined') {
_this.contextAppOS = os.platform();
_this.contextAppOSVersion = os.release();
_this.contextEnvHostname = os.hostname();
_this.firstCpuTimes = getCPUS(os);
}
} catch (err) {
//ignored
}
}
_this.contextEnvVersion = titleCase(_this.contextEnvVersion);
_this.contextAppOS = titleCase(_this.contextAppOS);
_this.contextAppOSVersion = titleCase(_this.contextAppOSVersion);
_this.contextAppBrowser = titleCase(_this.contextAppBrowser);
_this.contextAppBrowserVersion = titleCase(_this.contextAppBrowserVersion);
var apiClient = new TrakerrApi.ApiClient();
_this.eventsApi = new TrakerrApi.EventsApi(apiClient);
/**
* Takes the AppEvent and if a field is undefined, fills it with the trakerrclient default.
* @param {AppEvent} appEvent An AppEvent instance to fill.
* @returns Filled AppEvent Instance.
*/
function fillDefaults(appEvent) {
if (typeof appEvent.apiKey === 'undefined') appEvent.apiKey = _this.apiKey;
if (typeof appEvent.contextAppVersion === 'undefined') appEvent.contextAppVersion = _this.contextAppVersion;
if (typeof appEvent.deploymentStage === 'undefined') appEvent.deploymentStage = _this.contextDeploymentStage;
if (typeof appEvent.contextEnvLanguage === 'undefined') appEvent.contextEnvLanguage = _this.contextEnvLanguage;
if (typeof appEvent.contextEnvName === 'undefined') appEvent.contextEnvName = _this.contextEnvName;
if (typeof appEvent.contextEnvVersion === 'undefined') appEvent.contextEnvVersion = _this.contextEnvVersion;
if (typeof appEvent.contextEnvHostname === 'undefined') appEvent.contextEnvHostname = _this.contextEnvHostname;
if (typeof appEvent.contextAppOS === 'undefined') {
appEvent.contextAppOS = _this.contextAppOS;
appEvent.contextAppOSVersion = _this.contextAppOSVersion;
}
if (typeof appEvent.contextAppBrowser === 'undefined') {
appEvent.contextAppBrowser = _this.contextAppBrowser;
appEvent.contextAppBrowserVersion = _this.contextAppBrowserVersion;
}
if (typeof appEvent.contextDataCenter === 'undefined') appEvent.contextDataCenter = _this.contextDataCenter;
if (typeof appEvent.contextDataCenterRegion === 'undefined') appEvent.contextDataCenterRegion = _this.contextDataCenterRegion;
if (typeof appEvent.eventTime === 'undefined') appEvent.eventTime = (new Date()).getTime();
if (typeof _this.opsys !== 'undefined') {
if (typeof appEvent.contextCpuPercentage === 'undefined') {
appEvent.contextCpuPercentage = Math.round(totalCPU());
}
if(typeof appEvent.contextMemoryPercentage === 'undefined'){
appEvent.contextMemoryPercentage = Math.round(((_this.opsys.totalmem() - _this.opsys.freemem())/_this.opsys.totalmem()) * 100);
}
}
else{
appEvent.contextURL = window.location.href;
}
if (typeof appEvent.contextTags === 'undefined') appEvent.contextTags = _this.contextTags;
if (typeof appEvent.contextAppSKU === 'undefined') appEvent.contextAppSKU = _this.contextAppSKU;
return appEvent;
}
/**
* Gets the error information and seralizes the stacktrace to sent to trakerr
* @param {object} error Error captured.
* @param {string} logLevel String representation of the level.
* @param {string} classification optional extra error string
* @param {stackframe[]} stackFrames Stackframes to parse.
* @return New AppEvent instance.
*/
function fillStacktrace(error, logLevel, classification, stackFrames) {
var type = (typeof error === 'object') ? error.constructor.name : (typeof error).toString();
var newEvent = _this.createAppEvent(logLevel ? logLevel : "Error", classification ? classification : "issue", type, error.toString());
newEvent.eventStacktrace = new TrakerrApi.Stacktrace();
var innerTrace = new TrakerrApi.InnerStackTrace();
innerTrace.type = type;
innerTrace.message = error instanceof Error ? error.message : error.toString();
innerTrace.traceLines = new TrakerrApi.StackTraceLines();
for (var i in stackFrames) {
var traceLine = new TrakerrApi.StackTraceLine();
traceLine.function = stackFrames[i].functionName;
traceLine.file = stackFrames[i].fileName;
traceLine.line = stackFrames[i].lineNumber + ":" + stackFrames[i].columnNumber;
Array.prototype.push.call(innerTrace.traceLines, traceLine);
}
Array.prototype.push.call(newEvent.eventStacktrace, innerTrace);
return newEvent;
}
/**
* Takes a captured error and sends it.
* @param {*} err Error that has been triggered.
* @param {*} classification string representation on the level of the error.
* @param {*} shouldDie boolean on if the program should crash after handling.
* @param {*} callbackFn callback function for sendEvent. Falsy value if you don't need it.
*/
function sendEventFromError(err, logLevel, classification, shouldDie, callbackFn) {
StackTrace
.fromError(err)
.then(function (stackFrames) {
var newEvent = fillStacktrace(err, logLevel, classification, stackFrames);
if (typeof callbackFn !== 'undefined' && callbackFn !== null) {
callbackFn(newEvent);
}
_this.sendEvent(newEvent, function (error, data, response) {
if (error) {
console.error('Error Response: ' + error + ', data = ' + data + ', response = ' + JSON.stringify(response));
} /*else {
console.log('Response: data = ' + data + ', response = ' + JSON.stringify(response));
}*/
if (shouldDie) {
process.exit(1);
}
});
})
.catch(function (err) {
console.error("Error: " + err);
if (shouldDie) {
process.exit(1);
}
});
}
function getCPUS() {
//From http://stackoverflow.com/questions/39516931/how-to-get-cpu-usage-in-javascript
//And https://gist.github.com/bag-man/5570809
//Initialise sum of idle and time of cores and fetch CPU info
var totalIdle = 0, totalTick = 0;
var cpus = _this.opsys.cpus();
//Loop through CPU cores
for (var i = 0, len = cpus.length; i < len; i++) {
//Select CPU core
var cpu = cpus[i];
//Total up the time in the cores tick
for (var stats in cpu.times) {
totalTick += cpu.times[stats];
}
//Total up the idle time of the core
totalIdle += cpu.times.idle;
}
//Return the average Idle and Tick times
return { idle: totalIdle / cpus.length, total: totalTick / cpus.length };
}
function totalCPU() {
//Grab second Measure
var endCPUtimes = getCPUS();
//Calculate the difference in idle and total time between the measures
var idleDifference = endCPUtimes - _this.firstCpuTimes.idle;
var totalDifference = endCPUtimes - _this.firstCpuTimes.total;
//Calculate the average percentage CPU usage
var percentageCPU = 100 - ~~(100 * idleDifference / totalDifference);
_this.firstCpuTimes = endCPUtimes;
//Output result to console
return percentageCPU;
}
function titleCase(str) {
return str == null? null : str.split(' ').map(function (val) {
return val.charAt(0).toUpperCase() + val.substr(1).toLowerCase();
}).join(' ');
}
/**
* Setup global exception handling
*
* @param shouldDie should the process exit on error (applicable to node or other environments, ignored if in browser)
*/
TrakerrClient.prototype.handleExceptions = function (shouldDie) {
if (typeof window !== 'undefined') {
window.onerror = function (msg, file, line, col, error) {
var string = msg.toLowerCase();
var substring = "script error";
if (string.indexOf(substring) > -1) {
console.error('Script Error: Script error encountered, see browser console for more.');
} else {
sendEventFromError(error, "Error", "issue", false);
}
}
} else if (typeof process !== 'undefined') {
shouldDie = (typeof shouldDie === 'undefined') ? true : shouldDie;
process.on('uncaughtException', function (err) {
sendEventFromError(err, "Error", "issue", shouldDie);
});
}
};
/**
* Constructs a new {model:AppEvent}
*
* @param classification classification like "Error", "Debug", "Warning" or "Info" or a custom string
* @param eventType event type
* @param eventMessage event message
* @returns app event
*/
TrakerrClient.prototype.createAppEvent = function (logLevel, classification, eventType, eventMessage) {
var _this = this;
if (!logLevel) logLevel = 'Error';
if (!classification) classification = "issue";
if (!eventType) eventType = 'unknown';
if (!eventMessage) eventMessage = 'unknown';
var appevent = new TrakerrApi.AppEvent(_this.apiKey, logLevel, classification, eventType, eventMessage);
return fillDefaults(appevent);
};
/**
* Send err to Trackerr with optional callback to populate custom properties
*
* @param err the error to send
* @param {string} logLevel classification like "Error", "Debug", "Warning" or "Info" or a custom string
* @param {string} classification (optional) error descriptor string on what the specific error is under it's type
* @param {function} callbackFn (optional) callback function that is called with one parameter i.e. the event, so other properties can be populated before the event is sent
*/
TrakerrClient.prototype.sendError = function (err, logLevel, classification, callbackFn) {
sendEventFromError(err, logLevel, classification, false, callbackFn);
};
/**
* Send event to Trakerr
*
* @param appEvent the event to send constructed using {createAppEvent}
* @param callback the callback accepting the following parameters: error, data, response
*/
TrakerrClient.prototype.sendEvent = function (appEvent, callback) {
var _this = this;
return _this.eventsApi.eventsPost(fillDefaults(appEvent), callback);
};
//accessors
TrakerrClient.prototype.get_ApiKey = function () {
var _this = this;
return _this.apiKey;
};
TrakerrClient.prototype.set_ApiKey = function (apikey) {
var _this = this;
_this.apiKey = apikey;
};
TrakerrClient.prototype.get_contextAppVersion = function () {
var _this = this;
return _this.contextAppVersion;
};
TrakerrClient.prototype.set_contextAppVersion = function (contextappversion) {
var _this = this;
_this.contextAppVersion = contextappversion;
};
TrakerrClient.prototype.get_contextDeploymentStage = function () {
var _this = this;
return _this.contextDeploymentStage;
};
TrakerrClient.prototype.set_contextDeploymentStage = function (contextdeploymentstage) {
var _this = this;
_this.contextDeploymentStage = contextdeploymentstage;
};
TrakerrClient.prototype.get_contextEnvLanguage = function () {
var _this = this;
return _this.contextEnvLanguage;
};
TrakerrClient.prototype.set_contextEnvLanguage = function (contextenvlanguage) {
var _this = this;
_this.contextEnvLanguage = contextenvlanguage;
};
TrakerrClient.prototype.get_contextEnvName = function () {
var _this = this;
return _this.contextEnvName;
};
TrakerrClient.prototype.set_contextEnvName = function (contextenvname) {
var _this = this;
_this.contextEnvName = contextenvname;
};
TrakerrClient.prototype.get_contextEnvVersion = function () {
var _this = this;
return _this.contextEnvVersion;
};
TrakerrClient.prototype.set_contextEnvVersion = function (contextenvversion) {
var _this = this;
_this.contextEnvVersion = contextenvversion;
};
TrakerrClient.prototype.get_contextEnvHostname = function () {
var _this = this;
return _this.contextEnvHostname;
};
TrakerrClient.prototype.set_contextEnvHostname = function (contextenvhostname) {
var _this = this;
_this.contextEnvHostname = contextenvhostname;
};
TrakerrClient.prototype.get_contextAppOS = function () {
var _this = this;
return _this.contextAppOS;
};
TrakerrClient.prototype.set_contextAppOS = function (contextappos) {
var _this = this;
_this.contextAppOS = contextappos;
};
TrakerrClient.prototype.get_contextAppOSVersion = function () {
var _this = this;
return _this.contextAppOSVersion;
};
TrakerrClient.prototype.set_contextAppOSVersion = function (contextapposversion) {
var _this = this;
_this.contextAppOSVersion = contextapposversion;
};
TrakerrClient.prototype.get_contextAppBrowser = function () {
var _this = this;
return _this.contextAppBrowser;
};
TrakerrClient.prototype.set_contextAppBrowser = function (contextappbrowser) {
var _this = this;
_this.contextAppBrowser = contextappbrowser;
};
TrakerrClient.prototype.get_contextAppBrowserVersion = function () {
var _this = this;
return _this.contextAppBrowserVersion;
};
TrakerrClient.prototype.set_contextAppBrowserVersion = function (contextappbrowserversion) {
var _this = this;
_this.contextAppBrowserVersion = contextappbrowserversion;
};
TrakerrClient.prototype.get_contextDataCenter = function () {
var _this = this;
return _this.contextDataCenter;
};
TrakerrClient.prototype.set_contextDataCenter = function (contextdatacenter) {
var _this = this;
_this.contextDataCenter = contextdatacenter;
};
TrakerrClient.prototype.get_contextDataCenterRegion = function () {
var _this = this;
return _this.contextDataCenter;
};
TrakerrClient.prototype.set_contextDataCenterRegion = function (contextdatacenterregion) {
var _this = this;
_this.contextDataCenterRegion = contextdatacenterregion;
};
TrakerrClient.prototype.get_contextTags = function () {
var _this = this;
return _this.contextTags;
};
TrakerrClient.prototype.set_contextTags = function (contexttags) {
var _this = this;
_this.contextTags = contexttags;
};
TrakerrClient.prototype.get_contextAppSKU = function () {
var _this = this;
return _this.contextAppSKU;
};
TrakerrClient.prototype.set_contextAppSKU = function (contextappsku) {
var _this = this;
_this.contextAppSKU = contextappsku;
};
};
return exports;
}));