@opentelemetry/opentelemetry-browser-detector 0.301.2 → 0.302.0
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/README.md +4 -1
- package/dist/BrowserDetector.cjs +4 -2
- package/dist/BrowserDetector.cjs.map +1 -1
- package/dist/BrowserDetector.d.cts +5 -4
- package/dist/BrowserDetector.d.cts.map +1 -1
- package/dist/BrowserDetector.d.mts +5 -4
- package/dist/BrowserDetector.d.mts.map +1 -1
- package/dist/BrowserDetector.mjs +4 -2
- package/dist/BrowserDetector.mjs.map +1 -1
- package/dist/index.mjs +1 -2
- package/dist/semconv.cjs +1 -2
- package/dist/semconv.mjs +1 -2
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# OpenTelemetry Browser Detector
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> `@opentelemetry/opentelemetry-browser-detector` is deprecated.
|
|
5
|
+
> Vendors and users should plan moving to [the browser detector being developed in the opentelemetry-browser repository](https://github.com/open-telemetry/opentelemetry-browser/tree/main/packages/sdk#browser-resource-detection),
|
|
6
|
+
> specifically `@opentelemetry/browser-sdk/browser-detector`.
|
|
4
7
|
|
|
5
8
|
This module provides detector for browser environments
|
|
6
9
|
|
package/dist/BrowserDetector.cjs
CHANGED
|
@@ -2,7 +2,7 @@ const require_semconv = require("./semconv.cjs");
|
|
|
2
2
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
3
3
|
let _opentelemetry_resources = require("@opentelemetry/resources");
|
|
4
4
|
let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
5
|
-
|
|
5
|
+
// src/BrowserDetector.ts
|
|
6
6
|
/**
|
|
7
7
|
* BrowserDetector will be used to detect the resources related to browser.
|
|
8
8
|
*/
|
|
@@ -38,8 +38,10 @@ function getBrowserAttributes() {
|
|
|
38
38
|
browserAttribs[require_semconv.ATTR_BROWSER_LANGUAGE] = navigator.language;
|
|
39
39
|
return browserAttribs;
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated See https://github.com/open-telemetry/opentelemetry-browser/tree/main/packages/sdk#browser-resource-detection
|
|
43
|
+
*/
|
|
41
44
|
const browserDetector = new BrowserDetector();
|
|
42
|
-
//#endregion
|
|
43
45
|
exports.browserDetector = browserDetector;
|
|
44
46
|
|
|
45
47
|
//# sourceMappingURL=BrowserDetector.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserDetector.cjs","names":["emptyResource","ATTR_USER_AGENT_ORIGINAL","ATTR_BROWSER_PLATFORM","ATTR_BROWSER_BRANDS","ATTR_BROWSER_MOBILE","ATTR_BROWSER_LANGUAGE"],"sources":["../src/BrowserDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport type {\n DetectedResource,\n ResourceDetector,\n ResourceDetectionConfig,\n} from '@opentelemetry/resources';\nimport { emptyResource } from '@opentelemetry/resources';\nimport { ATTR_USER_AGENT_ORIGINAL } from '@opentelemetry/semantic-conventions';\nimport type { UserAgentData } from './types';\nimport {\n ATTR_BROWSER_LANGUAGE,\n ATTR_BROWSER_PLATFORM,\n ATTR_BROWSER_BRANDS,\n ATTR_BROWSER_MOBILE,\n} from './semconv';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements ResourceDetector {\n detect(config?: ResourceDetectionConfig): DetectedResource {\n const isBrowser =\n typeof window !== 'undefined' && typeof document !== 'undefined';\n\n if (!isBrowser) {\n return emptyResource();\n }\n const browserResource: Attributes = getBrowserAttributes();\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates browser resource attribute map from browser variables\n *\n * @param browserResource The un-sanitized resource attributes from browser as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: Attributes,\n _config?: ResourceDetectionConfig\n ): DetectedResource {\n if (\n !browserResource[ATTR_USER_AGENT_ORIGINAL] &&\n !browserResource[ATTR_BROWSER_PLATFORM]\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return emptyResource();\n } else {\n return { attributes: browserResource };\n }\n }\n}\n\n// Add Browser related attributes to resources\nfunction getBrowserAttributes(): Attributes {\n const browserAttribs: Attributes = {};\n const userAgentData = (\n navigator as Navigator & { userAgentData?: UserAgentData }\n ).userAgentData;\n if (userAgentData) {\n browserAttribs[ATTR_BROWSER_PLATFORM] = userAgentData.platform;\n browserAttribs[ATTR_BROWSER_BRANDS] = userAgentData.brands.map(\n b => `${b.brand} ${b.version}`\n );\n browserAttribs[ATTR_BROWSER_MOBILE] = userAgentData.mobile;\n }\n browserAttribs[ATTR_USER_AGENT_ORIGINAL] = navigator.userAgent;\n browserAttribs[ATTR_BROWSER_LANGUAGE] = navigator.language;\n return browserAttribs;\n}\n\nexport const browserDetector = new BrowserDetector();\n"],"mappings":";;;;;;;;AAyBA,IAAM,kBAAN,MAAkD;CAChD,OAAO,QAAoD;EAIzD,IAAI,EAFF,OAAO,WAAW,eAAe,OAAO,aAAa,cAGrD,QAAA,GAAOA,yBAAAA,cAAAA,CAAc;EAEvB,MAAM,kBAA8B,qBAAqB;EACzD,OAAO,KAAK,uBAAuB,iBAAiB,MAAM;CAC5D;;;;;;;;
|
|
1
|
+
{"version":3,"file":"BrowserDetector.cjs","names":["emptyResource","ATTR_USER_AGENT_ORIGINAL","diag","ATTR_BROWSER_PLATFORM","ATTR_BROWSER_BRANDS","ATTR_BROWSER_MOBILE","ATTR_BROWSER_LANGUAGE"],"sources":["../src/BrowserDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport type {\n DetectedResource,\n ResourceDetector,\n ResourceDetectionConfig,\n} from '@opentelemetry/resources';\nimport { emptyResource } from '@opentelemetry/resources';\nimport { ATTR_USER_AGENT_ORIGINAL } from '@opentelemetry/semantic-conventions';\nimport type { UserAgentData } from './types';\nimport {\n ATTR_BROWSER_LANGUAGE,\n ATTR_BROWSER_PLATFORM,\n ATTR_BROWSER_BRANDS,\n ATTR_BROWSER_MOBILE,\n} from './semconv';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements ResourceDetector {\n detect(config?: ResourceDetectionConfig): DetectedResource {\n const isBrowser =\n typeof window !== 'undefined' && typeof document !== 'undefined';\n\n if (!isBrowser) {\n return emptyResource();\n }\n const browserResource: Attributes = getBrowserAttributes();\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates browser resource attribute map from browser variables\n *\n * @param browserResource The un-sanitized resource attributes from browser as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: Attributes,\n _config?: ResourceDetectionConfig\n ): DetectedResource {\n if (\n !browserResource[ATTR_USER_AGENT_ORIGINAL] &&\n !browserResource[ATTR_BROWSER_PLATFORM]\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return emptyResource();\n } else {\n return { attributes: browserResource };\n }\n }\n}\n\n// Add Browser related attributes to resources\nfunction getBrowserAttributes(): Attributes {\n const browserAttribs: Attributes = {};\n const userAgentData = (\n navigator as Navigator & { userAgentData?: UserAgentData }\n ).userAgentData;\n if (userAgentData) {\n browserAttribs[ATTR_BROWSER_PLATFORM] = userAgentData.platform;\n browserAttribs[ATTR_BROWSER_BRANDS] = userAgentData.brands.map(\n b => `${b.brand} ${b.version}`\n );\n browserAttribs[ATTR_BROWSER_MOBILE] = userAgentData.mobile;\n }\n browserAttribs[ATTR_USER_AGENT_ORIGINAL] = navigator.userAgent;\n browserAttribs[ATTR_BROWSER_LANGUAGE] = navigator.language;\n return browserAttribs;\n}\n\n/**\n * @deprecated See https://github.com/open-telemetry/opentelemetry-browser/tree/main/packages/sdk#browser-resource-detection\n */\nexport const browserDetector = new BrowserDetector();\n"],"mappings":";;;;;;;;AAyBA,IAAM,kBAAN,MAAkD;CAChD,OAAO,QAAoD;EAIzD,IAAI,EAFF,OAAO,WAAW,eAAe,OAAO,aAAa,cAGrD,QAAA,GAAOA,yBAAAA,cAAAA,CAAc;EAEvB,MAAM,kBAA8B,qBAAqB;EACzD,OAAO,KAAK,uBAAuB,iBAAiB,MAAM;CAC5D;;;;;;;;CAQQ,uBACN,iBACA,SACkB;EAClB,IACE,CAAC,gBAAgBC,oCAAAA,6BACjB,CAAC,gBAAA,qBACD;GACAC,mBAAAA,KAAK,MACH,qEACF;GACA,QAAA,GAAOF,yBAAAA,cAAAA,CAAc;EACvB,OACE,OAAO,EAAE,YAAY,gBAAgB;CAEzC;AACF;AAGA,SAAS,uBAAmC;CAC1C,MAAM,iBAA6B,CAAC;CACpC,MAAM,gBACJ,UACA;CACF,IAAI,eAAe;EACjB,eAAeG,gBAAAA,yBAAyB,cAAc;EACtD,eAAeC,gBAAAA,uBAAuB,cAAc,OAAO,KACzD,MAAK,GAAG,EAAE,MAAM,GAAG,EAAE,SACvB;EACA,eAAeC,gBAAAA,uBAAuB,cAAc;CACtD;CACA,eAAeJ,oCAAAA,4BAA4B,UAAU;CACrD,eAAeK,gBAAAA,yBAAyB,UAAU;CAClD,OAAO;AACT;;;;AAKA,MAAa,kBAAkB,IAAI,gBAAgB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DetectedResource, ResourceDetectionConfig, ResourceDetector } from "@opentelemetry/resources";
|
|
2
|
-
//#region src/BrowserDetector.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* BrowserDetector will be used to detect the resources related to browser.
|
|
5
4
|
*/
|
|
@@ -14,7 +13,9 @@ declare class BrowserDetector implements ResourceDetector {
|
|
|
14
13
|
*/
|
|
15
14
|
private _getResourceAttributes;
|
|
16
15
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated See https://github.com/open-telemetry/opentelemetry-browser/tree/main/packages/sdk#browser-resource-detection
|
|
18
|
+
*/
|
|
19
|
+
export declare const browserDetector: BrowserDetector;
|
|
20
|
+
export {};
|
|
20
21
|
//# sourceMappingURL=BrowserDetector.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserDetector.d.cts","names":[],"sources":["../src/BrowserDetector.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BrowserDetector.d.cts","names":[],"sources":["../src/BrowserDetector.d.ts"],"mappings":";;;;cAIc,2BAA2B;EACrC,OAAO,SAAS,0BAA0B;;;;;;;;UAQlC;;;;;qBAKS,iBAAiB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DetectedResource, ResourceDetectionConfig, ResourceDetector } from "@opentelemetry/resources";
|
|
2
|
-
//#region src/BrowserDetector.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* BrowserDetector will be used to detect the resources related to browser.
|
|
5
4
|
*/
|
|
@@ -14,7 +13,9 @@ declare class BrowserDetector implements ResourceDetector {
|
|
|
14
13
|
*/
|
|
15
14
|
private _getResourceAttributes;
|
|
16
15
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated See https://github.com/open-telemetry/opentelemetry-browser/tree/main/packages/sdk#browser-resource-detection
|
|
18
|
+
*/
|
|
19
|
+
export declare const browserDetector: BrowserDetector;
|
|
20
|
+
export {};
|
|
20
21
|
//# sourceMappingURL=BrowserDetector.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserDetector.d.mts","names":[],"sources":["../src/BrowserDetector.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BrowserDetector.d.mts","names":[],"sources":["../src/BrowserDetector.d.ts"],"mappings":";;;;cAIc,2BAA2B;EACrC,OAAO,SAAS,0BAA0B;;;;;;;;UAQlC;;;;;qBAKS,iBAAiB"}
|
package/dist/BrowserDetector.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { ATTR_BROWSER_BRANDS, ATTR_BROWSER_LANGUAGE, ATTR_BROWSER_MOBILE, ATTR_B
|
|
|
2
2
|
import { diag } from "@opentelemetry/api";
|
|
3
3
|
import { emptyResource } from "@opentelemetry/resources";
|
|
4
4
|
import { ATTR_USER_AGENT_ORIGINAL } from "@opentelemetry/semantic-conventions";
|
|
5
|
-
|
|
5
|
+
// src/BrowserDetector.ts
|
|
6
6
|
/**
|
|
7
7
|
* BrowserDetector will be used to detect the resources related to browser.
|
|
8
8
|
*/
|
|
@@ -38,8 +38,10 @@ function getBrowserAttributes() {
|
|
|
38
38
|
browserAttribs[ATTR_BROWSER_LANGUAGE] = navigator.language;
|
|
39
39
|
return browserAttribs;
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated See https://github.com/open-telemetry/opentelemetry-browser/tree/main/packages/sdk#browser-resource-detection
|
|
43
|
+
*/
|
|
41
44
|
const browserDetector = new BrowserDetector();
|
|
42
|
-
//#endregion
|
|
43
45
|
export { browserDetector };
|
|
44
46
|
|
|
45
47
|
//# sourceMappingURL=BrowserDetector.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserDetector.mjs","names":[],"sources":["../src/BrowserDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport type {\n DetectedResource,\n ResourceDetector,\n ResourceDetectionConfig,\n} from '@opentelemetry/resources';\nimport { emptyResource } from '@opentelemetry/resources';\nimport { ATTR_USER_AGENT_ORIGINAL } from '@opentelemetry/semantic-conventions';\nimport type { UserAgentData } from './types';\nimport {\n ATTR_BROWSER_LANGUAGE,\n ATTR_BROWSER_PLATFORM,\n ATTR_BROWSER_BRANDS,\n ATTR_BROWSER_MOBILE,\n} from './semconv';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements ResourceDetector {\n detect(config?: ResourceDetectionConfig): DetectedResource {\n const isBrowser =\n typeof window !== 'undefined' && typeof document !== 'undefined';\n\n if (!isBrowser) {\n return emptyResource();\n }\n const browserResource: Attributes = getBrowserAttributes();\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates browser resource attribute map from browser variables\n *\n * @param browserResource The un-sanitized resource attributes from browser as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: Attributes,\n _config?: ResourceDetectionConfig\n ): DetectedResource {\n if (\n !browserResource[ATTR_USER_AGENT_ORIGINAL] &&\n !browserResource[ATTR_BROWSER_PLATFORM]\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return emptyResource();\n } else {\n return { attributes: browserResource };\n }\n }\n}\n\n// Add Browser related attributes to resources\nfunction getBrowserAttributes(): Attributes {\n const browserAttribs: Attributes = {};\n const userAgentData = (\n navigator as Navigator & { userAgentData?: UserAgentData }\n ).userAgentData;\n if (userAgentData) {\n browserAttribs[ATTR_BROWSER_PLATFORM] = userAgentData.platform;\n browserAttribs[ATTR_BROWSER_BRANDS] = userAgentData.brands.map(\n b => `${b.brand} ${b.version}`\n );\n browserAttribs[ATTR_BROWSER_MOBILE] = userAgentData.mobile;\n }\n browserAttribs[ATTR_USER_AGENT_ORIGINAL] = navigator.userAgent;\n browserAttribs[ATTR_BROWSER_LANGUAGE] = navigator.language;\n return browserAttribs;\n}\n\nexport const browserDetector = new BrowserDetector();\n"],"mappings":";;;;;;;;AAyBA,IAAM,kBAAN,MAAkD;CAChD,OAAO,QAAoD;EAIzD,IAAI,EAFF,OAAO,WAAW,eAAe,OAAO,aAAa,cAGrD,OAAO,cAAc;EAEvB,MAAM,kBAA8B,qBAAqB;EACzD,OAAO,KAAK,uBAAuB,iBAAiB,MAAM;CAC5D;;;;;;;;
|
|
1
|
+
{"version":3,"file":"BrowserDetector.mjs","names":[],"sources":["../src/BrowserDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport type {\n DetectedResource,\n ResourceDetector,\n ResourceDetectionConfig,\n} from '@opentelemetry/resources';\nimport { emptyResource } from '@opentelemetry/resources';\nimport { ATTR_USER_AGENT_ORIGINAL } from '@opentelemetry/semantic-conventions';\nimport type { UserAgentData } from './types';\nimport {\n ATTR_BROWSER_LANGUAGE,\n ATTR_BROWSER_PLATFORM,\n ATTR_BROWSER_BRANDS,\n ATTR_BROWSER_MOBILE,\n} from './semconv';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements ResourceDetector {\n detect(config?: ResourceDetectionConfig): DetectedResource {\n const isBrowser =\n typeof window !== 'undefined' && typeof document !== 'undefined';\n\n if (!isBrowser) {\n return emptyResource();\n }\n const browserResource: Attributes = getBrowserAttributes();\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates browser resource attribute map from browser variables\n *\n * @param browserResource The un-sanitized resource attributes from browser as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: Attributes,\n _config?: ResourceDetectionConfig\n ): DetectedResource {\n if (\n !browserResource[ATTR_USER_AGENT_ORIGINAL] &&\n !browserResource[ATTR_BROWSER_PLATFORM]\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return emptyResource();\n } else {\n return { attributes: browserResource };\n }\n }\n}\n\n// Add Browser related attributes to resources\nfunction getBrowserAttributes(): Attributes {\n const browserAttribs: Attributes = {};\n const userAgentData = (\n navigator as Navigator & { userAgentData?: UserAgentData }\n ).userAgentData;\n if (userAgentData) {\n browserAttribs[ATTR_BROWSER_PLATFORM] = userAgentData.platform;\n browserAttribs[ATTR_BROWSER_BRANDS] = userAgentData.brands.map(\n b => `${b.brand} ${b.version}`\n );\n browserAttribs[ATTR_BROWSER_MOBILE] = userAgentData.mobile;\n }\n browserAttribs[ATTR_USER_AGENT_ORIGINAL] = navigator.userAgent;\n browserAttribs[ATTR_BROWSER_LANGUAGE] = navigator.language;\n return browserAttribs;\n}\n\n/**\n * @deprecated See https://github.com/open-telemetry/opentelemetry-browser/tree/main/packages/sdk#browser-resource-detection\n */\nexport const browserDetector = new BrowserDetector();\n"],"mappings":";;;;;;;;AAyBA,IAAM,kBAAN,MAAkD;CAChD,OAAO,QAAoD;EAIzD,IAAI,EAFF,OAAO,WAAW,eAAe,OAAO,aAAa,cAGrD,OAAO,cAAc;EAEvB,MAAM,kBAA8B,qBAAqB;EACzD,OAAO,KAAK,uBAAuB,iBAAiB,MAAM;CAC5D;;;;;;;;CAQQ,uBACN,iBACA,SACkB;EAClB,IACE,CAAC,gBAAgB,6BACjB,CAAC,gBAAA,qBACD;GACA,KAAK,MACH,qEACF;GACA,OAAO,cAAc;EACvB,OACE,OAAO,EAAE,YAAY,gBAAgB;CAEzC;AACF;AAGA,SAAS,uBAAmC;CAC1C,MAAM,iBAA6B,CAAC;CACpC,MAAM,gBACJ,UACA;CACF,IAAI,eAAe;EACjB,eAAe,yBAAyB,cAAc;EACtD,eAAe,uBAAuB,cAAc,OAAO,KACzD,MAAK,GAAG,EAAE,MAAM,GAAG,EAAE,SACvB;EACA,eAAe,uBAAuB,cAAc;CACtD;CACA,eAAe,4BAA4B,UAAU;CACrD,eAAe,yBAAyB,UAAU;CAClD,OAAO;AACT;;;;AAKA,MAAa,kBAAkB,IAAI,gBAAgB"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { browserDetector };
|
|
1
|
+
export { browserDetector } from "./BrowserDetector.mjs";
|
package/dist/semconv.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/semconv.ts
|
|
2
2
|
/**
|
|
3
3
|
* Array of brand name and version separated by a space
|
|
4
4
|
*
|
|
@@ -43,7 +43,6 @@ const ATTR_BROWSER_MOBILE = "browser.mobile";
|
|
|
43
43
|
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
44
44
|
*/
|
|
45
45
|
const ATTR_BROWSER_PLATFORM = "browser.platform";
|
|
46
|
-
//#endregion
|
|
47
46
|
exports.ATTR_BROWSER_BRANDS = ATTR_BROWSER_BRANDS;
|
|
48
47
|
exports.ATTR_BROWSER_LANGUAGE = ATTR_BROWSER_LANGUAGE;
|
|
49
48
|
exports.ATTR_BROWSER_MOBILE = ATTR_BROWSER_MOBILE;
|
package/dist/semconv.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/semconv.ts
|
|
2
2
|
/**
|
|
3
3
|
* Array of brand name and version separated by a space
|
|
4
4
|
*
|
|
@@ -43,7 +43,6 @@ const ATTR_BROWSER_MOBILE = "browser.mobile";
|
|
|
43
43
|
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
44
44
|
*/
|
|
45
45
|
const ATTR_BROWSER_PLATFORM = "browser.platform";
|
|
46
|
-
//#endregion
|
|
47
46
|
export { ATTR_BROWSER_BRANDS, ATTR_BROWSER_LANGUAGE, ATTR_BROWSER_MOBILE, ATTR_BROWSER_PLATFORM };
|
|
48
47
|
|
|
49
48
|
//# sourceMappingURL=semconv.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/opentelemetry-browser-detector",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.302.0",
|
|
4
4
|
"description": "OpenTelemetry Resource Detector for Browser",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.cts",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@babel/core": "
|
|
58
|
-
"@babel/preset-env": "
|
|
57
|
+
"@babel/core": "8.1.3",
|
|
58
|
+
"@babel/preset-env": "8.0.7",
|
|
59
59
|
"@opentelemetry/api": "1.10.0",
|
|
60
60
|
"@types/mocha": "10.0.10",
|
|
61
61
|
"@types/node": "18.19.130",
|
|
62
|
-
"@types/sinon": "
|
|
62
|
+
"@types/sinon": "22.0.2",
|
|
63
63
|
"babel-plugin-istanbul": "8.0.0",
|
|
64
64
|
"karma": "6.4.4",
|
|
65
65
|
"karma-chrome-launcher": "3.2.0",
|
|
@@ -69,19 +69,19 @@
|
|
|
69
69
|
"karma-webpack": "5.0.1",
|
|
70
70
|
"mocha": "12.0.3",
|
|
71
71
|
"nyc": "18.0.0",
|
|
72
|
-
"sinon": "
|
|
73
|
-
"ts-loader": "9.
|
|
72
|
+
"sinon": "22.1.0",
|
|
73
|
+
"ts-loader": "9.6.2",
|
|
74
74
|
"typescript": "5.2.2",
|
|
75
|
-
"webpack": "5.
|
|
76
|
-
"webpack-cli": "7.
|
|
75
|
+
"webpack": "5.113.0",
|
|
76
|
+
"webpack-cli": "7.3.1"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"@opentelemetry/api": "^1.10.0"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@opentelemetry/resources": "3.1.
|
|
82
|
+
"@opentelemetry/resources": "3.1.2",
|
|
83
83
|
"@opentelemetry/semantic-conventions": "^1.29.0"
|
|
84
84
|
},
|
|
85
85
|
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/browser-detector",
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "612ab77be06833732005165ed9184329dbfec6cd"
|
|
87
87
|
}
|