/
Internal.ts
42 lines (34 loc) · 1.2 KB
/
Internal.ts
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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { IInternal } from '@microsoft/applicationinsights-common';
import { ITelemetryConfig } from '../Interfaces/ITelemetryConfig';
const Version = "2.5.5";
export class Internal implements IInternal {
/**
* The SDK version used to create this telemetry item.
*/
public sdkVersion: string;
/**
* The SDK agent version.
*/
public agentVersion: string;
/**
* The Snippet version used to initialize the sdk instance, this will contain either
* undefined/null - Snippet not used
* '-' - Version and legacy mode not determined
* # - Version # of the snippet
* #.l - Version # in legacy mode
* .l - No defined version, but used legacy mode initialization
*/
public snippetVer: string;
/**
* Identifies the source of the sdk script
*/
public sdkSrc: string;
/**
* Constructs a new instance of the internal telemetry data class.
*/
constructor(config: ITelemetryConfig) {
this.sdkVersion = (config.sdkExtension && config.sdkExtension() ? config.sdkExtension() + "_" : "") + "javascript:" + Version;
}
}