@safaricom-mxl/web-sdk 0.0.13 → 0.0.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/dist/mxl-web-sdk.js +24 -4
- package/dist/mxl-web-sdk.js.map +1 -1
- package/dist/packages/otlp-transformer/dist/index.cjs +26 -26
- package/dist/packages/otlp-transformer/dist/index.cjs.map +1 -1
- package/dist/packages/otlp-transformer/dist/index.d.cts +8 -0
- package/dist/packages/otlp-transformer/dist/index.d.cts.map +1 -1
- package/dist/packages/otlp-transformer/dist/index.d.ts +8 -0
- package/dist/packages/otlp-transformer/dist/index.d.ts.map +1 -1
- package/dist/packages/otlp-transformer/dist/index.js +26 -26
- package/dist/packages/otlp-transformer/dist/index.js.map +1 -1
- package/dist/resources/constants/index.cjs +1 -1
- package/dist/resources/constants/index.cjs.map +1 -1
- package/dist/resources/constants/index.d.cts +1 -1
- package/dist/resources/constants/index.d.ts +1 -1
- package/dist/resources/constants/index.js +1 -1
- package/dist/resources/constants/index.js.map +1 -1
- package/package.json +10 -10
|
@@ -299,32 +299,6 @@ function toAnyValue(value, encoder) {
|
|
|
299
299
|
}
|
|
300
300
|
return {};
|
|
301
301
|
}
|
|
302
|
-
function hrTimeToNanos(hrTime) {
|
|
303
|
-
const NANOSECONDS = BigInt(1e9);
|
|
304
|
-
return BigInt(Math.trunc(hrTime[0])) * NANOSECONDS + BigInt(Math.trunc(hrTime[1]));
|
|
305
|
-
}
|
|
306
|
-
function encodeAsString(hrTime) {
|
|
307
|
-
return hrTimeToNanos(hrTime).toString();
|
|
308
|
-
}
|
|
309
|
-
const encodeTimestamp = typeof BigInt !== "undefined" ? encodeAsString : hrTimeToNanoseconds;
|
|
310
|
-
function identity(value) {
|
|
311
|
-
return value;
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Encoder for JSON format.
|
|
315
|
-
* Uses string timestamps, hex for span/trace IDs, and base64 for Uint8Array.
|
|
316
|
-
*/
|
|
317
|
-
const JSON_ENCODER = {
|
|
318
|
-
encodeHrTime: encodeTimestamp,
|
|
319
|
-
encodeSpanContext: identity,
|
|
320
|
-
encodeOptionalSpanContext: identity,
|
|
321
|
-
encodeUint8Array: (bytes) => {
|
|
322
|
-
if (typeof Buffer !== "undefined") return Buffer.from(bytes).toString("base64");
|
|
323
|
-
const chars = new Array(bytes.length);
|
|
324
|
-
for (let i = 0; i < bytes.length; i++) chars[i] = String.fromCharCode(bytes[i]);
|
|
325
|
-
return btoa(chars.join(""));
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
302
|
function createExportLogsServiceRequest(logRecords, encoder) {
|
|
329
303
|
return { resourceLogs: logRecordsToResourceLogs(logRecords, encoder) };
|
|
330
304
|
}
|
|
@@ -385,6 +359,32 @@ function toSeverityNumber(severityNumber) {
|
|
|
385
359
|
function toLogAttributes(attributes, encoder) {
|
|
386
360
|
return Object.keys(attributes).map((key) => toKeyValue(key, attributes[key], encoder));
|
|
387
361
|
}
|
|
362
|
+
function hrTimeToNanos(hrTime) {
|
|
363
|
+
const NANOSECONDS = BigInt(1e9);
|
|
364
|
+
return BigInt(Math.trunc(hrTime[0])) * NANOSECONDS + BigInt(Math.trunc(hrTime[1]));
|
|
365
|
+
}
|
|
366
|
+
function encodeAsString(hrTime) {
|
|
367
|
+
return hrTimeToNanos(hrTime).toString();
|
|
368
|
+
}
|
|
369
|
+
const encodeTimestamp = typeof BigInt !== "undefined" ? encodeAsString : hrTimeToNanoseconds;
|
|
370
|
+
function identity(value) {
|
|
371
|
+
return value;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Encoder for JSON format.
|
|
375
|
+
* Uses string timestamps, hex for span/trace IDs, and base64 for Uint8Array.
|
|
376
|
+
*/
|
|
377
|
+
const JSON_ENCODER = {
|
|
378
|
+
encodeHrTime: encodeTimestamp,
|
|
379
|
+
encodeSpanContext: identity,
|
|
380
|
+
encodeOptionalSpanContext: identity,
|
|
381
|
+
encodeUint8Array: (bytes) => {
|
|
382
|
+
if (typeof Buffer !== "undefined") return Buffer.from(bytes).toString("base64");
|
|
383
|
+
const chars = new Array(bytes.length);
|
|
384
|
+
for (let i = 0; i < bytes.length; i++) chars[i] = String.fromCharCode(bytes[i]);
|
|
385
|
+
return btoa(chars.join(""));
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
388
|
const JsonLogsSerializer = {
|
|
389
389
|
serializeRequest: (arg) => {
|
|
390
390
|
const request = createExportLogsServiceRequest(arg, JSON_ENCODER);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../packages/otlp-transformer/dist/index.js"],"sourcesContent":["//#region ../../../../node_modules/@opentelemetry/api/build/esm/version.js\nconst VERSION = \"1.9.1\";\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/internal/semver.js\nconst re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n* Create a function to test an API version to see if it is compatible with the provided ownVersion.\n*\n* The returned function has the following semantics:\n* - Exact match is always compatible\n* - Major versions must match exactly\n* - 1.x package cannot use global 2.x package\n* - 2.x package cannot use global 1.x package\n* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n* - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n* - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n* - Patch and build tag differences are not considered at this time\n*\n* @param ownVersion version which should be checked against\n*/\nfunction _makeCompatibilityCheck(ownVersion) {\n\tconst acceptedVersions = new Set([ownVersion]);\n\tconst rejectedVersions = /* @__PURE__ */ new Set();\n\tconst myVersionMatch = ownVersion.match(re);\n\tif (!myVersionMatch) return () => false;\n\tconst ownVersionParsed = {\n\t\tmajor: +myVersionMatch[1],\n\t\tminor: +myVersionMatch[2],\n\t\tpatch: +myVersionMatch[3],\n\t\tprerelease: myVersionMatch[4]\n\t};\n\tif (ownVersionParsed.prerelease != null) return function isExactmatch(globalVersion) {\n\t\treturn globalVersion === ownVersion;\n\t};\n\tfunction _reject(v) {\n\t\trejectedVersions.add(v);\n\t\treturn false;\n\t}\n\tfunction _accept(v) {\n\t\tacceptedVersions.add(v);\n\t\treturn true;\n\t}\n\treturn function isCompatible(globalVersion) {\n\t\tif (acceptedVersions.has(globalVersion)) return true;\n\t\tif (rejectedVersions.has(globalVersion)) return false;\n\t\tconst globalVersionMatch = globalVersion.match(re);\n\t\tif (!globalVersionMatch) return _reject(globalVersion);\n\t\tconst globalVersionParsed = {\n\t\t\tmajor: +globalVersionMatch[1],\n\t\t\tminor: +globalVersionMatch[2],\n\t\t\tpatch: +globalVersionMatch[3],\n\t\t\tprerelease: globalVersionMatch[4]\n\t\t};\n\t\tif (globalVersionParsed.prerelease != null) return _reject(globalVersion);\n\t\tif (ownVersionParsed.major !== globalVersionParsed.major) return _reject(globalVersion);\n\t\tif (ownVersionParsed.major === 0) {\n\t\t\tif (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) return _accept(globalVersion);\n\t\t\treturn _reject(globalVersion);\n\t\t}\n\t\tif (ownVersionParsed.minor <= globalVersionParsed.minor) return _accept(globalVersion);\n\t\treturn _reject(globalVersion);\n\t};\n}\n/**\n* Test an API version to see if it is compatible with this API.\n*\n* - Exact match is always compatible\n* - Major versions must match exactly\n* - 1.x package cannot use global 2.x package\n* - 2.x package cannot use global 1.x package\n* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n* - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n* - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n* - Patch and build tag differences are not considered at this time\n*\n* @param version version of the API requesting an instance of the global API\n*/\nconst isCompatible = _makeCompatibilityCheck(VERSION);\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/internal/global-utils.js\nconst major = VERSION.split(\".\")[0];\nconst GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);\nconst _global = typeof globalThis === \"object\" ? globalThis : typeof self === \"object\" ? self : typeof window === \"object\" ? window : typeof global === \"object\" ? global : {};\nfunction registerGlobal(type, instance, diag, allowOverride = false) {\n\tvar _a;\n\tconst api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : { version: VERSION };\n\tif (!allowOverride && api[type]) {\n\t\tconst err = /* @__PURE__ */ new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);\n\t\tdiag.error(err.stack || err.message);\n\t\treturn false;\n\t}\n\tif (api.version !== \"1.9.1\") {\n\t\tconst err = /* @__PURE__ */ new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`);\n\t\tdiag.error(err.stack || err.message);\n\t\treturn false;\n\t}\n\tapi[type] = instance;\n\tdiag.debug(`@opentelemetry/api: Registered a global for ${type} v${VERSION}.`);\n\treturn true;\n}\nfunction getGlobal(type) {\n\tvar _a, _b;\n\tconst globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n\tif (!globalVersion || !isCompatible(globalVersion)) return;\n\treturn (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nfunction unregisterGlobal(type, diag) {\n\tdiag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${VERSION}.`);\n\tconst api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n\tif (api) delete api[type];\n}\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js\n/**\n* Component Logger which is meant to be used as part of any component which\n* will add automatically additional namespace in front of the log message.\n* It will then forward all message to global diag logger\n* @example\n* const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n* cLogger.debug('test');\n* // @opentelemetry/instrumentation-http test\n*/\nvar DiagComponentLogger = class {\n\tconstructor(props) {\n\t\tthis._namespace = props.namespace || \"DiagComponentLogger\";\n\t}\n\tdebug(...args) {\n\t\treturn logProxy(\"debug\", this._namespace, args);\n\t}\n\terror(...args) {\n\t\treturn logProxy(\"error\", this._namespace, args);\n\t}\n\tinfo(...args) {\n\t\treturn logProxy(\"info\", this._namespace, args);\n\t}\n\twarn(...args) {\n\t\treturn logProxy(\"warn\", this._namespace, args);\n\t}\n\tverbose(...args) {\n\t\treturn logProxy(\"verbose\", this._namespace, args);\n\t}\n};\nfunction logProxy(funcName, namespace, args) {\n\tconst logger = getGlobal(\"diag\");\n\tif (!logger) return;\n\treturn logger[funcName](namespace, ...args);\n}\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag/types.js\n/**\n* Defines the available internal logging levels for the diagnostic logger, the numeric values\n* of the levels are defined to match the original values from the initial LogLevel to avoid\n* compatibility/migration issues for any implementation that assume the numeric ordering.\n*/\nvar DiagLogLevel;\n(function(DiagLogLevel) {\n\t/** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n\tDiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n\t/** Identifies an error scenario */\n\tDiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n\t/** Identifies a warning scenario */\n\tDiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n\t/** General informational log message */\n\tDiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n\t/** General debug log message */\n\tDiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n\t/**\n\t* Detailed trace level logging should only be used for development, should only be set\n\t* in a development environment.\n\t*/\n\tDiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n\t/** Used to set the logging level to include all logging */\n\tDiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel || (DiagLogLevel = {}));\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js\nfunction createLogLevelDiagLogger(maxLevel, logger) {\n\tif (maxLevel < DiagLogLevel.NONE) maxLevel = DiagLogLevel.NONE;\n\telse if (maxLevel > DiagLogLevel.ALL) maxLevel = DiagLogLevel.ALL;\n\tlogger = logger || {};\n\tfunction _filterFunc(funcName, theLevel) {\n\t\tconst theFunc = logger[funcName];\n\t\tif (typeof theFunc === \"function\" && maxLevel >= theLevel) return theFunc.bind(logger);\n\t\treturn function() {};\n\t}\n\treturn {\n\t\terror: _filterFunc(\"error\", DiagLogLevel.ERROR),\n\t\twarn: _filterFunc(\"warn\", DiagLogLevel.WARN),\n\t\tinfo: _filterFunc(\"info\", DiagLogLevel.INFO),\n\t\tdebug: _filterFunc(\"debug\", DiagLogLevel.DEBUG),\n\t\tverbose: _filterFunc(\"verbose\", DiagLogLevel.VERBOSE)\n\t};\n}\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/api/diag.js\nconst API_NAME = \"diag\";\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag-api.js\n/**\n* Entrypoint for Diag API.\n* Defines Diagnostic handler used for internal diagnostic logging operations.\n* The default provides a Noop DiagLogger implementation which may be changed via the\n* diag.setLogger(logger: DiagLogger) function.\n*\n* @since 1.0.0\n*/\nconst diag = class DiagAPI {\n\t/** Get the singleton instance of the DiagAPI API */\n\tstatic instance() {\n\t\tif (!this._instance) this._instance = new DiagAPI();\n\t\treturn this._instance;\n\t}\n\t/**\n\t* Private internal constructor\n\t* @private\n\t*/\n\tconstructor() {\n\t\tfunction _logProxy(funcName) {\n\t\t\treturn function(...args) {\n\t\t\t\tconst logger = getGlobal(\"diag\");\n\t\t\t\tif (!logger) return;\n\t\t\t\treturn logger[funcName](...args);\n\t\t\t};\n\t\t}\n\t\tconst self = this;\n\t\tconst setLogger = (logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {\n\t\t\tvar _a, _b, _c;\n\t\t\tif (logger === self) {\n\t\t\t\tconst err = /* @__PURE__ */ new Error(\"Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation\");\n\t\t\t\tself.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (typeof optionsOrLogLevel === \"number\") optionsOrLogLevel = { logLevel: optionsOrLogLevel };\n\t\t\tconst oldLogger = getGlobal(\"diag\");\n\t\t\tconst newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);\n\t\t\tif (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n\t\t\t\tconst stack = (_c = (/* @__PURE__ */ new Error()).stack) !== null && _c !== void 0 ? _c : \"<failed to generate stacktrace>\";\n\t\t\t\toldLogger.warn(`Current logger will be overwritten from ${stack}`);\n\t\t\t\tnewLogger.warn(`Current logger will overwrite one already registered from ${stack}`);\n\t\t\t}\n\t\t\treturn registerGlobal(\"diag\", newLogger, self, true);\n\t\t};\n\t\tself.setLogger = setLogger;\n\t\tself.disable = () => {\n\t\t\tunregisterGlobal(API_NAME, self);\n\t\t};\n\t\tself.createComponentLogger = (options) => {\n\t\t\treturn new DiagComponentLogger(options);\n\t\t};\n\t\tself.verbose = _logProxy(\"verbose\");\n\t\tself.debug = _logProxy(\"debug\");\n\t\tself.info = _logProxy(\"info\");\n\t\tself.warn = _logProxy(\"warn\");\n\t\tself.error = _logProxy(\"error\");\n\t}\n}.instance();\nconst SECOND_TO_NANOSECONDS = Math.pow(10, 9);\n/**\n* Convert hrTime to nanoseconds.\n* @param time\n*/\nfunction hrTimeToNanoseconds(time) {\n\treturn time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js\nfunction createResource(resource, encoder) {\n\tconst result = {\n\t\tattributes: toAttributes(resource.attributes, encoder),\n\t\tdroppedAttributesCount: 0\n\t};\n\tconst schemaUrl = resource.schemaUrl;\n\tif (schemaUrl && schemaUrl !== \"\") result.schemaUrl = schemaUrl;\n\treturn result;\n}\nfunction createInstrumentationScope(scope) {\n\treturn {\n\t\tname: scope.name,\n\t\tversion: scope.version\n\t};\n}\nfunction toAttributes(attributes, encoder) {\n\treturn Object.keys(attributes).map((key) => toKeyValue(key, attributes[key], encoder));\n}\nfunction toKeyValue(key, value, encoder) {\n\treturn {\n\t\tkey,\n\t\tvalue: toAnyValue(value, encoder)\n\t};\n}\nfunction toAnyValue(value, encoder) {\n\tconst t = typeof value;\n\tif (t === \"string\") return { stringValue: value };\n\tif (t === \"number\") {\n\t\tif (!Number.isInteger(value)) return { doubleValue: value };\n\t\treturn { intValue: value };\n\t}\n\tif (t === \"boolean\") return { boolValue: value };\n\tif (value instanceof Uint8Array) return { bytesValue: encoder.encodeUint8Array(value) };\n\tif (Array.isArray(value)) {\n\t\tconst values = new Array(value.length);\n\t\tfor (let i = 0; i < value.length; i++) values[i] = toAnyValue(value[i], encoder);\n\t\treturn { arrayValue: { values } };\n\t}\n\tif (t === \"object\" && value != null) {\n\t\tconst keys = Object.keys(value);\n\t\tconst values = new Array(keys.length);\n\t\tfor (let i = 0; i < keys.length; i++) values[i] = {\n\t\t\tkey: keys[i],\n\t\t\tvalue: toAnyValue(value[keys[i]], encoder)\n\t\t};\n\t\treturn { kvlistValue: { values } };\n\t}\n\treturn {};\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/common/utils.js\nfunction hrTimeToNanos(hrTime) {\n\tconst NANOSECONDS = BigInt(1e9);\n\treturn BigInt(Math.trunc(hrTime[0])) * NANOSECONDS + BigInt(Math.trunc(hrTime[1]));\n}\nfunction encodeAsString(hrTime) {\n\treturn hrTimeToNanos(hrTime).toString();\n}\nconst encodeTimestamp = typeof BigInt !== \"undefined\" ? encodeAsString : hrTimeToNanoseconds;\nfunction identity(value) {\n\treturn value;\n}\n/**\n* Encoder for JSON format.\n* Uses string timestamps, hex for span/trace IDs, and base64 for Uint8Array.\n*/\nconst JSON_ENCODER = {\n\tencodeHrTime: encodeTimestamp,\n\tencodeSpanContext: identity,\n\tencodeOptionalSpanContext: identity,\n\tencodeUint8Array: (bytes) => {\n\t\tif (typeof Buffer !== \"undefined\") return Buffer.from(bytes).toString(\"base64\");\n\t\tconst chars = new Array(bytes.length);\n\t\tfor (let i = 0; i < bytes.length; i++) chars[i] = String.fromCharCode(bytes[i]);\n\t\treturn btoa(chars.join(\"\"));\n\t}\n};\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.js\nfunction createExportLogsServiceRequest(logRecords, encoder) {\n\treturn { resourceLogs: logRecordsToResourceLogs(logRecords, encoder) };\n}\nfunction createResourceMap$1(logRecords) {\n\tconst resourceMap = /* @__PURE__ */ new Map();\n\tfor (const record of logRecords) {\n\t\tconst { resource, instrumentationScope: { name, version = \"\", schemaUrl = \"\" } } = record;\n\t\tlet ismMap = resourceMap.get(resource);\n\t\tif (!ismMap) {\n\t\t\tismMap = /* @__PURE__ */ new Map();\n\t\t\tresourceMap.set(resource, ismMap);\n\t\t}\n\t\tconst ismKey = `${name}@${version}:${schemaUrl}`;\n\t\tlet records = ismMap.get(ismKey);\n\t\tif (!records) {\n\t\t\trecords = [];\n\t\t\tismMap.set(ismKey, records);\n\t\t}\n\t\trecords.push(record);\n\t}\n\treturn resourceMap;\n}\nfunction logRecordsToResourceLogs(logRecords, encoder) {\n\tconst resourceMap = createResourceMap$1(logRecords);\n\treturn Array.from(resourceMap, ([resource, ismMap]) => {\n\t\tconst processedResource = createResource(resource, encoder);\n\t\treturn {\n\t\t\tresource: processedResource,\n\t\t\tscopeLogs: Array.from(ismMap, ([, scopeLogs]) => {\n\t\t\t\treturn {\n\t\t\t\t\tscope: createInstrumentationScope(scopeLogs[0].instrumentationScope),\n\t\t\t\t\tlogRecords: scopeLogs.map((log) => toLogRecord(log, encoder)),\n\t\t\t\t\tschemaUrl: scopeLogs[0].instrumentationScope.schemaUrl\n\t\t\t\t};\n\t\t\t}),\n\t\t\tschemaUrl: processedResource.schemaUrl\n\t\t};\n\t});\n}\nfunction toLogRecord(log, encoder) {\n\treturn {\n\t\ttimeUnixNano: encoder.encodeHrTime(log.hrTime),\n\t\tobservedTimeUnixNano: encoder.encodeHrTime(log.hrTimeObserved),\n\t\tseverityNumber: toSeverityNumber(log.severityNumber),\n\t\tseverityText: log.severityText,\n\t\tbody: toAnyValue(log.body, encoder),\n\t\teventName: log.eventName,\n\t\tattributes: toLogAttributes(log.attributes, encoder),\n\t\tdroppedAttributesCount: log.droppedAttributesCount,\n\t\tflags: log.spanContext?.traceFlags,\n\t\ttraceId: encoder.encodeOptionalSpanContext(log.spanContext?.traceId),\n\t\tspanId: encoder.encodeOptionalSpanContext(log.spanContext?.spanId)\n\t};\n}\nfunction toSeverityNumber(severityNumber) {\n\treturn severityNumber;\n}\nfunction toLogAttributes(attributes, encoder) {\n\treturn Object.keys(attributes).map((key) => toKeyValue(key, attributes[key], encoder));\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/logs/json/logs.js\nconst JsonLogsSerializer = {\n\tserializeRequest: (arg) => {\n\t\tconst request = createExportLogsServiceRequest(arg, JSON_ENCODER);\n\t\treturn new TextEncoder().encode(JSON.stringify(request));\n\t},\n\tdeserializeResponse: (arg) => {\n\t\tif (arg.length === 0) return {};\n\t\tconst decoder = new TextDecoder();\n\t\ttry {\n\t\t\treturn JSON.parse(decoder.decode(arg));\n\t\t} catch (err) {\n\t\t\tdiag.warn(`Failed to parse logs export response: ${err.message}. Returning empty response`);\n\t\t\treturn {};\n\t\t}\n\t}\n};\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js\nconst SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK = 256;\nconst SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK = 512;\n/**\n* Builds the 32-bit span flags value combining the low 8-bit W3C TraceFlags\n* with the HAS_IS_REMOTE and IS_REMOTE bits according to the OTLP spec.\n*/\nfunction buildSpanFlagsFrom(traceFlags, isRemote) {\n\tlet flags = traceFlags & 255 | SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK;\n\tif (isRemote) flags |= SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK;\n\treturn flags;\n}\nfunction sdkSpanToOtlpSpan(span, encoder) {\n\tconst ctx = span.spanContext();\n\tconst status = span.status;\n\tconst parentSpanId = span.parentSpanContext?.spanId ? encoder.encodeSpanContext(span.parentSpanContext?.spanId) : void 0;\n\treturn {\n\t\ttraceId: encoder.encodeSpanContext(ctx.traceId),\n\t\tspanId: encoder.encodeSpanContext(ctx.spanId),\n\t\tparentSpanId,\n\t\ttraceState: ctx.traceState?.serialize(),\n\t\tname: span.name,\n\t\tkind: span.kind == null ? 0 : span.kind + 1,\n\t\tstartTimeUnixNano: encoder.encodeHrTime(span.startTime),\n\t\tendTimeUnixNano: encoder.encodeHrTime(span.endTime),\n\t\tattributes: toAttributes(span.attributes, encoder),\n\t\tdroppedAttributesCount: span.droppedAttributesCount,\n\t\tevents: span.events.map((event) => toOtlpSpanEvent(event, encoder)),\n\t\tdroppedEventsCount: span.droppedEventsCount,\n\t\tstatus: {\n\t\t\tcode: status.code,\n\t\t\tmessage: status.message\n\t\t},\n\t\tlinks: span.links.map((link) => toOtlpLink(link, encoder)),\n\t\tdroppedLinksCount: span.droppedLinksCount,\n\t\tflags: buildSpanFlagsFrom(ctx.traceFlags, span.parentSpanContext?.isRemote)\n\t};\n}\nfunction toOtlpLink(link, encoder) {\n\treturn {\n\t\tattributes: link.attributes ? toAttributes(link.attributes, encoder) : [],\n\t\tspanId: encoder.encodeSpanContext(link.context.spanId),\n\t\ttraceId: encoder.encodeSpanContext(link.context.traceId),\n\t\ttraceState: link.context.traceState?.serialize(),\n\t\tdroppedAttributesCount: link.droppedAttributesCount || 0,\n\t\tflags: buildSpanFlagsFrom(link.context.traceFlags, link.context.isRemote)\n\t};\n}\nfunction toOtlpSpanEvent(timedEvent, encoder) {\n\treturn {\n\t\tattributes: timedEvent.attributes ? toAttributes(timedEvent.attributes, encoder) : [],\n\t\tname: timedEvent.name,\n\t\ttimeUnixNano: encoder.encodeHrTime(timedEvent.time),\n\t\tdroppedAttributesCount: timedEvent.droppedAttributesCount || 0\n\t};\n}\nfunction createExportTraceServiceRequest(spans, encoder) {\n\treturn { resourceSpans: spanRecordsToResourceSpans(spans, encoder) };\n}\nfunction createResourceMap(readableSpans) {\n\tconst resourceMap = /* @__PURE__ */ new Map();\n\tfor (const record of readableSpans) {\n\t\tlet ilsMap = resourceMap.get(record.resource);\n\t\tif (!ilsMap) {\n\t\t\tilsMap = /* @__PURE__ */ new Map();\n\t\t\tresourceMap.set(record.resource, ilsMap);\n\t\t}\n\t\tconst instrumentationScopeKey = `${record.instrumentationScope.name}@${record.instrumentationScope.version || \"\"}:${record.instrumentationScope.schemaUrl || \"\"}`;\n\t\tlet records = ilsMap.get(instrumentationScopeKey);\n\t\tif (!records) {\n\t\t\trecords = [];\n\t\t\tilsMap.set(instrumentationScopeKey, records);\n\t\t}\n\t\trecords.push(record);\n\t}\n\treturn resourceMap;\n}\nfunction spanRecordsToResourceSpans(readableSpans, encoder) {\n\tconst resourceMap = createResourceMap(readableSpans);\n\tconst out = [];\n\tconst entryIterator = resourceMap.entries();\n\tlet entry = entryIterator.next();\n\twhile (!entry.done) {\n\t\tconst [resource, ilmMap] = entry.value;\n\t\tconst scopeResourceSpans = [];\n\t\tconst ilmIterator = ilmMap.values();\n\t\tlet ilmEntry = ilmIterator.next();\n\t\twhile (!ilmEntry.done) {\n\t\t\tconst scopeSpans = ilmEntry.value;\n\t\t\tif (scopeSpans.length > 0) {\n\t\t\t\tconst spans = scopeSpans.map((readableSpan) => sdkSpanToOtlpSpan(readableSpan, encoder));\n\t\t\t\tscopeResourceSpans.push({\n\t\t\t\t\tscope: createInstrumentationScope(scopeSpans[0].instrumentationScope),\n\t\t\t\t\tspans,\n\t\t\t\t\tschemaUrl: scopeSpans[0].instrumentationScope.schemaUrl\n\t\t\t\t});\n\t\t\t}\n\t\t\tilmEntry = ilmIterator.next();\n\t\t}\n\t\tconst processedResource = createResource(resource, encoder);\n\t\tconst transformedSpans = {\n\t\t\tresource: processedResource,\n\t\t\tscopeSpans: scopeResourceSpans,\n\t\t\tschemaUrl: processedResource.schemaUrl\n\t\t};\n\t\tout.push(transformedSpans);\n\t\tentry = entryIterator.next();\n\t}\n\treturn out;\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/json/trace.js\nconst JsonTraceSerializer = {\n\tserializeRequest: (arg) => {\n\t\tconst request = createExportTraceServiceRequest(arg, JSON_ENCODER);\n\t\treturn new TextEncoder().encode(JSON.stringify(request));\n\t},\n\tdeserializeResponse: (arg) => {\n\t\tif (arg.length === 0) return {};\n\t\tconst decoder = new TextDecoder();\n\t\ttry {\n\t\t\treturn JSON.parse(decoder.decode(arg));\n\t\t} catch (err) {\n\t\t\tdiag.warn(`Failed to parse trace export response: ${err.message}. Returning empty response`);\n\t\t\treturn {};\n\t\t}\n\t}\n};\n//#endregion\nexport { JsonLogsSerializer, JsonTraceSerializer };\n\n//# sourceMappingURL=index.js.map"],"mappings":";AACA,MAAM,UAAU;AAGhB,MAAM,KAAK;;;;;;;;;;;;;;;;;AAiBX,SAAS,wBAAwB,YAAY;CAC5C,MAAM,mBAAmB,IAAI,IAAI,CAAC,WAAW,CAAC;CAC9C,MAAM,mCAAmC,IAAI,KAAK;CAClD,MAAM,iBAAiB,WAAW,MAAM,GAAG;AAC3C,KAAI,CAAC,eAAgB,cAAa;CAClC,MAAM,mBAAmB;EACxB,OAAO,CAAC,eAAe;EACvB,OAAO,CAAC,eAAe;EACvB,OAAO,CAAC,eAAe;EACvB,YAAY,eAAe;EAC3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AAC,UAAU,UAAU,MAAM;EACjC,MAAM,qBAAqB,EAAE;EAC7B,MAAM,cAAc,OAAO,QAAQ;EACnC,IAAI,WAAW,YAAY,MAAM;AACjC,SAAO,CAAC,SAAS,MAAM;GACtB,MAAM,aAAa,SAAS;AAC5B,OAAI,WAAW,SAAS,GAAG;IAC1B,MAAM,QAAQ,WAAW,KAAK,iBAAiB,kBAAkB,cAAc,QAAQ,CAAC;AACxF,uBAAmB,KAAK;KACvB,OAAO,2BAA2B,WAAW,GAAG,qBAAqB;KACrE;KACA,WAAW,WAAW,GAAG,qBAAqB;KAC9C,CAAC;;AAEH,cAAW,YAAY,MAAM;;EAE9B,MAAM,oBAAoB,eAAe,UAAU,QAAQ;EAC3D,MAAM,mBAAmB;GACxB,UAAU;GACV,YAAY;GACZ,WAAW,kBAAkB;GAC7B;AACD,MAAI,KAAK,iBAAiB;AAC1B,UAAQ,cAAc,MAAM;;AAE7B,QAAO;;AAIR,MAAM,sBAAsB;CAC3B,mBAAmB,QAAQ;EAC1B,MAAM,UAAU,gCAAgC,KAAK,aAAa;AAClE,SAAO,IAAI,aAAa,CAAC,OAAO,KAAK,UAAU,QAAQ,CAAC;;CAEzD,sBAAsB,QAAQ;AAC7B,MAAI,IAAI,WAAW,EAAG,QAAO,EAAE;EAC/B,MAAM,UAAU,IAAI,aAAa;AACjC,MAAI;AACH,UAAO,KAAK,MAAM,QAAQ,OAAO,IAAI,CAAC;WAC9B,KAAK;AACb,QAAK,KAAK,0CAA0C,IAAI,QAAQ,4BAA4B;AAC5F,UAAO,EAAE;;;CAGX"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../packages/otlp-transformer/dist/index.js"],"sourcesContent":["//#region ../../../../node_modules/@opentelemetry/api/build/esm/version.js\nconst VERSION = \"1.9.1\";\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/internal/semver.js\nconst re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n* Create a function to test an API version to see if it is compatible with the provided ownVersion.\n*\n* The returned function has the following semantics:\n* - Exact match is always compatible\n* - Major versions must match exactly\n* - 1.x package cannot use global 2.x package\n* - 2.x package cannot use global 1.x package\n* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n* - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n* - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n* - Patch and build tag differences are not considered at this time\n*\n* @param ownVersion version which should be checked against\n*/\nfunction _makeCompatibilityCheck(ownVersion) {\n\tconst acceptedVersions = new Set([ownVersion]);\n\tconst rejectedVersions = /* @__PURE__ */ new Set();\n\tconst myVersionMatch = ownVersion.match(re);\n\tif (!myVersionMatch) return () => false;\n\tconst ownVersionParsed = {\n\t\tmajor: +myVersionMatch[1],\n\t\tminor: +myVersionMatch[2],\n\t\tpatch: +myVersionMatch[3],\n\t\tprerelease: myVersionMatch[4]\n\t};\n\tif (ownVersionParsed.prerelease != null) return function isExactmatch(globalVersion) {\n\t\treturn globalVersion === ownVersion;\n\t};\n\tfunction _reject(v) {\n\t\trejectedVersions.add(v);\n\t\treturn false;\n\t}\n\tfunction _accept(v) {\n\t\tacceptedVersions.add(v);\n\t\treturn true;\n\t}\n\treturn function isCompatible(globalVersion) {\n\t\tif (acceptedVersions.has(globalVersion)) return true;\n\t\tif (rejectedVersions.has(globalVersion)) return false;\n\t\tconst globalVersionMatch = globalVersion.match(re);\n\t\tif (!globalVersionMatch) return _reject(globalVersion);\n\t\tconst globalVersionParsed = {\n\t\t\tmajor: +globalVersionMatch[1],\n\t\t\tminor: +globalVersionMatch[2],\n\t\t\tpatch: +globalVersionMatch[3],\n\t\t\tprerelease: globalVersionMatch[4]\n\t\t};\n\t\tif (globalVersionParsed.prerelease != null) return _reject(globalVersion);\n\t\tif (ownVersionParsed.major !== globalVersionParsed.major) return _reject(globalVersion);\n\t\tif (ownVersionParsed.major === 0) {\n\t\t\tif (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) return _accept(globalVersion);\n\t\t\treturn _reject(globalVersion);\n\t\t}\n\t\tif (ownVersionParsed.minor <= globalVersionParsed.minor) return _accept(globalVersion);\n\t\treturn _reject(globalVersion);\n\t};\n}\n/**\n* Test an API version to see if it is compatible with this API.\n*\n* - Exact match is always compatible\n* - Major versions must match exactly\n* - 1.x package cannot use global 2.x package\n* - 2.x package cannot use global 1.x package\n* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n* - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n* - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n* - Patch and build tag differences are not considered at this time\n*\n* @param version version of the API requesting an instance of the global API\n*/\nconst isCompatible = _makeCompatibilityCheck(VERSION);\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/internal/global-utils.js\nconst major = VERSION.split(\".\")[0];\nconst GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);\nconst _global = typeof globalThis === \"object\" ? globalThis : typeof self === \"object\" ? self : typeof window === \"object\" ? window : typeof global === \"object\" ? global : {};\nfunction registerGlobal(type, instance, diag, allowOverride = false) {\n\tvar _a;\n\tconst api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : { version: VERSION };\n\tif (!allowOverride && api[type]) {\n\t\tconst err = /* @__PURE__ */ new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);\n\t\tdiag.error(err.stack || err.message);\n\t\treturn false;\n\t}\n\tif (api.version !== \"1.9.1\") {\n\t\tconst err = /* @__PURE__ */ new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`);\n\t\tdiag.error(err.stack || err.message);\n\t\treturn false;\n\t}\n\tapi[type] = instance;\n\tdiag.debug(`@opentelemetry/api: Registered a global for ${type} v${VERSION}.`);\n\treturn true;\n}\nfunction getGlobal(type) {\n\tvar _a, _b;\n\tconst globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n\tif (!globalVersion || !isCompatible(globalVersion)) return;\n\treturn (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nfunction unregisterGlobal(type, diag) {\n\tdiag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${VERSION}.`);\n\tconst api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n\tif (api) delete api[type];\n}\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js\n/**\n* Component Logger which is meant to be used as part of any component which\n* will add automatically additional namespace in front of the log message.\n* It will then forward all message to global diag logger\n* @example\n* const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n* cLogger.debug('test');\n* // @opentelemetry/instrumentation-http test\n*/\nvar DiagComponentLogger = class {\n\tconstructor(props) {\n\t\tthis._namespace = props.namespace || \"DiagComponentLogger\";\n\t}\n\tdebug(...args) {\n\t\treturn logProxy(\"debug\", this._namespace, args);\n\t}\n\terror(...args) {\n\t\treturn logProxy(\"error\", this._namespace, args);\n\t}\n\tinfo(...args) {\n\t\treturn logProxy(\"info\", this._namespace, args);\n\t}\n\twarn(...args) {\n\t\treturn logProxy(\"warn\", this._namespace, args);\n\t}\n\tverbose(...args) {\n\t\treturn logProxy(\"verbose\", this._namespace, args);\n\t}\n};\nfunction logProxy(funcName, namespace, args) {\n\tconst logger = getGlobal(\"diag\");\n\tif (!logger) return;\n\treturn logger[funcName](namespace, ...args);\n}\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag/types.js\n/**\n* Defines the available internal logging levels for the diagnostic logger, the numeric values\n* of the levels are defined to match the original values from the initial LogLevel to avoid\n* compatibility/migration issues for any implementation that assume the numeric ordering.\n*/\nvar DiagLogLevel;\n(function(DiagLogLevel) {\n\t/** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n\tDiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n\t/** Identifies an error scenario */\n\tDiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n\t/** Identifies a warning scenario */\n\tDiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n\t/** General informational log message */\n\tDiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n\t/** General debug log message */\n\tDiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n\t/**\n\t* Detailed trace level logging should only be used for development, should only be set\n\t* in a development environment.\n\t*/\n\tDiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n\t/** Used to set the logging level to include all logging */\n\tDiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel || (DiagLogLevel = {}));\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js\nfunction createLogLevelDiagLogger(maxLevel, logger) {\n\tif (maxLevel < DiagLogLevel.NONE) maxLevel = DiagLogLevel.NONE;\n\telse if (maxLevel > DiagLogLevel.ALL) maxLevel = DiagLogLevel.ALL;\n\tlogger = logger || {};\n\tfunction _filterFunc(funcName, theLevel) {\n\t\tconst theFunc = logger[funcName];\n\t\tif (typeof theFunc === \"function\" && maxLevel >= theLevel) return theFunc.bind(logger);\n\t\treturn function() {};\n\t}\n\treturn {\n\t\terror: _filterFunc(\"error\", DiagLogLevel.ERROR),\n\t\twarn: _filterFunc(\"warn\", DiagLogLevel.WARN),\n\t\tinfo: _filterFunc(\"info\", DiagLogLevel.INFO),\n\t\tdebug: _filterFunc(\"debug\", DiagLogLevel.DEBUG),\n\t\tverbose: _filterFunc(\"verbose\", DiagLogLevel.VERBOSE)\n\t};\n}\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/api/diag.js\nconst API_NAME = \"diag\";\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag-api.js\n/**\n* Entrypoint for Diag API.\n* Defines Diagnostic handler used for internal diagnostic logging operations.\n* The default provides a Noop DiagLogger implementation which may be changed via the\n* diag.setLogger(logger: DiagLogger) function.\n*\n* @since 1.0.0\n*/\nconst diag = class DiagAPI {\n\t/** Get the singleton instance of the DiagAPI API */\n\tstatic instance() {\n\t\tif (!this._instance) this._instance = new DiagAPI();\n\t\treturn this._instance;\n\t}\n\t/**\n\t* Private internal constructor\n\t* @private\n\t*/\n\tconstructor() {\n\t\tfunction _logProxy(funcName) {\n\t\t\treturn function(...args) {\n\t\t\t\tconst logger = getGlobal(\"diag\");\n\t\t\t\tif (!logger) return;\n\t\t\t\treturn logger[funcName](...args);\n\t\t\t};\n\t\t}\n\t\tconst self = this;\n\t\tconst setLogger = (logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {\n\t\t\tvar _a, _b, _c;\n\t\t\tif (logger === self) {\n\t\t\t\tconst err = /* @__PURE__ */ new Error(\"Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation\");\n\t\t\t\tself.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (typeof optionsOrLogLevel === \"number\") optionsOrLogLevel = { logLevel: optionsOrLogLevel };\n\t\t\tconst oldLogger = getGlobal(\"diag\");\n\t\t\tconst newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);\n\t\t\tif (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n\t\t\t\tconst stack = (_c = (/* @__PURE__ */ new Error()).stack) !== null && _c !== void 0 ? _c : \"<failed to generate stacktrace>\";\n\t\t\t\toldLogger.warn(`Current logger will be overwritten from ${stack}`);\n\t\t\t\tnewLogger.warn(`Current logger will overwrite one already registered from ${stack}`);\n\t\t\t}\n\t\t\treturn registerGlobal(\"diag\", newLogger, self, true);\n\t\t};\n\t\tself.setLogger = setLogger;\n\t\tself.disable = () => {\n\t\t\tunregisterGlobal(API_NAME, self);\n\t\t};\n\t\tself.createComponentLogger = (options) => {\n\t\t\treturn new DiagComponentLogger(options);\n\t\t};\n\t\tself.verbose = _logProxy(\"verbose\");\n\t\tself.debug = _logProxy(\"debug\");\n\t\tself.info = _logProxy(\"info\");\n\t\tself.warn = _logProxy(\"warn\");\n\t\tself.error = _logProxy(\"error\");\n\t}\n}.instance();\nconst SECOND_TO_NANOSECONDS = Math.pow(10, 9);\n/**\n* Convert hrTime to nanoseconds.\n* @param time\n*/\nfunction hrTimeToNanoseconds(time) {\n\treturn time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js\nfunction createResource(resource, encoder) {\n\tconst result = {\n\t\tattributes: toAttributes(resource.attributes, encoder),\n\t\tdroppedAttributesCount: 0\n\t};\n\tconst schemaUrl = resource.schemaUrl;\n\tif (schemaUrl && schemaUrl !== \"\") result.schemaUrl = schemaUrl;\n\treturn result;\n}\nfunction createInstrumentationScope(scope) {\n\treturn {\n\t\tname: scope.name,\n\t\tversion: scope.version\n\t};\n}\nfunction toAttributes(attributes, encoder) {\n\treturn Object.keys(attributes).map((key) => toKeyValue(key, attributes[key], encoder));\n}\nfunction toKeyValue(key, value, encoder) {\n\treturn {\n\t\tkey,\n\t\tvalue: toAnyValue(value, encoder)\n\t};\n}\nfunction toAnyValue(value, encoder) {\n\tconst t = typeof value;\n\tif (t === \"string\") return { stringValue: value };\n\tif (t === \"number\") {\n\t\tif (!Number.isInteger(value)) return { doubleValue: value };\n\t\treturn { intValue: value };\n\t}\n\tif (t === \"boolean\") return { boolValue: value };\n\tif (value instanceof Uint8Array) return { bytesValue: encoder.encodeUint8Array(value) };\n\tif (Array.isArray(value)) {\n\t\tconst values = new Array(value.length);\n\t\tfor (let i = 0; i < value.length; i++) values[i] = toAnyValue(value[i], encoder);\n\t\treturn { arrayValue: { values } };\n\t}\n\tif (t === \"object\" && value != null) {\n\t\tconst keys = Object.keys(value);\n\t\tconst values = new Array(keys.length);\n\t\tfor (let i = 0; i < keys.length; i++) values[i] = {\n\t\t\tkey: keys[i],\n\t\t\tvalue: toAnyValue(value[keys[i]], encoder)\n\t\t};\n\t\treturn { kvlistValue: { values } };\n\t}\n\treturn {};\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.js\nfunction createExportLogsServiceRequest(logRecords, encoder) {\n\treturn { resourceLogs: logRecordsToResourceLogs(logRecords, encoder) };\n}\nfunction createResourceMap$1(logRecords) {\n\tconst resourceMap = /* @__PURE__ */ new Map();\n\tfor (const record of logRecords) {\n\t\tconst { resource, instrumentationScope: { name, version = \"\", schemaUrl = \"\" } } = record;\n\t\tlet ismMap = resourceMap.get(resource);\n\t\tif (!ismMap) {\n\t\t\tismMap = /* @__PURE__ */ new Map();\n\t\t\tresourceMap.set(resource, ismMap);\n\t\t}\n\t\tconst ismKey = `${name}@${version}:${schemaUrl}`;\n\t\tlet records = ismMap.get(ismKey);\n\t\tif (!records) {\n\t\t\trecords = [];\n\t\t\tismMap.set(ismKey, records);\n\t\t}\n\t\trecords.push(record);\n\t}\n\treturn resourceMap;\n}\nfunction logRecordsToResourceLogs(logRecords, encoder) {\n\tconst resourceMap = createResourceMap$1(logRecords);\n\treturn Array.from(resourceMap, ([resource, ismMap]) => {\n\t\tconst processedResource = createResource(resource, encoder);\n\t\treturn {\n\t\t\tresource: processedResource,\n\t\t\tscopeLogs: Array.from(ismMap, ([, scopeLogs]) => {\n\t\t\t\treturn {\n\t\t\t\t\tscope: createInstrumentationScope(scopeLogs[0].instrumentationScope),\n\t\t\t\t\tlogRecords: scopeLogs.map((log) => toLogRecord(log, encoder)),\n\t\t\t\t\tschemaUrl: scopeLogs[0].instrumentationScope.schemaUrl\n\t\t\t\t};\n\t\t\t}),\n\t\t\tschemaUrl: processedResource.schemaUrl\n\t\t};\n\t});\n}\nfunction toLogRecord(log, encoder) {\n\treturn {\n\t\ttimeUnixNano: encoder.encodeHrTime(log.hrTime),\n\t\tobservedTimeUnixNano: encoder.encodeHrTime(log.hrTimeObserved),\n\t\tseverityNumber: toSeverityNumber(log.severityNumber),\n\t\tseverityText: log.severityText,\n\t\tbody: toAnyValue(log.body, encoder),\n\t\teventName: log.eventName,\n\t\tattributes: toLogAttributes(log.attributes, encoder),\n\t\tdroppedAttributesCount: log.droppedAttributesCount,\n\t\tflags: log.spanContext?.traceFlags,\n\t\ttraceId: encoder.encodeOptionalSpanContext(log.spanContext?.traceId),\n\t\tspanId: encoder.encodeOptionalSpanContext(log.spanContext?.spanId)\n\t};\n}\nfunction toSeverityNumber(severityNumber) {\n\treturn severityNumber;\n}\nfunction toLogAttributes(attributes, encoder) {\n\treturn Object.keys(attributes).map((key) => toKeyValue(key, attributes[key], encoder));\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/common/utils.js\nfunction hrTimeToNanos(hrTime) {\n\tconst NANOSECONDS = BigInt(1e9);\n\treturn BigInt(Math.trunc(hrTime[0])) * NANOSECONDS + BigInt(Math.trunc(hrTime[1]));\n}\nfunction encodeAsString(hrTime) {\n\treturn hrTimeToNanos(hrTime).toString();\n}\nconst encodeTimestamp = typeof BigInt !== \"undefined\" ? encodeAsString : hrTimeToNanoseconds;\nfunction identity(value) {\n\treturn value;\n}\n/**\n* Encoder for JSON format.\n* Uses string timestamps, hex for span/trace IDs, and base64 for Uint8Array.\n*/\nconst JSON_ENCODER = {\n\tencodeHrTime: encodeTimestamp,\n\tencodeSpanContext: identity,\n\tencodeOptionalSpanContext: identity,\n\tencodeUint8Array: (bytes) => {\n\t\tif (typeof Buffer !== \"undefined\") return Buffer.from(bytes).toString(\"base64\");\n\t\tconst chars = new Array(bytes.length);\n\t\tfor (let i = 0; i < bytes.length; i++) chars[i] = String.fromCharCode(bytes[i]);\n\t\treturn btoa(chars.join(\"\"));\n\t}\n};\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/logs/json/logs.js\nconst JsonLogsSerializer = {\n\tserializeRequest: (arg) => {\n\t\tconst request = createExportLogsServiceRequest(arg, JSON_ENCODER);\n\t\treturn new TextEncoder().encode(JSON.stringify(request));\n\t},\n\tdeserializeResponse: (arg) => {\n\t\tif (arg.length === 0) return {};\n\t\tconst decoder = new TextDecoder();\n\t\ttry {\n\t\t\treturn JSON.parse(decoder.decode(arg));\n\t\t} catch (err) {\n\t\t\tdiag.warn(`Failed to parse logs export response: ${err.message}. Returning empty response`);\n\t\t\treturn {};\n\t\t}\n\t}\n};\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js\nconst SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK = 256;\nconst SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK = 512;\n/**\n* Builds the 32-bit span flags value combining the low 8-bit W3C TraceFlags\n* with the HAS_IS_REMOTE and IS_REMOTE bits according to the OTLP spec.\n*/\nfunction buildSpanFlagsFrom(traceFlags, isRemote) {\n\tlet flags = traceFlags & 255 | SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK;\n\tif (isRemote) flags |= SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK;\n\treturn flags;\n}\nfunction sdkSpanToOtlpSpan(span, encoder) {\n\tconst ctx = span.spanContext();\n\tconst status = span.status;\n\tconst parentSpanId = span.parentSpanContext?.spanId ? encoder.encodeSpanContext(span.parentSpanContext?.spanId) : void 0;\n\treturn {\n\t\ttraceId: encoder.encodeSpanContext(ctx.traceId),\n\t\tspanId: encoder.encodeSpanContext(ctx.spanId),\n\t\tparentSpanId,\n\t\ttraceState: ctx.traceState?.serialize(),\n\t\tname: span.name,\n\t\tkind: span.kind == null ? 0 : span.kind + 1,\n\t\tstartTimeUnixNano: encoder.encodeHrTime(span.startTime),\n\t\tendTimeUnixNano: encoder.encodeHrTime(span.endTime),\n\t\tattributes: toAttributes(span.attributes, encoder),\n\t\tdroppedAttributesCount: span.droppedAttributesCount,\n\t\tevents: span.events.map((event) => toOtlpSpanEvent(event, encoder)),\n\t\tdroppedEventsCount: span.droppedEventsCount,\n\t\tstatus: {\n\t\t\tcode: status.code,\n\t\t\tmessage: status.message\n\t\t},\n\t\tlinks: span.links.map((link) => toOtlpLink(link, encoder)),\n\t\tdroppedLinksCount: span.droppedLinksCount,\n\t\tflags: buildSpanFlagsFrom(ctx.traceFlags, span.parentSpanContext?.isRemote)\n\t};\n}\nfunction toOtlpLink(link, encoder) {\n\treturn {\n\t\tattributes: link.attributes ? toAttributes(link.attributes, encoder) : [],\n\t\tspanId: encoder.encodeSpanContext(link.context.spanId),\n\t\ttraceId: encoder.encodeSpanContext(link.context.traceId),\n\t\ttraceState: link.context.traceState?.serialize(),\n\t\tdroppedAttributesCount: link.droppedAttributesCount || 0,\n\t\tflags: buildSpanFlagsFrom(link.context.traceFlags, link.context.isRemote)\n\t};\n}\nfunction toOtlpSpanEvent(timedEvent, encoder) {\n\treturn {\n\t\tattributes: timedEvent.attributes ? toAttributes(timedEvent.attributes, encoder) : [],\n\t\tname: timedEvent.name,\n\t\ttimeUnixNano: encoder.encodeHrTime(timedEvent.time),\n\t\tdroppedAttributesCount: timedEvent.droppedAttributesCount || 0\n\t};\n}\nfunction createExportTraceServiceRequest(spans, encoder) {\n\treturn { resourceSpans: spanRecordsToResourceSpans(spans, encoder) };\n}\nfunction createResourceMap(readableSpans) {\n\tconst resourceMap = /* @__PURE__ */ new Map();\n\tfor (const record of readableSpans) {\n\t\tlet ilsMap = resourceMap.get(record.resource);\n\t\tif (!ilsMap) {\n\t\t\tilsMap = /* @__PURE__ */ new Map();\n\t\t\tresourceMap.set(record.resource, ilsMap);\n\t\t}\n\t\tconst instrumentationScopeKey = `${record.instrumentationScope.name}@${record.instrumentationScope.version || \"\"}:${record.instrumentationScope.schemaUrl || \"\"}`;\n\t\tlet records = ilsMap.get(instrumentationScopeKey);\n\t\tif (!records) {\n\t\t\trecords = [];\n\t\t\tilsMap.set(instrumentationScopeKey, records);\n\t\t}\n\t\trecords.push(record);\n\t}\n\treturn resourceMap;\n}\nfunction spanRecordsToResourceSpans(readableSpans, encoder) {\n\tconst resourceMap = createResourceMap(readableSpans);\n\tconst out = [];\n\tconst entryIterator = resourceMap.entries();\n\tlet entry = entryIterator.next();\n\twhile (!entry.done) {\n\t\tconst [resource, ilmMap] = entry.value;\n\t\tconst scopeResourceSpans = [];\n\t\tconst ilmIterator = ilmMap.values();\n\t\tlet ilmEntry = ilmIterator.next();\n\t\twhile (!ilmEntry.done) {\n\t\t\tconst scopeSpans = ilmEntry.value;\n\t\t\tif (scopeSpans.length > 0) {\n\t\t\t\tconst spans = scopeSpans.map((readableSpan) => sdkSpanToOtlpSpan(readableSpan, encoder));\n\t\t\t\tscopeResourceSpans.push({\n\t\t\t\t\tscope: createInstrumentationScope(scopeSpans[0].instrumentationScope),\n\t\t\t\t\tspans,\n\t\t\t\t\tschemaUrl: scopeSpans[0].instrumentationScope.schemaUrl\n\t\t\t\t});\n\t\t\t}\n\t\t\tilmEntry = ilmIterator.next();\n\t\t}\n\t\tconst processedResource = createResource(resource, encoder);\n\t\tconst transformedSpans = {\n\t\t\tresource: processedResource,\n\t\t\tscopeSpans: scopeResourceSpans,\n\t\t\tschemaUrl: processedResource.schemaUrl\n\t\t};\n\t\tout.push(transformedSpans);\n\t\tentry = entryIterator.next();\n\t}\n\treturn out;\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/json/trace.js\nconst JsonTraceSerializer = {\n\tserializeRequest: (arg) => {\n\t\tconst request = createExportTraceServiceRequest(arg, JSON_ENCODER);\n\t\treturn new TextEncoder().encode(JSON.stringify(request));\n\t},\n\tdeserializeResponse: (arg) => {\n\t\tif (arg.length === 0) return {};\n\t\tconst decoder = new TextDecoder();\n\t\ttry {\n\t\t\treturn JSON.parse(decoder.decode(arg));\n\t\t} catch (err) {\n\t\t\tdiag.warn(`Failed to parse trace export response: ${err.message}. Returning empty response`);\n\t\t\treturn {};\n\t\t}\n\t}\n};\n//#endregion\nexport { JsonLogsSerializer, JsonTraceSerializer };\n\n//# sourceMappingURL=index.js.map"],"mappings":";AACA,MAAM,UAAU;AAGhB,MAAM,KAAK;;;;;;;;;;;;;;;;;AAiBX,SAAS,wBAAwB,YAAY;CAC5C,MAAM,mBAAmB,IAAI,IAAI,CAAC,WAAW,CAAC;CAC9C,MAAM,mCAAmC,IAAI,KAAK;CAClD,MAAM,iBAAiB,WAAW,MAAM,GAAG;AAC3C,KAAI,CAAC,eAAgB,cAAa;CAClC,MAAM,mBAAmB;EACxB,OAAO,CAAC,eAAe;EACvB,OAAO,CAAC,eAAe;EACvB,OAAO,CAAC,eAAe;EACvB,YAAY,eAAe;EAC3B;AACD,KAAI,iBAAiB,cAAc,KAAM,QAAO,SAAS,aAAa,eAAe;AACpF,SAAO,kBAAkB;;CAE1B,SAAS,QAAQ,GAAG;AACnB,mBAAiB,IAAI,EAAE;AACvB,SAAO;;CAER,SAAS,QAAQ,GAAG;AACnB,mBAAiB,IAAI,EAAE;AACvB,SAAO;;AAER,QAAO,SAAS,aAAa,eAAe;AAC3C,MAAI,iBAAiB,IAAI,cAAc,CAAE,QAAO;AAChD,MAAI,iBAAiB,IAAI,cAAc,CAAE,QAAO;EAChD,MAAM,qBAAqB,cAAc,MAAM,GAAG;AAClD,MAAI,CAAC,mBAAoB,QAAO,QAAQ,cAAc;EACtD,MAAM,sBAAsB;GAC3B,OAAO,CAAC,mBAAmB;GAC3B,OAAO,CAAC,mBAAmB;GAC3B,OAAO,CAAC,mBAAmB;GAC3B,YAAY,mBAAmB;GAC/B;AACD,MAAI,oBAAoB,cAAc,KAAM,QAAO,QAAQ,cAA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AM,sBAAsB;CAC3B,mBAAmB,QAAQ;EAC1B,MAAM,UAAU,gCAAgC,KAAK,aAAa;AAClE,SAAO,IAAI,aAAa,CAAC,OAAO,KAAK,UAAU,QAAQ,CAAC;;CAEzD,sBAAsB,QAAQ;AAC7B,MAAI,IAAI,WAAW,EAAG,QAAO,EAAE;EAC/B,MAAM,UAAU,IAAI,aAAa;AACjC,MAAI;AACH,UAAO,KAAK,MAAM,QAAQ,OAAO,IAAI,CAAC;WAC9B,KAAK;AACb,QAAK,KAAK,0CAA0C,IAAI,QAAQ,4BAA4B;AAC5F,UAAO,EAAE;;;CAGX"}
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
interface ISerializer<Request, Response> {
|
|
8
8
|
serializeRequest(request: Request): Uint8Array | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Deserialize the response from the backend. The response is expected to be in the form of a
|
|
11
|
+
* {@link Uint8Array} and will be deserialized into the expected response type.
|
|
12
|
+
*
|
|
13
|
+
* @param data
|
|
14
|
+
* @throws {unknown} if the deserialization fails
|
|
15
|
+
* @returns the deserialized response
|
|
16
|
+
*/
|
|
9
17
|
deserializeResponse(data: Uint8Array): Response;
|
|
10
18
|
} //#endregion
|
|
11
19
|
//#region ../../../../node_modules/@opentelemetry/sdk-trace-base/build/src/TimedEvent.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":["IExportTraceServiceResponse","IExportTracePartialSuccess","partialSuccess","rejectedSpans","errorMessage","IExportLogsServiceResponse","IExportLogsPartialSuccess","rejectedLogRecords","Attributes","AttributeValue","attributeKey","Array","HrTime","SpanAttributes","TraceState","set","key","value","unset","get","serialize","SpanContext","traceId","spanId","isRemote","traceFlags","traceState","SpanStatus","SpanStatusCode","code","message","UNSET","OK","ERROR","Link","context","attributes","droppedAttributesCount","SpanKind","INTERNAL","SERVER","CLIENT","PRODUCER","CONSUMER","MaybePromise","T","Promise","RawResourceAttribute","Resource","asyncAttributesPending","schemaUrl","waitForAsyncAttributes","merge","other","getRawAttributes","AnyValueScalar","AnyValueArray","AnyValue","AnyValueMap","Uint8Array","LogBody","LogAttributes","SeverityNumber","UNSPECIFIED","TRACE","TRACE2","TRACE3","TRACE4","DEBUG","DEBUG2","DEBUG3","DEBUG4","INFO","INFO2","INFO3","INFO4","WARN","WARN2","WARN3","WARN4","ERROR2","ERROR3","ERROR4","FATAL","FATAL2","FATAL3","FATAL4","InstrumentationScope","name","version","ReadableLogRecord","hrTime","hrTimeObserved","spanContext","severityText","severityNumber","body","eventName","resource","instrumentationScope","ISerializer","Request","Response","serializeRequest","request","deserializeResponse","data","TimedEvent","time","ReadableSpan","kind","parentSpanContext","startTime","endTime","status","links","events","duration","ended","droppedEventsCount","droppedLinksCount","JsonLogsSerializer","JsonTraceSerializer"],"sources":["../../../../packages/otlp-transformer/dist/index.d.ts"],"mappings":";;;;;;UAqYUoG,WAAAA;EACRG,gBAAAA,CAAiBC,OAAAA,EAASH,OAAAA,GAAU1C,UAAAA
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":["IExportTraceServiceResponse","IExportTracePartialSuccess","partialSuccess","rejectedSpans","errorMessage","IExportLogsServiceResponse","IExportLogsPartialSuccess","rejectedLogRecords","Attributes","AttributeValue","attributeKey","Array","HrTime","SpanAttributes","TraceState","set","key","value","unset","get","serialize","SpanContext","traceId","spanId","isRemote","traceFlags","traceState","SpanStatus","SpanStatusCode","code","message","UNSET","OK","ERROR","Link","context","attributes","droppedAttributesCount","SpanKind","INTERNAL","SERVER","CLIENT","PRODUCER","CONSUMER","MaybePromise","T","Promise","RawResourceAttribute","Resource","asyncAttributesPending","schemaUrl","waitForAsyncAttributes","merge","other","getRawAttributes","AnyValueScalar","AnyValueArray","AnyValue","AnyValueMap","Uint8Array","LogBody","LogAttributes","SeverityNumber","UNSPECIFIED","TRACE","TRACE2","TRACE3","TRACE4","DEBUG","DEBUG2","DEBUG3","DEBUG4","INFO","INFO2","INFO3","INFO4","WARN","WARN2","WARN3","WARN4","ERROR2","ERROR3","ERROR4","FATAL","FATAL2","FATAL3","FATAL4","InstrumentationScope","name","version","ReadableLogRecord","hrTime","hrTimeObserved","spanContext","severityText","severityNumber","body","eventName","resource","instrumentationScope","ISerializer","Request","Response","serializeRequest","request","deserializeResponse","data","TimedEvent","time","ReadableSpan","kind","parentSpanContext","startTime","endTime","status","links","events","duration","ended","droppedEventsCount","droppedLinksCount","JsonLogsSerializer","JsonTraceSerializer"],"sources":["../../../../packages/otlp-transformer/dist/index.d.ts"],"mappings":";;;;;;UAqYUoG,WAAAA;EACRG,gBAAAA,CAAiBC,OAAAA,EAASH,OAAAA,GAAU1C,UAAAA;;;;;;;;;EASpC8C,mBAAAA,CAAoBC,IAAAA,EAAM/C,UAAAA,GAAa2C,QAAAA;AAAAA;AAAAA"}
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
interface ISerializer<Request, Response> {
|
|
8
8
|
serializeRequest(request: Request): Uint8Array | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Deserialize the response from the backend. The response is expected to be in the form of a
|
|
11
|
+
* {@link Uint8Array} and will be deserialized into the expected response type.
|
|
12
|
+
*
|
|
13
|
+
* @param data
|
|
14
|
+
* @throws {unknown} if the deserialization fails
|
|
15
|
+
* @returns the deserialized response
|
|
16
|
+
*/
|
|
9
17
|
deserializeResponse(data: Uint8Array): Response;
|
|
10
18
|
} //#endregion
|
|
11
19
|
//#region ../../../../node_modules/@opentelemetry/sdk-trace-base/build/src/TimedEvent.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["IExportTraceServiceResponse","IExportTracePartialSuccess","partialSuccess","rejectedSpans","errorMessage","IExportLogsServiceResponse","IExportLogsPartialSuccess","rejectedLogRecords","Attributes","AttributeValue","attributeKey","Array","HrTime","SpanAttributes","TraceState","set","key","value","unset","get","serialize","SpanContext","traceId","spanId","isRemote","traceFlags","traceState","SpanStatus","SpanStatusCode","code","message","UNSET","OK","ERROR","Link","context","attributes","droppedAttributesCount","SpanKind","INTERNAL","SERVER","CLIENT","PRODUCER","CONSUMER","MaybePromise","T","Promise","RawResourceAttribute","Resource","asyncAttributesPending","schemaUrl","waitForAsyncAttributes","merge","other","getRawAttributes","AnyValueScalar","AnyValueArray","AnyValue","AnyValueMap","Uint8Array","LogBody","LogAttributes","SeverityNumber","UNSPECIFIED","TRACE","TRACE2","TRACE3","TRACE4","DEBUG","DEBUG2","DEBUG3","DEBUG4","INFO","INFO2","INFO3","INFO4","WARN","WARN2","WARN3","WARN4","ERROR2","ERROR3","ERROR4","FATAL","FATAL2","FATAL3","FATAL4","InstrumentationScope","name","version","ReadableLogRecord","hrTime","hrTimeObserved","spanContext","severityText","severityNumber","body","eventName","resource","instrumentationScope","ISerializer","Request","Response","serializeRequest","request","deserializeResponse","data","TimedEvent","time","ReadableSpan","kind","parentSpanContext","startTime","endTime","status","links","events","duration","ended","droppedEventsCount","droppedLinksCount","JsonLogsSerializer","JsonTraceSerializer"],"sources":["../../../../packages/otlp-transformer/dist/index.d.ts"],"mappings":";;;;;;UAqYUoG,WAAAA;EACRG,gBAAAA,CAAiBC,OAAAA,EAASH,OAAAA,GAAU1C,UAAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["IExportTraceServiceResponse","IExportTracePartialSuccess","partialSuccess","rejectedSpans","errorMessage","IExportLogsServiceResponse","IExportLogsPartialSuccess","rejectedLogRecords","Attributes","AttributeValue","attributeKey","Array","HrTime","SpanAttributes","TraceState","set","key","value","unset","get","serialize","SpanContext","traceId","spanId","isRemote","traceFlags","traceState","SpanStatus","SpanStatusCode","code","message","UNSET","OK","ERROR","Link","context","attributes","droppedAttributesCount","SpanKind","INTERNAL","SERVER","CLIENT","PRODUCER","CONSUMER","MaybePromise","T","Promise","RawResourceAttribute","Resource","asyncAttributesPending","schemaUrl","waitForAsyncAttributes","merge","other","getRawAttributes","AnyValueScalar","AnyValueArray","AnyValue","AnyValueMap","Uint8Array","LogBody","LogAttributes","SeverityNumber","UNSPECIFIED","TRACE","TRACE2","TRACE3","TRACE4","DEBUG","DEBUG2","DEBUG3","DEBUG4","INFO","INFO2","INFO3","INFO4","WARN","WARN2","WARN3","WARN4","ERROR2","ERROR3","ERROR4","FATAL","FATAL2","FATAL3","FATAL4","InstrumentationScope","name","version","ReadableLogRecord","hrTime","hrTimeObserved","spanContext","severityText","severityNumber","body","eventName","resource","instrumentationScope","ISerializer","Request","Response","serializeRequest","request","deserializeResponse","data","TimedEvent","time","ReadableSpan","kind","parentSpanContext","startTime","endTime","status","links","events","duration","ended","droppedEventsCount","droppedLinksCount","JsonLogsSerializer","JsonTraceSerializer"],"sources":["../../../../packages/otlp-transformer/dist/index.d.ts"],"mappings":";;;;;;UAqYUoG,WAAAA;EACRG,gBAAAA,CAAiBC,OAAAA,EAASH,OAAAA,GAAU1C,UAAAA;;;;;;;;;EASpC8C,mBAAAA,CAAoBC,IAAAA,EAAM/C,UAAAA,GAAa2C,QAAAA;AAAAA;AAAAA"}
|
|
@@ -299,32 +299,6 @@ function toAnyValue(value, encoder) {
|
|
|
299
299
|
}
|
|
300
300
|
return {};
|
|
301
301
|
}
|
|
302
|
-
function hrTimeToNanos(hrTime) {
|
|
303
|
-
const NANOSECONDS = BigInt(1e9);
|
|
304
|
-
return BigInt(Math.trunc(hrTime[0])) * NANOSECONDS + BigInt(Math.trunc(hrTime[1]));
|
|
305
|
-
}
|
|
306
|
-
function encodeAsString(hrTime) {
|
|
307
|
-
return hrTimeToNanos(hrTime).toString();
|
|
308
|
-
}
|
|
309
|
-
const encodeTimestamp = typeof BigInt !== "undefined" ? encodeAsString : hrTimeToNanoseconds;
|
|
310
|
-
function identity(value) {
|
|
311
|
-
return value;
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Encoder for JSON format.
|
|
315
|
-
* Uses string timestamps, hex for span/trace IDs, and base64 for Uint8Array.
|
|
316
|
-
*/
|
|
317
|
-
const JSON_ENCODER = {
|
|
318
|
-
encodeHrTime: encodeTimestamp,
|
|
319
|
-
encodeSpanContext: identity,
|
|
320
|
-
encodeOptionalSpanContext: identity,
|
|
321
|
-
encodeUint8Array: (bytes) => {
|
|
322
|
-
if (typeof Buffer !== "undefined") return Buffer.from(bytes).toString("base64");
|
|
323
|
-
const chars = new Array(bytes.length);
|
|
324
|
-
for (let i = 0; i < bytes.length; i++) chars[i] = String.fromCharCode(bytes[i]);
|
|
325
|
-
return btoa(chars.join(""));
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
302
|
function createExportLogsServiceRequest(logRecords, encoder) {
|
|
329
303
|
return { resourceLogs: logRecordsToResourceLogs(logRecords, encoder) };
|
|
330
304
|
}
|
|
@@ -385,6 +359,32 @@ function toSeverityNumber(severityNumber) {
|
|
|
385
359
|
function toLogAttributes(attributes, encoder) {
|
|
386
360
|
return Object.keys(attributes).map((key) => toKeyValue(key, attributes[key], encoder));
|
|
387
361
|
}
|
|
362
|
+
function hrTimeToNanos(hrTime) {
|
|
363
|
+
const NANOSECONDS = BigInt(1e9);
|
|
364
|
+
return BigInt(Math.trunc(hrTime[0])) * NANOSECONDS + BigInt(Math.trunc(hrTime[1]));
|
|
365
|
+
}
|
|
366
|
+
function encodeAsString(hrTime) {
|
|
367
|
+
return hrTimeToNanos(hrTime).toString();
|
|
368
|
+
}
|
|
369
|
+
const encodeTimestamp = typeof BigInt !== "undefined" ? encodeAsString : hrTimeToNanoseconds;
|
|
370
|
+
function identity(value) {
|
|
371
|
+
return value;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Encoder for JSON format.
|
|
375
|
+
* Uses string timestamps, hex for span/trace IDs, and base64 for Uint8Array.
|
|
376
|
+
*/
|
|
377
|
+
const JSON_ENCODER = {
|
|
378
|
+
encodeHrTime: encodeTimestamp,
|
|
379
|
+
encodeSpanContext: identity,
|
|
380
|
+
encodeOptionalSpanContext: identity,
|
|
381
|
+
encodeUint8Array: (bytes) => {
|
|
382
|
+
if (typeof Buffer !== "undefined") return Buffer.from(bytes).toString("base64");
|
|
383
|
+
const chars = new Array(bytes.length);
|
|
384
|
+
for (let i = 0; i < bytes.length; i++) chars[i] = String.fromCharCode(bytes[i]);
|
|
385
|
+
return btoa(chars.join(""));
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
388
|
const JsonLogsSerializer = {
|
|
389
389
|
serializeRequest: (arg) => {
|
|
390
390
|
const request = createExportLogsServiceRequest(arg, JSON_ENCODER);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../packages/otlp-transformer/dist/index.js"],"sourcesContent":["//#region ../../../../node_modules/@opentelemetry/api/build/esm/version.js\nconst VERSION = \"1.9.1\";\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/internal/semver.js\nconst re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n* Create a function to test an API version to see if it is compatible with the provided ownVersion.\n*\n* The returned function has the following semantics:\n* - Exact match is always compatible\n* - Major versions must match exactly\n* - 1.x package cannot use global 2.x package\n* - 2.x package cannot use global 1.x package\n* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n* - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n* - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n* - Patch and build tag differences are not considered at this time\n*\n* @param ownVersion version which should be checked against\n*/\nfunction _makeCompatibilityCheck(ownVersion) {\n\tconst acceptedVersions = new Set([ownVersion]);\n\tconst rejectedVersions = /* @__PURE__ */ new Set();\n\tconst myVersionMatch = ownVersion.match(re);\n\tif (!myVersionMatch) return () => false;\n\tconst ownVersionParsed = {\n\t\tmajor: +myVersionMatch[1],\n\t\tminor: +myVersionMatch[2],\n\t\tpatch: +myVersionMatch[3],\n\t\tprerelease: myVersionMatch[4]\n\t};\n\tif (ownVersionParsed.prerelease != null) return function isExactmatch(globalVersion) {\n\t\treturn globalVersion === ownVersion;\n\t};\n\tfunction _reject(v) {\n\t\trejectedVersions.add(v);\n\t\treturn false;\n\t}\n\tfunction _accept(v) {\n\t\tacceptedVersions.add(v);\n\t\treturn true;\n\t}\n\treturn function isCompatible(globalVersion) {\n\t\tif (acceptedVersions.has(globalVersion)) return true;\n\t\tif (rejectedVersions.has(globalVersion)) return false;\n\t\tconst globalVersionMatch = globalVersion.match(re);\n\t\tif (!globalVersionMatch) return _reject(globalVersion);\n\t\tconst globalVersionParsed = {\n\t\t\tmajor: +globalVersionMatch[1],\n\t\t\tminor: +globalVersionMatch[2],\n\t\t\tpatch: +globalVersionMatch[3],\n\t\t\tprerelease: globalVersionMatch[4]\n\t\t};\n\t\tif (globalVersionParsed.prerelease != null) return _reject(globalVersion);\n\t\tif (ownVersionParsed.major !== globalVersionParsed.major) return _reject(globalVersion);\n\t\tif (ownVersionParsed.major === 0) {\n\t\t\tif (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) return _accept(globalVersion);\n\t\t\treturn _reject(globalVersion);\n\t\t}\n\t\tif (ownVersionParsed.minor <= globalVersionParsed.minor) return _accept(globalVersion);\n\t\treturn _reject(globalVersion);\n\t};\n}\n/**\n* Test an API version to see if it is compatible with this API.\n*\n* - Exact match is always compatible\n* - Major versions must match exactly\n* - 1.x package cannot use global 2.x package\n* - 2.x package cannot use global 1.x package\n* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n* - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n* - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n* - Patch and build tag differences are not considered at this time\n*\n* @param version version of the API requesting an instance of the global API\n*/\nconst isCompatible = _makeCompatibilityCheck(VERSION);\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/internal/global-utils.js\nconst major = VERSION.split(\".\")[0];\nconst GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);\nconst _global = typeof globalThis === \"object\" ? globalThis : typeof self === \"object\" ? self : typeof window === \"object\" ? window : typeof global === \"object\" ? global : {};\nfunction registerGlobal(type, instance, diag, allowOverride = false) {\n\tvar _a;\n\tconst api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : { version: VERSION };\n\tif (!allowOverride && api[type]) {\n\t\tconst err = /* @__PURE__ */ new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);\n\t\tdiag.error(err.stack || err.message);\n\t\treturn false;\n\t}\n\tif (api.version !== \"1.9.1\") {\n\t\tconst err = /* @__PURE__ */ new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`);\n\t\tdiag.error(err.stack || err.message);\n\t\treturn false;\n\t}\n\tapi[type] = instance;\n\tdiag.debug(`@opentelemetry/api: Registered a global for ${type} v${VERSION}.`);\n\treturn true;\n}\nfunction getGlobal(type) {\n\tvar _a, _b;\n\tconst globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n\tif (!globalVersion || !isCompatible(globalVersion)) return;\n\treturn (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nfunction unregisterGlobal(type, diag) {\n\tdiag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${VERSION}.`);\n\tconst api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n\tif (api) delete api[type];\n}\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js\n/**\n* Component Logger which is meant to be used as part of any component which\n* will add automatically additional namespace in front of the log message.\n* It will then forward all message to global diag logger\n* @example\n* const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n* cLogger.debug('test');\n* // @opentelemetry/instrumentation-http test\n*/\nvar DiagComponentLogger = class {\n\tconstructor(props) {\n\t\tthis._namespace = props.namespace || \"DiagComponentLogger\";\n\t}\n\tdebug(...args) {\n\t\treturn logProxy(\"debug\", this._namespace, args);\n\t}\n\terror(...args) {\n\t\treturn logProxy(\"error\", this._namespace, args);\n\t}\n\tinfo(...args) {\n\t\treturn logProxy(\"info\", this._namespace, args);\n\t}\n\twarn(...args) {\n\t\treturn logProxy(\"warn\", this._namespace, args);\n\t}\n\tverbose(...args) {\n\t\treturn logProxy(\"verbose\", this._namespace, args);\n\t}\n};\nfunction logProxy(funcName, namespace, args) {\n\tconst logger = getGlobal(\"diag\");\n\tif (!logger) return;\n\treturn logger[funcName](namespace, ...args);\n}\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag/types.js\n/**\n* Defines the available internal logging levels for the diagnostic logger, the numeric values\n* of the levels are defined to match the original values from the initial LogLevel to avoid\n* compatibility/migration issues for any implementation that assume the numeric ordering.\n*/\nvar DiagLogLevel;\n(function(DiagLogLevel) {\n\t/** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n\tDiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n\t/** Identifies an error scenario */\n\tDiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n\t/** Identifies a warning scenario */\n\tDiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n\t/** General informational log message */\n\tDiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n\t/** General debug log message */\n\tDiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n\t/**\n\t* Detailed trace level logging should only be used for development, should only be set\n\t* in a development environment.\n\t*/\n\tDiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n\t/** Used to set the logging level to include all logging */\n\tDiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel || (DiagLogLevel = {}));\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js\nfunction createLogLevelDiagLogger(maxLevel, logger) {\n\tif (maxLevel < DiagLogLevel.NONE) maxLevel = DiagLogLevel.NONE;\n\telse if (maxLevel > DiagLogLevel.ALL) maxLevel = DiagLogLevel.ALL;\n\tlogger = logger || {};\n\tfunction _filterFunc(funcName, theLevel) {\n\t\tconst theFunc = logger[funcName];\n\t\tif (typeof theFunc === \"function\" && maxLevel >= theLevel) return theFunc.bind(logger);\n\t\treturn function() {};\n\t}\n\treturn {\n\t\terror: _filterFunc(\"error\", DiagLogLevel.ERROR),\n\t\twarn: _filterFunc(\"warn\", DiagLogLevel.WARN),\n\t\tinfo: _filterFunc(\"info\", DiagLogLevel.INFO),\n\t\tdebug: _filterFunc(\"debug\", DiagLogLevel.DEBUG),\n\t\tverbose: _filterFunc(\"verbose\", DiagLogLevel.VERBOSE)\n\t};\n}\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/api/diag.js\nconst API_NAME = \"diag\";\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag-api.js\n/**\n* Entrypoint for Diag API.\n* Defines Diagnostic handler used for internal diagnostic logging operations.\n* The default provides a Noop DiagLogger implementation which may be changed via the\n* diag.setLogger(logger: DiagLogger) function.\n*\n* @since 1.0.0\n*/\nconst diag = class DiagAPI {\n\t/** Get the singleton instance of the DiagAPI API */\n\tstatic instance() {\n\t\tif (!this._instance) this._instance = new DiagAPI();\n\t\treturn this._instance;\n\t}\n\t/**\n\t* Private internal constructor\n\t* @private\n\t*/\n\tconstructor() {\n\t\tfunction _logProxy(funcName) {\n\t\t\treturn function(...args) {\n\t\t\t\tconst logger = getGlobal(\"diag\");\n\t\t\t\tif (!logger) return;\n\t\t\t\treturn logger[funcName](...args);\n\t\t\t};\n\t\t}\n\t\tconst self = this;\n\t\tconst setLogger = (logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {\n\t\t\tvar _a, _b, _c;\n\t\t\tif (logger === self) {\n\t\t\t\tconst err = /* @__PURE__ */ new Error(\"Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation\");\n\t\t\t\tself.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (typeof optionsOrLogLevel === \"number\") optionsOrLogLevel = { logLevel: optionsOrLogLevel };\n\t\t\tconst oldLogger = getGlobal(\"diag\");\n\t\t\tconst newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);\n\t\t\tif (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n\t\t\t\tconst stack = (_c = (/* @__PURE__ */ new Error()).stack) !== null && _c !== void 0 ? _c : \"<failed to generate stacktrace>\";\n\t\t\t\toldLogger.warn(`Current logger will be overwritten from ${stack}`);\n\t\t\t\tnewLogger.warn(`Current logger will overwrite one already registered from ${stack}`);\n\t\t\t}\n\t\t\treturn registerGlobal(\"diag\", newLogger, self, true);\n\t\t};\n\t\tself.setLogger = setLogger;\n\t\tself.disable = () => {\n\t\t\tunregisterGlobal(API_NAME, self);\n\t\t};\n\t\tself.createComponentLogger = (options) => {\n\t\t\treturn new DiagComponentLogger(options);\n\t\t};\n\t\tself.verbose = _logProxy(\"verbose\");\n\t\tself.debug = _logProxy(\"debug\");\n\t\tself.info = _logProxy(\"info\");\n\t\tself.warn = _logProxy(\"warn\");\n\t\tself.error = _logProxy(\"error\");\n\t}\n}.instance();\nconst SECOND_TO_NANOSECONDS = Math.pow(10, 9);\n/**\n* Convert hrTime to nanoseconds.\n* @param time\n*/\nfunction hrTimeToNanoseconds(time) {\n\treturn time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js\nfunction createResource(resource, encoder) {\n\tconst result = {\n\t\tattributes: toAttributes(resource.attributes, encoder),\n\t\tdroppedAttributesCount: 0\n\t};\n\tconst schemaUrl = resource.schemaUrl;\n\tif (schemaUrl && schemaUrl !== \"\") result.schemaUrl = schemaUrl;\n\treturn result;\n}\nfunction createInstrumentationScope(scope) {\n\treturn {\n\t\tname: scope.name,\n\t\tversion: scope.version\n\t};\n}\nfunction toAttributes(attributes, encoder) {\n\treturn Object.keys(attributes).map((key) => toKeyValue(key, attributes[key], encoder));\n}\nfunction toKeyValue(key, value, encoder) {\n\treturn {\n\t\tkey,\n\t\tvalue: toAnyValue(value, encoder)\n\t};\n}\nfunction toAnyValue(value, encoder) {\n\tconst t = typeof value;\n\tif (t === \"string\") return { stringValue: value };\n\tif (t === \"number\") {\n\t\tif (!Number.isInteger(value)) return { doubleValue: value };\n\t\treturn { intValue: value };\n\t}\n\tif (t === \"boolean\") return { boolValue: value };\n\tif (value instanceof Uint8Array) return { bytesValue: encoder.encodeUint8Array(value) };\n\tif (Array.isArray(value)) {\n\t\tconst values = new Array(value.length);\n\t\tfor (let i = 0; i < value.length; i++) values[i] = toAnyValue(value[i], encoder);\n\t\treturn { arrayValue: { values } };\n\t}\n\tif (t === \"object\" && value != null) {\n\t\tconst keys = Object.keys(value);\n\t\tconst values = new Array(keys.length);\n\t\tfor (let i = 0; i < keys.length; i++) values[i] = {\n\t\t\tkey: keys[i],\n\t\t\tvalue: toAnyValue(value[keys[i]], encoder)\n\t\t};\n\t\treturn { kvlistValue: { values } };\n\t}\n\treturn {};\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/common/utils.js\nfunction hrTimeToNanos(hrTime) {\n\tconst NANOSECONDS = BigInt(1e9);\n\treturn BigInt(Math.trunc(hrTime[0])) * NANOSECONDS + BigInt(Math.trunc(hrTime[1]));\n}\nfunction encodeAsString(hrTime) {\n\treturn hrTimeToNanos(hrTime).toString();\n}\nconst encodeTimestamp = typeof BigInt !== \"undefined\" ? encodeAsString : hrTimeToNanoseconds;\nfunction identity(value) {\n\treturn value;\n}\n/**\n* Encoder for JSON format.\n* Uses string timestamps, hex for span/trace IDs, and base64 for Uint8Array.\n*/\nconst JSON_ENCODER = {\n\tencodeHrTime: encodeTimestamp,\n\tencodeSpanContext: identity,\n\tencodeOptionalSpanContext: identity,\n\tencodeUint8Array: (bytes) => {\n\t\tif (typeof Buffer !== \"undefined\") return Buffer.from(bytes).toString(\"base64\");\n\t\tconst chars = new Array(bytes.length);\n\t\tfor (let i = 0; i < bytes.length; i++) chars[i] = String.fromCharCode(bytes[i]);\n\t\treturn btoa(chars.join(\"\"));\n\t}\n};\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.js\nfunction createExportLogsServiceRequest(logRecords, encoder) {\n\treturn { resourceLogs: logRecordsToResourceLogs(logRecords, encoder) };\n}\nfunction createResourceMap$1(logRecords) {\n\tconst resourceMap = /* @__PURE__ */ new Map();\n\tfor (const record of logRecords) {\n\t\tconst { resource, instrumentationScope: { name, version = \"\", schemaUrl = \"\" } } = record;\n\t\tlet ismMap = resourceMap.get(resource);\n\t\tif (!ismMap) {\n\t\t\tismMap = /* @__PURE__ */ new Map();\n\t\t\tresourceMap.set(resource, ismMap);\n\t\t}\n\t\tconst ismKey = `${name}@${version}:${schemaUrl}`;\n\t\tlet records = ismMap.get(ismKey);\n\t\tif (!records) {\n\t\t\trecords = [];\n\t\t\tismMap.set(ismKey, records);\n\t\t}\n\t\trecords.push(record);\n\t}\n\treturn resourceMap;\n}\nfunction logRecordsToResourceLogs(logRecords, encoder) {\n\tconst resourceMap = createResourceMap$1(logRecords);\n\treturn Array.from(resourceMap, ([resource, ismMap]) => {\n\t\tconst processedResource = createResource(resource, encoder);\n\t\treturn {\n\t\t\tresource: processedResource,\n\t\t\tscopeLogs: Array.from(ismMap, ([, scopeLogs]) => {\n\t\t\t\treturn {\n\t\t\t\t\tscope: createInstrumentationScope(scopeLogs[0].instrumentationScope),\n\t\t\t\t\tlogRecords: scopeLogs.map((log) => toLogRecord(log, encoder)),\n\t\t\t\t\tschemaUrl: scopeLogs[0].instrumentationScope.schemaUrl\n\t\t\t\t};\n\t\t\t}),\n\t\t\tschemaUrl: processedResource.schemaUrl\n\t\t};\n\t});\n}\nfunction toLogRecord(log, encoder) {\n\treturn {\n\t\ttimeUnixNano: encoder.encodeHrTime(log.hrTime),\n\t\tobservedTimeUnixNano: encoder.encodeHrTime(log.hrTimeObserved),\n\t\tseverityNumber: toSeverityNumber(log.severityNumber),\n\t\tseverityText: log.severityText,\n\t\tbody: toAnyValue(log.body, encoder),\n\t\teventName: log.eventName,\n\t\tattributes: toLogAttributes(log.attributes, encoder),\n\t\tdroppedAttributesCount: log.droppedAttributesCount,\n\t\tflags: log.spanContext?.traceFlags,\n\t\ttraceId: encoder.encodeOptionalSpanContext(log.spanContext?.traceId),\n\t\tspanId: encoder.encodeOptionalSpanContext(log.spanContext?.spanId)\n\t};\n}\nfunction toSeverityNumber(severityNumber) {\n\treturn severityNumber;\n}\nfunction toLogAttributes(attributes, encoder) {\n\treturn Object.keys(attributes).map((key) => toKeyValue(key, attributes[key], encoder));\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/logs/json/logs.js\nconst JsonLogsSerializer = {\n\tserializeRequest: (arg) => {\n\t\tconst request = createExportLogsServiceRequest(arg, JSON_ENCODER);\n\t\treturn new TextEncoder().encode(JSON.stringify(request));\n\t},\n\tdeserializeResponse: (arg) => {\n\t\tif (arg.length === 0) return {};\n\t\tconst decoder = new TextDecoder();\n\t\ttry {\n\t\t\treturn JSON.parse(decoder.decode(arg));\n\t\t} catch (err) {\n\t\t\tdiag.warn(`Failed to parse logs export response: ${err.message}. Returning empty response`);\n\t\t\treturn {};\n\t\t}\n\t}\n};\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js\nconst SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK = 256;\nconst SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK = 512;\n/**\n* Builds the 32-bit span flags value combining the low 8-bit W3C TraceFlags\n* with the HAS_IS_REMOTE and IS_REMOTE bits according to the OTLP spec.\n*/\nfunction buildSpanFlagsFrom(traceFlags, isRemote) {\n\tlet flags = traceFlags & 255 | SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK;\n\tif (isRemote) flags |= SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK;\n\treturn flags;\n}\nfunction sdkSpanToOtlpSpan(span, encoder) {\n\tconst ctx = span.spanContext();\n\tconst status = span.status;\n\tconst parentSpanId = span.parentSpanContext?.spanId ? encoder.encodeSpanContext(span.parentSpanContext?.spanId) : void 0;\n\treturn {\n\t\ttraceId: encoder.encodeSpanContext(ctx.traceId),\n\t\tspanId: encoder.encodeSpanContext(ctx.spanId),\n\t\tparentSpanId,\n\t\ttraceState: ctx.traceState?.serialize(),\n\t\tname: span.name,\n\t\tkind: span.kind == null ? 0 : span.kind + 1,\n\t\tstartTimeUnixNano: encoder.encodeHrTime(span.startTime),\n\t\tendTimeUnixNano: encoder.encodeHrTime(span.endTime),\n\t\tattributes: toAttributes(span.attributes, encoder),\n\t\tdroppedAttributesCount: span.droppedAttributesCount,\n\t\tevents: span.events.map((event) => toOtlpSpanEvent(event, encoder)),\n\t\tdroppedEventsCount: span.droppedEventsCount,\n\t\tstatus: {\n\t\t\tcode: status.code,\n\t\t\tmessage: status.message\n\t\t},\n\t\tlinks: span.links.map((link) => toOtlpLink(link, encoder)),\n\t\tdroppedLinksCount: span.droppedLinksCount,\n\t\tflags: buildSpanFlagsFrom(ctx.traceFlags, span.parentSpanContext?.isRemote)\n\t};\n}\nfunction toOtlpLink(link, encoder) {\n\treturn {\n\t\tattributes: link.attributes ? toAttributes(link.attributes, encoder) : [],\n\t\tspanId: encoder.encodeSpanContext(link.context.spanId),\n\t\ttraceId: encoder.encodeSpanContext(link.context.traceId),\n\t\ttraceState: link.context.traceState?.serialize(),\n\t\tdroppedAttributesCount: link.droppedAttributesCount || 0,\n\t\tflags: buildSpanFlagsFrom(link.context.traceFlags, link.context.isRemote)\n\t};\n}\nfunction toOtlpSpanEvent(timedEvent, encoder) {\n\treturn {\n\t\tattributes: timedEvent.attributes ? toAttributes(timedEvent.attributes, encoder) : [],\n\t\tname: timedEvent.name,\n\t\ttimeUnixNano: encoder.encodeHrTime(timedEvent.time),\n\t\tdroppedAttributesCount: timedEvent.droppedAttributesCount || 0\n\t};\n}\nfunction createExportTraceServiceRequest(spans, encoder) {\n\treturn { resourceSpans: spanRecordsToResourceSpans(spans, encoder) };\n}\nfunction createResourceMap(readableSpans) {\n\tconst resourceMap = /* @__PURE__ */ new Map();\n\tfor (const record of readableSpans) {\n\t\tlet ilsMap = resourceMap.get(record.resource);\n\t\tif (!ilsMap) {\n\t\t\tilsMap = /* @__PURE__ */ new Map();\n\t\t\tresourceMap.set(record.resource, ilsMap);\n\t\t}\n\t\tconst instrumentationScopeKey = `${record.instrumentationScope.name}@${record.instrumentationScope.version || \"\"}:${record.instrumentationScope.schemaUrl || \"\"}`;\n\t\tlet records = ilsMap.get(instrumentationScopeKey);\n\t\tif (!records) {\n\t\t\trecords = [];\n\t\t\tilsMap.set(instrumentationScopeKey, records);\n\t\t}\n\t\trecords.push(record);\n\t}\n\treturn resourceMap;\n}\nfunction spanRecordsToResourceSpans(readableSpans, encoder) {\n\tconst resourceMap = createResourceMap(readableSpans);\n\tconst out = [];\n\tconst entryIterator = resourceMap.entries();\n\tlet entry = entryIterator.next();\n\twhile (!entry.done) {\n\t\tconst [resource, ilmMap] = entry.value;\n\t\tconst scopeResourceSpans = [];\n\t\tconst ilmIterator = ilmMap.values();\n\t\tlet ilmEntry = ilmIterator.next();\n\t\twhile (!ilmEntry.done) {\n\t\t\tconst scopeSpans = ilmEntry.value;\n\t\t\tif (scopeSpans.length > 0) {\n\t\t\t\tconst spans = scopeSpans.map((readableSpan) => sdkSpanToOtlpSpan(readableSpan, encoder));\n\t\t\t\tscopeResourceSpans.push({\n\t\t\t\t\tscope: createInstrumentationScope(scopeSpans[0].instrumentationScope),\n\t\t\t\t\tspans,\n\t\t\t\t\tschemaUrl: scopeSpans[0].instrumentationScope.schemaUrl\n\t\t\t\t});\n\t\t\t}\n\t\t\tilmEntry = ilmIterator.next();\n\t\t}\n\t\tconst processedResource = createResource(resource, encoder);\n\t\tconst transformedSpans = {\n\t\t\tresource: processedResource,\n\t\t\tscopeSpans: scopeResourceSpans,\n\t\t\tschemaUrl: processedResource.schemaUrl\n\t\t};\n\t\tout.push(transformedSpans);\n\t\tentry = entryIterator.next();\n\t}\n\treturn out;\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/json/trace.js\nconst JsonTraceSerializer = {\n\tserializeRequest: (arg) => {\n\t\tconst request = createExportTraceServiceRequest(arg, JSON_ENCODER);\n\t\treturn new TextEncoder().encode(JSON.stringify(request));\n\t},\n\tdeserializeResponse: (arg) => {\n\t\tif (arg.length === 0) return {};\n\t\tconst decoder = new TextDecoder();\n\t\ttry {\n\t\t\treturn JSON.parse(decoder.decode(arg));\n\t\t} catch (err) {\n\t\t\tdiag.warn(`Failed to parse trace export response: ${err.message}. Returning empty response`);\n\t\t\treturn {};\n\t\t}\n\t}\n};\n//#endregion\nexport { JsonLogsSerializer, JsonTraceSerializer };\n\n//# sourceMappingURL=index.js.map"],"mappings":";AACA,MAAM,UAAU;AAGhB,MAAM,KAAK;;;;;;;;;;;;;;;;;AAiBX,SAAS,wBAAwB,YAAY;CAC5C,MAAM,mBAAmB,IAAI,IAAI,CAAC,WAAW,CAAC;CAC9C,MAAM,mCAAmC,IAAI,KAAK;CAClD,MAAM,iBAAiB,WAAW,MAAM,GAAG;AAC3C,KAAI,CAAC,eAAgB,cAAa;CAClC,MAAM,mBAAmB;EACxB,OAAO,CAAC,eAAe;EACvB,OAAO,CAAC,eAAe;EACvB,OAAO,CAAC,eAAe;EACvB,YAAY,eAAe;EAC3B;AACD,KAAI,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AU,MAAM;EACjC,MAAM,qBAAqB,EAAE;EAC7B,MAAM,cAAc,OAAO,QAAQ;EACnC,IAAI,WAAW,YAAY,MAAM;AACjC,SAAO,CAAC,SAAS,MAAM;GACtB,MAAM,aAAa,SAAS;AAC5B,OAAI,WAAW,SAAS,GAAG;IAC1B,MAAM,QAAQ,WAAW,KAAK,iBAAiB,kBAAkB,cAAc,QAAQ,CAAC;AACxF,uBAAmB,KAAK;KACvB,OAAO,2BAA2B,WAAW,GAAG,qBAAqB;KACrE;KACA,WAAW,WAAW,GAAG,qBAAqB;KAC9C,CAAC;;AAEH,cAAW,YAAY,MAAM;;EAE9B,MAAM,oBAAoB,eAAe,UAAU,QAAQ;EAC3D,MAAM,mBAAmB;GACxB,UAAU;GACV,YAAY;GACZ,WAAW,kBAAkB;GAC7B;AACD,MAAI,KAAK,iBAAiB;AAC1B,UAAQ,cAAc,MAAM;;AAE7B,QAAO;;AAIR,MAAM,sBAAsB;CAC3B,mBAAmB,QAAQ;EAC1B,MAAM,UAAU,gCAAgC,KAAK,aAAa;AAClE,SAAO,IAAI,aAAa,CAAC,OAAO,KAAK,UAAU,QAAQ,CAAC;;CAEzD,sBAAsB,QAAQ;AAC7B,MAAI,IAAI,WAAW,EAAG,QAAO,EAAE;EAC/B,MAAM,UAAU,IAAI,aAAa;AACjC,MAAI;AACH,UAAO,KAAK,MAAM,QAAQ,OAAO,IAAI,CAAC;WAC9B,KAAK;AACb,QAAK,KAAK,0CAA0C,IAAI,QAAQ,4BAA4B;AAC5F,UAAO,EAAE;;;CAGX"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../packages/otlp-transformer/dist/index.js"],"sourcesContent":["//#region ../../../../node_modules/@opentelemetry/api/build/esm/version.js\nconst VERSION = \"1.9.1\";\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/internal/semver.js\nconst re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n* Create a function to test an API version to see if it is compatible with the provided ownVersion.\n*\n* The returned function has the following semantics:\n* - Exact match is always compatible\n* - Major versions must match exactly\n* - 1.x package cannot use global 2.x package\n* - 2.x package cannot use global 1.x package\n* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n* - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n* - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n* - Patch and build tag differences are not considered at this time\n*\n* @param ownVersion version which should be checked against\n*/\nfunction _makeCompatibilityCheck(ownVersion) {\n\tconst acceptedVersions = new Set([ownVersion]);\n\tconst rejectedVersions = /* @__PURE__ */ new Set();\n\tconst myVersionMatch = ownVersion.match(re);\n\tif (!myVersionMatch) return () => false;\n\tconst ownVersionParsed = {\n\t\tmajor: +myVersionMatch[1],\n\t\tminor: +myVersionMatch[2],\n\t\tpatch: +myVersionMatch[3],\n\t\tprerelease: myVersionMatch[4]\n\t};\n\tif (ownVersionParsed.prerelease != null) return function isExactmatch(globalVersion) {\n\t\treturn globalVersion === ownVersion;\n\t};\n\tfunction _reject(v) {\n\t\trejectedVersions.add(v);\n\t\treturn false;\n\t}\n\tfunction _accept(v) {\n\t\tacceptedVersions.add(v);\n\t\treturn true;\n\t}\n\treturn function isCompatible(globalVersion) {\n\t\tif (acceptedVersions.has(globalVersion)) return true;\n\t\tif (rejectedVersions.has(globalVersion)) return false;\n\t\tconst globalVersionMatch = globalVersion.match(re);\n\t\tif (!globalVersionMatch) return _reject(globalVersion);\n\t\tconst globalVersionParsed = {\n\t\t\tmajor: +globalVersionMatch[1],\n\t\t\tminor: +globalVersionMatch[2],\n\t\t\tpatch: +globalVersionMatch[3],\n\t\t\tprerelease: globalVersionMatch[4]\n\t\t};\n\t\tif (globalVersionParsed.prerelease != null) return _reject(globalVersion);\n\t\tif (ownVersionParsed.major !== globalVersionParsed.major) return _reject(globalVersion);\n\t\tif (ownVersionParsed.major === 0) {\n\t\t\tif (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) return _accept(globalVersion);\n\t\t\treturn _reject(globalVersion);\n\t\t}\n\t\tif (ownVersionParsed.minor <= globalVersionParsed.minor) return _accept(globalVersion);\n\t\treturn _reject(globalVersion);\n\t};\n}\n/**\n* Test an API version to see if it is compatible with this API.\n*\n* - Exact match is always compatible\n* - Major versions must match exactly\n* - 1.x package cannot use global 2.x package\n* - 2.x package cannot use global 1.x package\n* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n* - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n* - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n* - Patch and build tag differences are not considered at this time\n*\n* @param version version of the API requesting an instance of the global API\n*/\nconst isCompatible = _makeCompatibilityCheck(VERSION);\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/internal/global-utils.js\nconst major = VERSION.split(\".\")[0];\nconst GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);\nconst _global = typeof globalThis === \"object\" ? globalThis : typeof self === \"object\" ? self : typeof window === \"object\" ? window : typeof global === \"object\" ? global : {};\nfunction registerGlobal(type, instance, diag, allowOverride = false) {\n\tvar _a;\n\tconst api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : { version: VERSION };\n\tif (!allowOverride && api[type]) {\n\t\tconst err = /* @__PURE__ */ new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);\n\t\tdiag.error(err.stack || err.message);\n\t\treturn false;\n\t}\n\tif (api.version !== \"1.9.1\") {\n\t\tconst err = /* @__PURE__ */ new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`);\n\t\tdiag.error(err.stack || err.message);\n\t\treturn false;\n\t}\n\tapi[type] = instance;\n\tdiag.debug(`@opentelemetry/api: Registered a global for ${type} v${VERSION}.`);\n\treturn true;\n}\nfunction getGlobal(type) {\n\tvar _a, _b;\n\tconst globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n\tif (!globalVersion || !isCompatible(globalVersion)) return;\n\treturn (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nfunction unregisterGlobal(type, diag) {\n\tdiag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${VERSION}.`);\n\tconst api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n\tif (api) delete api[type];\n}\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js\n/**\n* Component Logger which is meant to be used as part of any component which\n* will add automatically additional namespace in front of the log message.\n* It will then forward all message to global diag logger\n* @example\n* const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n* cLogger.debug('test');\n* // @opentelemetry/instrumentation-http test\n*/\nvar DiagComponentLogger = class {\n\tconstructor(props) {\n\t\tthis._namespace = props.namespace || \"DiagComponentLogger\";\n\t}\n\tdebug(...args) {\n\t\treturn logProxy(\"debug\", this._namespace, args);\n\t}\n\terror(...args) {\n\t\treturn logProxy(\"error\", this._namespace, args);\n\t}\n\tinfo(...args) {\n\t\treturn logProxy(\"info\", this._namespace, args);\n\t}\n\twarn(...args) {\n\t\treturn logProxy(\"warn\", this._namespace, args);\n\t}\n\tverbose(...args) {\n\t\treturn logProxy(\"verbose\", this._namespace, args);\n\t}\n};\nfunction logProxy(funcName, namespace, args) {\n\tconst logger = getGlobal(\"diag\");\n\tif (!logger) return;\n\treturn logger[funcName](namespace, ...args);\n}\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag/types.js\n/**\n* Defines the available internal logging levels for the diagnostic logger, the numeric values\n* of the levels are defined to match the original values from the initial LogLevel to avoid\n* compatibility/migration issues for any implementation that assume the numeric ordering.\n*/\nvar DiagLogLevel;\n(function(DiagLogLevel) {\n\t/** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n\tDiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n\t/** Identifies an error scenario */\n\tDiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n\t/** Identifies a warning scenario */\n\tDiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n\t/** General informational log message */\n\tDiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n\t/** General debug log message */\n\tDiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n\t/**\n\t* Detailed trace level logging should only be used for development, should only be set\n\t* in a development environment.\n\t*/\n\tDiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n\t/** Used to set the logging level to include all logging */\n\tDiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel || (DiagLogLevel = {}));\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js\nfunction createLogLevelDiagLogger(maxLevel, logger) {\n\tif (maxLevel < DiagLogLevel.NONE) maxLevel = DiagLogLevel.NONE;\n\telse if (maxLevel > DiagLogLevel.ALL) maxLevel = DiagLogLevel.ALL;\n\tlogger = logger || {};\n\tfunction _filterFunc(funcName, theLevel) {\n\t\tconst theFunc = logger[funcName];\n\t\tif (typeof theFunc === \"function\" && maxLevel >= theLevel) return theFunc.bind(logger);\n\t\treturn function() {};\n\t}\n\treturn {\n\t\terror: _filterFunc(\"error\", DiagLogLevel.ERROR),\n\t\twarn: _filterFunc(\"warn\", DiagLogLevel.WARN),\n\t\tinfo: _filterFunc(\"info\", DiagLogLevel.INFO),\n\t\tdebug: _filterFunc(\"debug\", DiagLogLevel.DEBUG),\n\t\tverbose: _filterFunc(\"verbose\", DiagLogLevel.VERBOSE)\n\t};\n}\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/api/diag.js\nconst API_NAME = \"diag\";\n//#endregion\n//#region ../../../../node_modules/@opentelemetry/api/build/esm/diag-api.js\n/**\n* Entrypoint for Diag API.\n* Defines Diagnostic handler used for internal diagnostic logging operations.\n* The default provides a Noop DiagLogger implementation which may be changed via the\n* diag.setLogger(logger: DiagLogger) function.\n*\n* @since 1.0.0\n*/\nconst diag = class DiagAPI {\n\t/** Get the singleton instance of the DiagAPI API */\n\tstatic instance() {\n\t\tif (!this._instance) this._instance = new DiagAPI();\n\t\treturn this._instance;\n\t}\n\t/**\n\t* Private internal constructor\n\t* @private\n\t*/\n\tconstructor() {\n\t\tfunction _logProxy(funcName) {\n\t\t\treturn function(...args) {\n\t\t\t\tconst logger = getGlobal(\"diag\");\n\t\t\t\tif (!logger) return;\n\t\t\t\treturn logger[funcName](...args);\n\t\t\t};\n\t\t}\n\t\tconst self = this;\n\t\tconst setLogger = (logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {\n\t\t\tvar _a, _b, _c;\n\t\t\tif (logger === self) {\n\t\t\t\tconst err = /* @__PURE__ */ new Error(\"Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation\");\n\t\t\t\tself.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (typeof optionsOrLogLevel === \"number\") optionsOrLogLevel = { logLevel: optionsOrLogLevel };\n\t\t\tconst oldLogger = getGlobal(\"diag\");\n\t\t\tconst newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);\n\t\t\tif (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n\t\t\t\tconst stack = (_c = (/* @__PURE__ */ new Error()).stack) !== null && _c !== void 0 ? _c : \"<failed to generate stacktrace>\";\n\t\t\t\toldLogger.warn(`Current logger will be overwritten from ${stack}`);\n\t\t\t\tnewLogger.warn(`Current logger will overwrite one already registered from ${stack}`);\n\t\t\t}\n\t\t\treturn registerGlobal(\"diag\", newLogger, self, true);\n\t\t};\n\t\tself.setLogger = setLogger;\n\t\tself.disable = () => {\n\t\t\tunregisterGlobal(API_NAME, self);\n\t\t};\n\t\tself.createComponentLogger = (options) => {\n\t\t\treturn new DiagComponentLogger(options);\n\t\t};\n\t\tself.verbose = _logProxy(\"verbose\");\n\t\tself.debug = _logProxy(\"debug\");\n\t\tself.info = _logProxy(\"info\");\n\t\tself.warn = _logProxy(\"warn\");\n\t\tself.error = _logProxy(\"error\");\n\t}\n}.instance();\nconst SECOND_TO_NANOSECONDS = Math.pow(10, 9);\n/**\n* Convert hrTime to nanoseconds.\n* @param time\n*/\nfunction hrTimeToNanoseconds(time) {\n\treturn time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js\nfunction createResource(resource, encoder) {\n\tconst result = {\n\t\tattributes: toAttributes(resource.attributes, encoder),\n\t\tdroppedAttributesCount: 0\n\t};\n\tconst schemaUrl = resource.schemaUrl;\n\tif (schemaUrl && schemaUrl !== \"\") result.schemaUrl = schemaUrl;\n\treturn result;\n}\nfunction createInstrumentationScope(scope) {\n\treturn {\n\t\tname: scope.name,\n\t\tversion: scope.version\n\t};\n}\nfunction toAttributes(attributes, encoder) {\n\treturn Object.keys(attributes).map((key) => toKeyValue(key, attributes[key], encoder));\n}\nfunction toKeyValue(key, value, encoder) {\n\treturn {\n\t\tkey,\n\t\tvalue: toAnyValue(value, encoder)\n\t};\n}\nfunction toAnyValue(value, encoder) {\n\tconst t = typeof value;\n\tif (t === \"string\") return { stringValue: value };\n\tif (t === \"number\") {\n\t\tif (!Number.isInteger(value)) return { doubleValue: value };\n\t\treturn { intValue: value };\n\t}\n\tif (t === \"boolean\") return { boolValue: value };\n\tif (value instanceof Uint8Array) return { bytesValue: encoder.encodeUint8Array(value) };\n\tif (Array.isArray(value)) {\n\t\tconst values = new Array(value.length);\n\t\tfor (let i = 0; i < value.length; i++) values[i] = toAnyValue(value[i], encoder);\n\t\treturn { arrayValue: { values } };\n\t}\n\tif (t === \"object\" && value != null) {\n\t\tconst keys = Object.keys(value);\n\t\tconst values = new Array(keys.length);\n\t\tfor (let i = 0; i < keys.length; i++) values[i] = {\n\t\t\tkey: keys[i],\n\t\t\tvalue: toAnyValue(value[keys[i]], encoder)\n\t\t};\n\t\treturn { kvlistValue: { values } };\n\t}\n\treturn {};\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.js\nfunction createExportLogsServiceRequest(logRecords, encoder) {\n\treturn { resourceLogs: logRecordsToResourceLogs(logRecords, encoder) };\n}\nfunction createResourceMap$1(logRecords) {\n\tconst resourceMap = /* @__PURE__ */ new Map();\n\tfor (const record of logRecords) {\n\t\tconst { resource, instrumentationScope: { name, version = \"\", schemaUrl = \"\" } } = record;\n\t\tlet ismMap = resourceMap.get(resource);\n\t\tif (!ismMap) {\n\t\t\tismMap = /* @__PURE__ */ new Map();\n\t\t\tresourceMap.set(resource, ismMap);\n\t\t}\n\t\tconst ismKey = `${name}@${version}:${schemaUrl}`;\n\t\tlet records = ismMap.get(ismKey);\n\t\tif (!records) {\n\t\t\trecords = [];\n\t\t\tismMap.set(ismKey, records);\n\t\t}\n\t\trecords.push(record);\n\t}\n\treturn resourceMap;\n}\nfunction logRecordsToResourceLogs(logRecords, encoder) {\n\tconst resourceMap = createResourceMap$1(logRecords);\n\treturn Array.from(resourceMap, ([resource, ismMap]) => {\n\t\tconst processedResource = createResource(resource, encoder);\n\t\treturn {\n\t\t\tresource: processedResource,\n\t\t\tscopeLogs: Array.from(ismMap, ([, scopeLogs]) => {\n\t\t\t\treturn {\n\t\t\t\t\tscope: createInstrumentationScope(scopeLogs[0].instrumentationScope),\n\t\t\t\t\tlogRecords: scopeLogs.map((log) => toLogRecord(log, encoder)),\n\t\t\t\t\tschemaUrl: scopeLogs[0].instrumentationScope.schemaUrl\n\t\t\t\t};\n\t\t\t}),\n\t\t\tschemaUrl: processedResource.schemaUrl\n\t\t};\n\t});\n}\nfunction toLogRecord(log, encoder) {\n\treturn {\n\t\ttimeUnixNano: encoder.encodeHrTime(log.hrTime),\n\t\tobservedTimeUnixNano: encoder.encodeHrTime(log.hrTimeObserved),\n\t\tseverityNumber: toSeverityNumber(log.severityNumber),\n\t\tseverityText: log.severityText,\n\t\tbody: toAnyValue(log.body, encoder),\n\t\teventName: log.eventName,\n\t\tattributes: toLogAttributes(log.attributes, encoder),\n\t\tdroppedAttributesCount: log.droppedAttributesCount,\n\t\tflags: log.spanContext?.traceFlags,\n\t\ttraceId: encoder.encodeOptionalSpanContext(log.spanContext?.traceId),\n\t\tspanId: encoder.encodeOptionalSpanContext(log.spanContext?.spanId)\n\t};\n}\nfunction toSeverityNumber(severityNumber) {\n\treturn severityNumber;\n}\nfunction toLogAttributes(attributes, encoder) {\n\treturn Object.keys(attributes).map((key) => toKeyValue(key, attributes[key], encoder));\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/common/utils.js\nfunction hrTimeToNanos(hrTime) {\n\tconst NANOSECONDS = BigInt(1e9);\n\treturn BigInt(Math.trunc(hrTime[0])) * NANOSECONDS + BigInt(Math.trunc(hrTime[1]));\n}\nfunction encodeAsString(hrTime) {\n\treturn hrTimeToNanos(hrTime).toString();\n}\nconst encodeTimestamp = typeof BigInt !== \"undefined\" ? encodeAsString : hrTimeToNanoseconds;\nfunction identity(value) {\n\treturn value;\n}\n/**\n* Encoder for JSON format.\n* Uses string timestamps, hex for span/trace IDs, and base64 for Uint8Array.\n*/\nconst JSON_ENCODER = {\n\tencodeHrTime: encodeTimestamp,\n\tencodeSpanContext: identity,\n\tencodeOptionalSpanContext: identity,\n\tencodeUint8Array: (bytes) => {\n\t\tif (typeof Buffer !== \"undefined\") return Buffer.from(bytes).toString(\"base64\");\n\t\tconst chars = new Array(bytes.length);\n\t\tfor (let i = 0; i < bytes.length; i++) chars[i] = String.fromCharCode(bytes[i]);\n\t\treturn btoa(chars.join(\"\"));\n\t}\n};\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/logs/json/logs.js\nconst JsonLogsSerializer = {\n\tserializeRequest: (arg) => {\n\t\tconst request = createExportLogsServiceRequest(arg, JSON_ENCODER);\n\t\treturn new TextEncoder().encode(JSON.stringify(request));\n\t},\n\tdeserializeResponse: (arg) => {\n\t\tif (arg.length === 0) return {};\n\t\tconst decoder = new TextDecoder();\n\t\ttry {\n\t\t\treturn JSON.parse(decoder.decode(arg));\n\t\t} catch (err) {\n\t\t\tdiag.warn(`Failed to parse logs export response: ${err.message}. Returning empty response`);\n\t\t\treturn {};\n\t\t}\n\t}\n};\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js\nconst SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK = 256;\nconst SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK = 512;\n/**\n* Builds the 32-bit span flags value combining the low 8-bit W3C TraceFlags\n* with the HAS_IS_REMOTE and IS_REMOTE bits according to the OTLP spec.\n*/\nfunction buildSpanFlagsFrom(traceFlags, isRemote) {\n\tlet flags = traceFlags & 255 | SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK;\n\tif (isRemote) flags |= SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK;\n\treturn flags;\n}\nfunction sdkSpanToOtlpSpan(span, encoder) {\n\tconst ctx = span.spanContext();\n\tconst status = span.status;\n\tconst parentSpanId = span.parentSpanContext?.spanId ? encoder.encodeSpanContext(span.parentSpanContext?.spanId) : void 0;\n\treturn {\n\t\ttraceId: encoder.encodeSpanContext(ctx.traceId),\n\t\tspanId: encoder.encodeSpanContext(ctx.spanId),\n\t\tparentSpanId,\n\t\ttraceState: ctx.traceState?.serialize(),\n\t\tname: span.name,\n\t\tkind: span.kind == null ? 0 : span.kind + 1,\n\t\tstartTimeUnixNano: encoder.encodeHrTime(span.startTime),\n\t\tendTimeUnixNano: encoder.encodeHrTime(span.endTime),\n\t\tattributes: toAttributes(span.attributes, encoder),\n\t\tdroppedAttributesCount: span.droppedAttributesCount,\n\t\tevents: span.events.map((event) => toOtlpSpanEvent(event, encoder)),\n\t\tdroppedEventsCount: span.droppedEventsCount,\n\t\tstatus: {\n\t\t\tcode: status.code,\n\t\t\tmessage: status.message\n\t\t},\n\t\tlinks: span.links.map((link) => toOtlpLink(link, encoder)),\n\t\tdroppedLinksCount: span.droppedLinksCount,\n\t\tflags: buildSpanFlagsFrom(ctx.traceFlags, span.parentSpanContext?.isRemote)\n\t};\n}\nfunction toOtlpLink(link, encoder) {\n\treturn {\n\t\tattributes: link.attributes ? toAttributes(link.attributes, encoder) : [],\n\t\tspanId: encoder.encodeSpanContext(link.context.spanId),\n\t\ttraceId: encoder.encodeSpanContext(link.context.traceId),\n\t\ttraceState: link.context.traceState?.serialize(),\n\t\tdroppedAttributesCount: link.droppedAttributesCount || 0,\n\t\tflags: buildSpanFlagsFrom(link.context.traceFlags, link.context.isRemote)\n\t};\n}\nfunction toOtlpSpanEvent(timedEvent, encoder) {\n\treturn {\n\t\tattributes: timedEvent.attributes ? toAttributes(timedEvent.attributes, encoder) : [],\n\t\tname: timedEvent.name,\n\t\ttimeUnixNano: encoder.encodeHrTime(timedEvent.time),\n\t\tdroppedAttributesCount: timedEvent.droppedAttributesCount || 0\n\t};\n}\nfunction createExportTraceServiceRequest(spans, encoder) {\n\treturn { resourceSpans: spanRecordsToResourceSpans(spans, encoder) };\n}\nfunction createResourceMap(readableSpans) {\n\tconst resourceMap = /* @__PURE__ */ new Map();\n\tfor (const record of readableSpans) {\n\t\tlet ilsMap = resourceMap.get(record.resource);\n\t\tif (!ilsMap) {\n\t\t\tilsMap = /* @__PURE__ */ new Map();\n\t\t\tresourceMap.set(record.resource, ilsMap);\n\t\t}\n\t\tconst instrumentationScopeKey = `${record.instrumentationScope.name}@${record.instrumentationScope.version || \"\"}:${record.instrumentationScope.schemaUrl || \"\"}`;\n\t\tlet records = ilsMap.get(instrumentationScopeKey);\n\t\tif (!records) {\n\t\t\trecords = [];\n\t\t\tilsMap.set(instrumentationScopeKey, records);\n\t\t}\n\t\trecords.push(record);\n\t}\n\treturn resourceMap;\n}\nfunction spanRecordsToResourceSpans(readableSpans, encoder) {\n\tconst resourceMap = createResourceMap(readableSpans);\n\tconst out = [];\n\tconst entryIterator = resourceMap.entries();\n\tlet entry = entryIterator.next();\n\twhile (!entry.done) {\n\t\tconst [resource, ilmMap] = entry.value;\n\t\tconst scopeResourceSpans = [];\n\t\tconst ilmIterator = ilmMap.values();\n\t\tlet ilmEntry = ilmIterator.next();\n\t\twhile (!ilmEntry.done) {\n\t\t\tconst scopeSpans = ilmEntry.value;\n\t\t\tif (scopeSpans.length > 0) {\n\t\t\t\tconst spans = scopeSpans.map((readableSpan) => sdkSpanToOtlpSpan(readableSpan, encoder));\n\t\t\t\tscopeResourceSpans.push({\n\t\t\t\t\tscope: createInstrumentationScope(scopeSpans[0].instrumentationScope),\n\t\t\t\t\tspans,\n\t\t\t\t\tschemaUrl: scopeSpans[0].instrumentationScope.schemaUrl\n\t\t\t\t});\n\t\t\t}\n\t\t\tilmEntry = ilmIterator.next();\n\t\t}\n\t\tconst processedResource = createResource(resource, encoder);\n\t\tconst transformedSpans = {\n\t\t\tresource: processedResource,\n\t\t\tscopeSpans: scopeResourceSpans,\n\t\t\tschemaUrl: processedResource.schemaUrl\n\t\t};\n\t\tout.push(transformedSpans);\n\t\tentry = entryIterator.next();\n\t}\n\treturn out;\n}\n//#endregion\n//#region ../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/json/trace.js\nconst JsonTraceSerializer = {\n\tserializeRequest: (arg) => {\n\t\tconst request = createExportTraceServiceRequest(arg, JSON_ENCODER);\n\t\treturn new TextEncoder().encode(JSON.stringify(request));\n\t},\n\tdeserializeResponse: (arg) => {\n\t\tif (arg.length === 0) return {};\n\t\tconst decoder = new TextDecoder();\n\t\ttry {\n\t\t\treturn JSON.parse(decoder.decode(arg));\n\t\t} catch (err) {\n\t\t\tdiag.warn(`Failed to parse trace export response: ${err.message}. Returning empty response`);\n\t\t\treturn {};\n\t\t}\n\t}\n};\n//#endregion\nexport { JsonLogsSerializer, JsonTraceSerializer };\n\n//# sourceMappingURL=index.js.map"],"mappings":";AACA,MAAM,UAAU;AAGhB,MAAM,KAAK;;;;;;;;;;;;;;;;;AAiBX,SAAS,wBAAwB,YAAY;CAC5C,MAAM,mBAAmB,IAAI,IAAI,CAAC,WAAW,CAAC;CAC9C,MAAM,mCAAmC,IAAI,KAAK;CAClD,MAAM,iBAAiB,WAAW,MAAM,GAAG;AAC3C,KAAI,CAAC,eAAgB,cAAa;CAClC,MAAM,mBAAmB;EACxB,OAAO,CAAC,eAAe;EACvB,OAAO,CAAC,eAAe;EACvB,OAAO,CAAC,eAAe;EACvB,YAAY,eAAe;EAC3B;AACD,KAAI,iBAAiB,cAAc,KAAM,QAAO,SAAS,aAAa,eAAe;AACpF,SAAO,kBAAkB;;CAE1B,SAAS,QAAQ,GAAG;AACnB,mBAAiB,IAAI,EAAE;AACvB,SAAO;;CAER,SAAS,QAAQ,GAAG;AACnB,mBAAiB,IAAI,EAAE;AACvB,SAAO;;AAER,QAAO,SAAS,aAAa,eAAe;AAC3C,MAAI,iBAAiB,IAAI,cAAc,CAAE,QAAO;AAChD,MAAI,iBAAiB,IAAI,cAAc,CAAE,QAAO;EAChD,MAAM,qBAAqB,cAAc,MAAM,GAAG;AAClD,MAAI,CAAC,mBAAoB,QAAO,QAAQ,cAAc;EACtD,MAAM,sBAAsB;GAC3B,OAAO,CAAC,mBAAmB;GAC3B,OAAO,CAAC,mBAAmB;GAC3B,OAAO,CAAC,mBAAmB;GAC3B,YAAY,mBAAmB;GAC/B;AACD,MAAI,oBAAoB,cAAc,KAAM,QAAO,QAAQ,cAAc;AACzE,MAAI,i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3B,mBAAmB,QAAQ;EAC1B,MAAM,UAAU,gCAAgC,KAAK,aAAa;AAClE,SAAO,IAAI,aAAa,CAAC,OAAO,KAAK,UAAU,QAAQ,CAAC;;CAEzD,sBAAsB,QAAQ;AAC7B,MAAI,IAAI,WAAW,EAAG,QAAO,EAAE;EAC/B,MAAM,UAAU,IAAI,aAAa;AACjC,MAAI;AACH,UAAO,KAAK,MAAM,QAAQ,OAAO,IAAI,CAAC;WAC9B,KAAK;AACb,QAAK,KAAK,0CAA0C,IAAI,QAAQ,4BAA4B;AAC5F,UAAO,EAAE;;;CAGX"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/resources/constants/index.ts
|
|
3
3
|
const TEMPLATE_APP_VERSION = "MXLAppVersionX.X.X";
|
|
4
|
-
const SDK_VERSION = "0.0.
|
|
4
|
+
const SDK_VERSION = "0.0.14";
|
|
5
5
|
const MXL_SERVICE_NAME = "mxl-web-sdk";
|
|
6
6
|
const NATIVE_FRAMEWORK = 1;
|
|
7
7
|
const MXL_APP_INSTANCE_ID_STORAGE_KEY = "mxl_app_instance_id";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../../src/resources/constants/index.ts"],"sourcesContent":["export const TEMPLATE_APP_VERSION = 'MXLAppVersionX.X.X';\nexport const SDK_VERSION = '0.0.
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../../src/resources/constants/index.ts"],"sourcesContent":["export const TEMPLATE_APP_VERSION = 'MXLAppVersionX.X.X';\nexport const SDK_VERSION = '0.0.14';\nexport const MXL_SERVICE_NAME = 'mxl-web-sdk';\n// NATIVE_FRAMEWORK is the representation MXL BE uses to differentiate between\n// sdks. It is an enum, so we just send a number here\nexport const NATIVE_FRAMEWORK = 1;\nexport const MXL_APP_INSTANCE_ID_STORAGE_KEY = 'mxl_app_instance_id';\n"],"mappings":";;AAAA,MAAa,uBAAuB;AACpC,MAAa,cAAc;AAC3B,MAAa,mBAAmB;AAGhC,MAAa,mBAAmB;AAChC,MAAa,kCAAkC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/resources/constants/index.d.ts
|
|
2
2
|
declare const TEMPLATE_APP_VERSION = "MXLAppVersionX.X.X";
|
|
3
|
-
declare const SDK_VERSION = "0.0.
|
|
3
|
+
declare const SDK_VERSION = "0.0.14";
|
|
4
4
|
declare const MXL_SERVICE_NAME = "mxl-web-sdk";
|
|
5
5
|
declare const NATIVE_FRAMEWORK = 1;
|
|
6
6
|
declare const MXL_APP_INSTANCE_ID_STORAGE_KEY = "mxl_app_instance_id";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/resources/constants/index.d.ts
|
|
2
2
|
declare const TEMPLATE_APP_VERSION = "MXLAppVersionX.X.X";
|
|
3
|
-
declare const SDK_VERSION = "0.0.
|
|
3
|
+
declare const SDK_VERSION = "0.0.14";
|
|
4
4
|
declare const MXL_SERVICE_NAME = "mxl-web-sdk";
|
|
5
5
|
declare const NATIVE_FRAMEWORK = 1;
|
|
6
6
|
declare const MXL_APP_INSTANCE_ID_STORAGE_KEY = "mxl_app_instance_id";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/resources/constants/index.ts
|
|
2
2
|
const TEMPLATE_APP_VERSION = "MXLAppVersionX.X.X";
|
|
3
|
-
const SDK_VERSION = "0.0.
|
|
3
|
+
const SDK_VERSION = "0.0.14";
|
|
4
4
|
const MXL_SERVICE_NAME = "mxl-web-sdk";
|
|
5
5
|
const NATIVE_FRAMEWORK = 1;
|
|
6
6
|
const MXL_APP_INSTANCE_ID_STORAGE_KEY = "mxl_app_instance_id";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/resources/constants/index.ts"],"sourcesContent":["export const TEMPLATE_APP_VERSION = 'MXLAppVersionX.X.X';\nexport const SDK_VERSION = '0.0.
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/resources/constants/index.ts"],"sourcesContent":["export const TEMPLATE_APP_VERSION = 'MXLAppVersionX.X.X';\nexport const SDK_VERSION = '0.0.14';\nexport const MXL_SERVICE_NAME = 'mxl-web-sdk';\n// NATIVE_FRAMEWORK is the representation MXL BE uses to differentiate between\n// sdks. It is an enum, so we just send a number here\nexport const NATIVE_FRAMEWORK = 1;\nexport const MXL_APP_INSTANCE_ID_STORAGE_KEY = 'mxl_app_instance_id';\n"],"mappings":";AAAA,MAAa,uBAAuB;AACpC,MAAa,cAAc;AAC3B,MAAa,mBAAmB;AAGhC,MAAa,mBAAmB;AAChC,MAAa,kCAAkC"}
|