@funnycode/myclaude 0.1.62 → 0.1.65
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/myclaude.js +1950 -904
- package/dist/myclaude.mjs +1950 -904
- package/package.json +8 -8
package/dist/myclaude.mjs
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// MACRO - build-time constants (injected by build.ts)
|
|
5
5
|
// MACRO injected by build script
|
|
6
6
|
globalThis.MACRO = {
|
|
7
|
-
VERSION: "0.1.
|
|
8
|
-
BUILD_TIME: "2026-07-
|
|
7
|
+
VERSION: "0.1.65",
|
|
8
|
+
BUILD_TIME: "2026-07-14T18:38:39.501Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -9931,9 +9931,9 @@ var init_startupProfiler = __esm(() => {
|
|
|
9931
9931
|
}
|
|
9932
9932
|
});
|
|
9933
9933
|
|
|
9934
|
-
//
|
|
9935
|
-
var
|
|
9936
|
-
__export(
|
|
9934
|
+
// shims/ant-claude-for-chrome-mcp/index.ts
|
|
9935
|
+
var exports_ant_claude_for_chrome_mcp = {};
|
|
9936
|
+
__export(exports_ant_claude_for_chrome_mcp, {
|
|
9937
9937
|
createClaudeForChromeMcpServer: () => createClaudeForChromeMcpServer,
|
|
9938
9938
|
BROWSER_TOOLS: () => BROWSER_TOOLS
|
|
9939
9939
|
});
|
|
@@ -9945,7 +9945,7 @@ function createClaudeForChromeMcpServer(_context) {
|
|
|
9945
9945
|
};
|
|
9946
9946
|
}
|
|
9947
9947
|
var BROWSER_TOOLS;
|
|
9948
|
-
var
|
|
9948
|
+
var init_ant_claude_for_chrome_mcp = __esm(() => {
|
|
9949
9949
|
BROWSER_TOOLS = [];
|
|
9950
9950
|
});
|
|
9951
9951
|
|
|
@@ -32718,7 +32718,7 @@ var init_oauth = __esm(() => {
|
|
|
32718
32718
|
CONSOLE_SUCCESS_URL: "https://platform.staging.ant.dev/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",
|
|
32719
32719
|
CLAUDEAI_SUCCESS_URL: "https://platform.staging.ant.dev/oauth/code/success?app=claude-code",
|
|
32720
32720
|
MANUAL_REDIRECT_URL: "https://platform.staging.ant.dev/oauth/code/callback",
|
|
32721
|
-
CLIENT_ID: "
|
|
32721
|
+
CLIENT_ID: "staging-dev-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
32722
32722
|
OAUTH_FILE_SUFFIX: "-staging-oauth",
|
|
32723
32723
|
MCP_PROXY_URL: "https://mcp-proxy-staging.anthropic.com",
|
|
32724
32724
|
MCP_PROXY_PATH: "/v1/mcp/{server_id}"
|
|
@@ -35498,10 +35498,16 @@ var init_execFileNoThrow = __esm(() => {
|
|
|
35498
35498
|
|
|
35499
35499
|
// src/constants/files.ts
|
|
35500
35500
|
function hasBinaryExtension(filePath) {
|
|
35501
|
-
const
|
|
35501
|
+
const dotIndex = filePath.lastIndexOf(".");
|
|
35502
|
+
if (dotIndex < 0)
|
|
35503
|
+
return false;
|
|
35504
|
+
const ext = filePath.slice(dotIndex).toLowerCase();
|
|
35502
35505
|
return BINARY_EXTENSIONS.has(ext);
|
|
35503
35506
|
}
|
|
35504
35507
|
function isBinaryContent(buffer) {
|
|
35508
|
+
if (buffer.length === 0) {
|
|
35509
|
+
return false;
|
|
35510
|
+
}
|
|
35505
35511
|
const checkSize = Math.min(buffer.length, BINARY_CHECK_SIZE);
|
|
35506
35512
|
let nonPrintable = 0;
|
|
35507
35513
|
for (let i2 = 0;i2 < checkSize; i2++) {
|
|
@@ -35513,7 +35519,7 @@ function isBinaryContent(buffer) {
|
|
|
35513
35519
|
nonPrintable++;
|
|
35514
35520
|
}
|
|
35515
35521
|
}
|
|
35516
|
-
return nonPrintable / checkSize > 0.
|
|
35522
|
+
return nonPrintable / checkSize > 0.2;
|
|
35517
35523
|
}
|
|
35518
35524
|
var BINARY_EXTENSIONS, BINARY_CHECK_SIZE = 8192;
|
|
35519
35525
|
var init_files2 = __esm(() => {
|
|
@@ -60764,14 +60770,14 @@ var require_runtime_features = __commonJS((exports, module) => {
|
|
|
60764
60770
|
...runtimeFeaturesAsNodeModule,
|
|
60765
60771
|
...runtimeFeaturesByExportedProperty
|
|
60766
60772
|
];
|
|
60767
|
-
function detectRuntimeFeature(
|
|
60768
|
-
if (runtimeFeaturesAsNodeModule.includes(
|
|
60769
|
-
return detectRuntimeFeatureByNodeModule(`node:${
|
|
60770
|
-
} else if (runtimeFeaturesByExportedProperty.includes(
|
|
60771
|
-
const [moduleName, property2] = exportedPropertyLookup[
|
|
60773
|
+
function detectRuntimeFeature(feature2) {
|
|
60774
|
+
if (runtimeFeaturesAsNodeModule.includes(feature2)) {
|
|
60775
|
+
return detectRuntimeFeatureByNodeModule(`node:${feature2}`);
|
|
60776
|
+
} else if (runtimeFeaturesByExportedProperty.includes(feature2)) {
|
|
60777
|
+
const [moduleName, property2] = exportedPropertyLookup[feature2];
|
|
60772
60778
|
return detectRuntimeFeatureByExportedProperty(moduleName, property2);
|
|
60773
60779
|
}
|
|
60774
|
-
throw new TypeError(`unknown feature: ${
|
|
60780
|
+
throw new TypeError(`unknown feature: ${feature2}`);
|
|
60775
60781
|
}
|
|
60776
60782
|
|
|
60777
60783
|
class RuntimeFeatures {
|
|
@@ -60779,18 +60785,18 @@ var require_runtime_features = __commonJS((exports, module) => {
|
|
|
60779
60785
|
clear() {
|
|
60780
60786
|
this.#map.clear();
|
|
60781
60787
|
}
|
|
60782
|
-
has(
|
|
60783
|
-
return this.#map.get(
|
|
60788
|
+
has(feature2) {
|
|
60789
|
+
return this.#map.get(feature2) ?? this.#detectRuntimeFeature(feature2);
|
|
60784
60790
|
}
|
|
60785
|
-
set(
|
|
60786
|
-
if (features.includes(
|
|
60787
|
-
throw new TypeError(`unknown feature: ${
|
|
60791
|
+
set(feature2, value) {
|
|
60792
|
+
if (features.includes(feature2) === false) {
|
|
60793
|
+
throw new TypeError(`unknown feature: ${feature2}`);
|
|
60788
60794
|
}
|
|
60789
|
-
this.#map.set(
|
|
60795
|
+
this.#map.set(feature2, value);
|
|
60790
60796
|
}
|
|
60791
|
-
#detectRuntimeFeature(
|
|
60792
|
-
const result = detectRuntimeFeature(
|
|
60793
|
-
this.#map.set(
|
|
60797
|
+
#detectRuntimeFeature(feature2) {
|
|
60798
|
+
const result = detectRuntimeFeature(feature2);
|
|
60799
|
+
this.#map.set(feature2, result);
|
|
60794
60800
|
return result;
|
|
60795
60801
|
}
|
|
60796
60802
|
}
|
|
@@ -80403,14 +80409,14 @@ updates please upgrade to a supported Node.js LTS version.
|
|
|
80403
80409
|
More information can be found at: https://a.co/c895JFp`);
|
|
80404
80410
|
}
|
|
80405
80411
|
};
|
|
80406
|
-
function setCredentialFeature(credentials,
|
|
80412
|
+
function setCredentialFeature(credentials, feature2, value) {
|
|
80407
80413
|
if (!credentials.$source) {
|
|
80408
80414
|
credentials.$source = {};
|
|
80409
80415
|
}
|
|
80410
|
-
credentials.$source[
|
|
80416
|
+
credentials.$source[feature2] = value;
|
|
80411
80417
|
return credentials;
|
|
80412
80418
|
}
|
|
80413
|
-
function setFeature(context,
|
|
80419
|
+
function setFeature(context, feature2, value) {
|
|
80414
80420
|
if (!context.__aws_sdk_context) {
|
|
80415
80421
|
context.__aws_sdk_context = {
|
|
80416
80422
|
features: {}
|
|
@@ -80418,13 +80424,13 @@ More information can be found at: https://a.co/c895JFp`);
|
|
|
80418
80424
|
} else if (!context.__aws_sdk_context.features) {
|
|
80419
80425
|
context.__aws_sdk_context.features = {};
|
|
80420
80426
|
}
|
|
80421
|
-
context.__aws_sdk_context.features[
|
|
80427
|
+
context.__aws_sdk_context.features[feature2] = value;
|
|
80422
80428
|
}
|
|
80423
|
-
function setTokenFeature(token,
|
|
80429
|
+
function setTokenFeature(token, feature2, value) {
|
|
80424
80430
|
if (!token.$source) {
|
|
80425
80431
|
token.$source = {};
|
|
80426
80432
|
}
|
|
80427
|
-
token.$source[
|
|
80433
|
+
token.$source[feature2] = value;
|
|
80428
80434
|
return token;
|
|
80429
80435
|
}
|
|
80430
80436
|
exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
|
|
@@ -86723,7 +86729,7 @@ var require_dist_cjs25 = __commonJS((exports) => {
|
|
|
86723
86729
|
}
|
|
86724
86730
|
return cursor;
|
|
86725
86731
|
};
|
|
86726
|
-
function setFeature(context,
|
|
86732
|
+
function setFeature(context, feature2, value) {
|
|
86727
86733
|
if (!context.__smithy_context) {
|
|
86728
86734
|
context.__smithy_context = {
|
|
86729
86735
|
features: {}
|
|
@@ -86731,7 +86737,7 @@ var require_dist_cjs25 = __commonJS((exports) => {
|
|
|
86731
86737
|
} else if (!context.__smithy_context.features) {
|
|
86732
86738
|
context.__smithy_context.features = {};
|
|
86733
86739
|
}
|
|
86734
|
-
context.__smithy_context.features[
|
|
86740
|
+
context.__smithy_context.features[feature2] = value;
|
|
86735
86741
|
}
|
|
86736
86742
|
|
|
86737
86743
|
class DefaultIdentityProviderConfig {
|
|
@@ -108863,8 +108869,11 @@ class AwsAuthStatusManager {
|
|
|
108863
108869
|
var init_awsAuthStatusManager = () => {};
|
|
108864
108870
|
|
|
108865
108871
|
// src/constants/betas.ts
|
|
108866
|
-
var CLAUDE_CODE_20250219_BETA_HEADER = "claude-code-20250219", INTERLEAVED_THINKING_BETA_HEADER = "interleaved-thinking-2025-05-14", CONTEXT_1M_BETA_HEADER = "context-1m-2025-08-07", CONTEXT_MANAGEMENT_BETA_HEADER = "context-management-2025-06-27", STRUCTURED_OUTPUTS_BETA_HEADER = "structured-outputs-2025-12-15", WEB_SEARCH_BETA_HEADER = "web-search-2025-03-05", TOOL_SEARCH_BETA_HEADER_1P = "advanced-tool-use-2025-11-20", TOOL_SEARCH_BETA_HEADER_3P = "tool-search-tool-2025-10-19", EFFORT_BETA_HEADER = "effort-2025-11-24", TASK_BUDGETS_BETA_HEADER = "task-budgets-2026-03-13", PROMPT_CACHING_SCOPE_BETA_HEADER = "prompt-caching-scope-2026-01-05", FAST_MODE_BETA_HEADER = "fast-mode-2026-02-01", REDACT_THINKING_BETA_HEADER = "redact-thinking-2026-02-12", TOKEN_EFFICIENT_TOOLS_BETA_HEADER = "token-efficient-tools-2026-03-28", SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER
|
|
108872
|
+
var CLAUDE_CODE_20250219_BETA_HEADER = "claude-code-20250219", INTERLEAVED_THINKING_BETA_HEADER = "interleaved-thinking-2025-05-14", CONTEXT_1M_BETA_HEADER = "context-1m-2025-08-07", CONTEXT_MANAGEMENT_BETA_HEADER = "context-management-2025-06-27", STRUCTURED_OUTPUTS_BETA_HEADER = "structured-outputs-2025-12-15", WEB_SEARCH_BETA_HEADER = "web-search-2025-03-05", TOOL_SEARCH_BETA_HEADER_1P = "advanced-tool-use-2025-11-20", TOOL_SEARCH_BETA_HEADER_3P = "tool-search-tool-2025-10-19", EFFORT_BETA_HEADER = "effort-2025-11-24", TASK_BUDGETS_BETA_HEADER = "task-budgets-2026-03-13", PROMPT_CACHING_SCOPE_BETA_HEADER = "prompt-caching-scope-2026-01-05", FAST_MODE_BETA_HEADER = "fast-mode-2026-02-01", REDACT_THINKING_BETA_HEADER = "redact-thinking-2026-02-12", TOKEN_EFFICIENT_TOOLS_BETA_HEADER = "token-efficient-tools-2026-03-28", SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER, AFK_MODE_BETA_HEADER, CLI_INTERNAL_BETA_HEADER, ADVISOR_BETA_HEADER = "advisor-tool-2026-03-01", BEDROCK_EXTRA_PARAMS_HEADERS, VERTEX_COUNT_TOKENS_ALLOWED_BETAS;
|
|
108867
108873
|
var init_betas = __esm(() => {
|
|
108874
|
+
init_growthbook();
|
|
108875
|
+
SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER = getFeatureValue_CACHED_MAY_BE_STALE("CONNECTOR_TEXT", false) ? "summarize-connector-text-2026-03-13" : "";
|
|
108876
|
+
AFK_MODE_BETA_HEADER = getFeatureValue_CACHED_MAY_BE_STALE("TRANSCRIPT_CLASSIFIER", false) ? "afk-mode-2026-01-31" : "";
|
|
108868
108877
|
CLI_INTERNAL_BETA_HEADER = process.env.USER_TYPE === "ant" ? "cli-internal-2026-02-09" : "";
|
|
108869
108878
|
BEDROCK_EXTRA_PARAMS_HEADERS = new Set([
|
|
108870
108879
|
INTERLEAVED_THINKING_BETA_HEADER,
|
|
@@ -110451,7 +110460,25 @@ function modelSupportsStructuredOutputs(model) {
|
|
|
110451
110460
|
return canonical.includes("claude-sonnet-4-6") || canonical.includes("claude-sonnet-4-5") || canonical.includes("claude-opus-4-1") || canonical.includes("claude-opus-4-5") || canonical.includes("claude-opus-4-6") || canonical.includes("claude-haiku-4-5");
|
|
110452
110461
|
}
|
|
110453
110462
|
function modelSupportsAutoMode(model) {
|
|
110454
|
-
if (false) {
|
|
110463
|
+
if (getFeatureValue_CACHED_MAY_BE_STALE("TRANSCRIPT_CLASSIFIER", false)) {
|
|
110464
|
+
const m = getCanonicalName(model);
|
|
110465
|
+
if (process.env.USER_TYPE !== "ant" && getAPIProvider() !== "firstParty") {
|
|
110466
|
+
return false;
|
|
110467
|
+
}
|
|
110468
|
+
const config2 = getFeatureValue_CACHED_MAY_BE_STALE("tengu_auto_mode_config", {});
|
|
110469
|
+
const rawLower = model.toLowerCase();
|
|
110470
|
+
if (config2?.allowModels?.some((am) => am.toLowerCase() === rawLower || am.toLowerCase() === m)) {
|
|
110471
|
+
return true;
|
|
110472
|
+
}
|
|
110473
|
+
if (process.env.USER_TYPE === "ant") {
|
|
110474
|
+
if (m.includes("claude-3-"))
|
|
110475
|
+
return false;
|
|
110476
|
+
if (/claude-(opus|sonnet|haiku)-4(?!-[6-9])/.test(m))
|
|
110477
|
+
return false;
|
|
110478
|
+
return true;
|
|
110479
|
+
}
|
|
110480
|
+
return /^claude-(opus|sonnet)-4-6/.test(m);
|
|
110481
|
+
}
|
|
110455
110482
|
return false;
|
|
110456
110483
|
}
|
|
110457
110484
|
function getToolSearchBetaHeader() {
|
|
@@ -112162,9 +112189,9 @@ function getAttributionHeader(fingerprint) {
|
|
|
112162
112189
|
if (!isAttributionHeaderEnabled()) {
|
|
112163
112190
|
return "";
|
|
112164
112191
|
}
|
|
112165
|
-
const version2 = `${MACRO
|
|
112192
|
+
const version2 = `${globalThis.MACRO?.VERSION || "unknown"}.${fingerprint}`;
|
|
112166
112193
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
112167
|
-
const cch = "";
|
|
112194
|
+
const cch = typeof process !== "undefined" && process.isBun ? getFeatureValue_CACHED_MAY_BE_STALE("NATIVE_CLIENT_ATTESTATION", false) ? " cch=00000;" : "" : "";
|
|
112168
112195
|
const workload = getWorkload();
|
|
112169
112196
|
const workloadPair = workload ? ` cc_workload=${workload};` : "";
|
|
112170
112197
|
const header = `x-anthropic-billing-header: cc_version=${version2}; cc_entrypoint=${entrypoint};${cch}${workloadPair}`;
|
|
@@ -270385,6 +270412,10 @@ var ENTER_WORKTREE_TOOL_NAME = "EnterWorktree";
|
|
|
270385
270412
|
|
|
270386
270413
|
// src/tools/ExitWorktreeTool/constants.ts
|
|
270387
270414
|
var EXIT_WORKTREE_TOOL_NAME = "ExitWorktree";
|
|
270415
|
+
|
|
270416
|
+
// src/tools/WorkflowTool/constants.ts
|
|
270417
|
+
var WORKFLOW_TOOL_NAME = "workflow";
|
|
270418
|
+
|
|
270388
270419
|
// src/utils/cron.ts
|
|
270389
270420
|
var init_cron = () => {};
|
|
270390
270421
|
|
|
@@ -270415,7 +270446,7 @@ var init_cronTasks = __esm(() => {
|
|
|
270415
270446
|
function isKairosCronEnabled() {
|
|
270416
270447
|
return false;
|
|
270417
270448
|
}
|
|
270418
|
-
var KAIROS_CRON_REFRESH_MS, DEFAULT_MAX_AGE_DAYS;
|
|
270449
|
+
var KAIROS_CRON_REFRESH_MS, DEFAULT_MAX_AGE_DAYS, CRON_CREATE_TOOL_NAME = "CronCreate", CRON_DELETE_TOOL_NAME = "CronDelete", CRON_LIST_TOOL_NAME = "CronList";
|
|
270419
270450
|
var init_prompt10 = __esm(() => {
|
|
270420
270451
|
init_growthbook();
|
|
270421
270452
|
init_cronTasks();
|
|
@@ -270427,6 +270458,7 @@ var init_prompt10 = __esm(() => {
|
|
|
270427
270458
|
// src/constants/tools.ts
|
|
270428
270459
|
var ALL_AGENT_DISALLOWED_TOOLS, CUSTOM_AGENT_DISALLOWED_TOOLS, ASYNC_AGENT_ALLOWED_TOOLS, IN_PROCESS_TEAMMATE_ALLOWED_TOOLS, COORDINATOR_MODE_ALLOWED_TOOLS;
|
|
270429
270460
|
var init_tools = __esm(() => {
|
|
270461
|
+
init_growthbook();
|
|
270430
270462
|
init_constants3();
|
|
270431
270463
|
init_prompt9();
|
|
270432
270464
|
init_prompt2();
|
|
@@ -270444,7 +270476,7 @@ var init_tools = __esm(() => {
|
|
|
270444
270476
|
...process.env.USER_TYPE === "ant" ? [] : [AGENT_TOOL_NAME],
|
|
270445
270477
|
ASK_USER_QUESTION_TOOL_NAME,
|
|
270446
270478
|
TASK_STOP_TOOL_NAME,
|
|
270447
|
-
...[]
|
|
270479
|
+
...getFeatureValue_CACHED_MAY_BE_STALE("WORKFLOW_SCRIPTS", false) ? [WORKFLOW_TOOL_NAME] : []
|
|
270448
270480
|
]);
|
|
270449
270481
|
CUSTOM_AGENT_DISALLOWED_TOOLS = new Set([
|
|
270450
270482
|
...ALL_AGENT_DISALLOWED_TOOLS
|
|
@@ -270472,7 +270504,7 @@ var init_tools = __esm(() => {
|
|
|
270472
270504
|
TASK_LIST_TOOL_NAME,
|
|
270473
270505
|
TASK_UPDATE_TOOL_NAME,
|
|
270474
270506
|
SEND_MESSAGE_TOOL_NAME,
|
|
270475
|
-
...[]
|
|
270507
|
+
...feature("AGENT_TRIGGERS") ? [CRON_CREATE_TOOL_NAME, CRON_DELETE_TOOL_NAME, CRON_LIST_TOOL_NAME] : []
|
|
270476
270508
|
]);
|
|
270477
270509
|
COORDINATOR_MODE_ALLOWED_TOOLS = new Set([
|
|
270478
270510
|
AGENT_TOOL_NAME,
|
|
@@ -291159,7 +291191,7 @@ var init_client6 = __esm(() => {
|
|
|
291159
291191
|
logMCPDebug(name, `claude.ai proxy transport created successfully`);
|
|
291160
291192
|
} else if ((serverRef.type === "stdio" || !serverRef.type) && isClaudeInChromeMCPServer(name)) {
|
|
291161
291193
|
const { createChromeContext } = await Promise.resolve().then(() => (init_mcpServer(), exports_mcpServer));
|
|
291162
|
-
const { createClaudeForChromeMcpServer: createClaudeForChromeMcpServer2 } = await Promise.resolve().then(() => (
|
|
291194
|
+
const { createClaudeForChromeMcpServer: createClaudeForChromeMcpServer2 } = await Promise.resolve().then(() => (init_ant_claude_for_chrome_mcp(), exports_ant_claude_for_chrome_mcp));
|
|
291163
291195
|
const { createLinkedTransportPair: createLinkedTransportPair2 } = await Promise.resolve().then(() => exports_InProcessTransport);
|
|
291164
291196
|
const context = createChromeContext(serverRef.env);
|
|
291165
291197
|
inProcessServer = createClaudeForChromeMcpServer2(context);
|
|
@@ -297186,13 +297218,20 @@ var require_LogRecord = __commonJS((exports) => {
|
|
|
297186
297218
|
// node_modules/@opentelemetry/api-logs/build/src/NoopLogger.js
|
|
297187
297219
|
var require_NoopLogger = __commonJS((exports) => {
|
|
297188
297220
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
297189
|
-
exports.NOOP_LOGGER = exports.NoopLogger = undefined;
|
|
297221
|
+
exports.createNoopLogger = exports.NOOP_LOGGER = exports.NoopLogger = undefined;
|
|
297190
297222
|
|
|
297191
297223
|
class NoopLogger {
|
|
297192
297224
|
emit(_logRecord) {}
|
|
297225
|
+
enabled() {
|
|
297226
|
+
return false;
|
|
297227
|
+
}
|
|
297193
297228
|
}
|
|
297194
297229
|
exports.NoopLogger = NoopLogger;
|
|
297195
297230
|
exports.NOOP_LOGGER = new NoopLogger;
|
|
297231
|
+
function createNoopLogger() {
|
|
297232
|
+
return exports.NOOP_LOGGER;
|
|
297233
|
+
}
|
|
297234
|
+
exports.createNoopLogger = createNoopLogger;
|
|
297196
297235
|
});
|
|
297197
297236
|
|
|
297198
297237
|
// node_modules/@opentelemetry/api-logs/build/src/internal/global-utils.js
|
|
@@ -297239,6 +297278,9 @@ var require_ProxyLogger = __commonJS((exports) => {
|
|
|
297239
297278
|
emit(logRecord) {
|
|
297240
297279
|
this._getLogger().emit(logRecord);
|
|
297241
297280
|
}
|
|
297281
|
+
enabled(options) {
|
|
297282
|
+
return this._getLogger().enabled(options);
|
|
297283
|
+
}
|
|
297242
297284
|
_getLogger() {
|
|
297243
297285
|
if (this._delegate) {
|
|
297244
297286
|
return this._delegate;
|
|
@@ -297325,17 +297367,14 @@ var require_logs = __commonJS((exports) => {
|
|
|
297325
297367
|
// node_modules/@opentelemetry/api-logs/build/src/index.js
|
|
297326
297368
|
var require_src3 = __commonJS((exports) => {
|
|
297327
297369
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
297328
|
-
exports.logs = exports.
|
|
297370
|
+
exports.logs = exports.createNoopLogger = exports.SeverityNumber = undefined;
|
|
297329
297371
|
var LogRecord_1 = require_LogRecord();
|
|
297330
297372
|
Object.defineProperty(exports, "SeverityNumber", { enumerable: true, get: function() {
|
|
297331
297373
|
return LogRecord_1.SeverityNumber;
|
|
297332
297374
|
} });
|
|
297333
297375
|
var NoopLogger_1 = require_NoopLogger();
|
|
297334
|
-
Object.defineProperty(exports, "
|
|
297335
|
-
return NoopLogger_1.
|
|
297336
|
-
} });
|
|
297337
|
-
Object.defineProperty(exports, "NoopLogger", { enumerable: true, get: function() {
|
|
297338
|
-
return NoopLogger_1.NoopLogger;
|
|
297376
|
+
Object.defineProperty(exports, "createNoopLogger", { enumerable: true, get: function() {
|
|
297377
|
+
return NoopLogger_1.createNoopLogger;
|
|
297339
297378
|
} });
|
|
297340
297379
|
var logs_1 = require_logs();
|
|
297341
297380
|
exports.logs = logs_1.LogsAPI.getInstance();
|
|
@@ -297377,7 +297416,7 @@ var require_constants10 = __commonJS((exports) => {
|
|
|
297377
297416
|
// node_modules/@opentelemetry/core/build/src/baggage/utils.js
|
|
297378
297417
|
var require_utils8 = __commonJS((exports) => {
|
|
297379
297418
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
297380
|
-
exports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = undefined;
|
|
297419
|
+
exports.parseKeyPairsIntoRecord = exports.parseBaggageHeaderString = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = undefined;
|
|
297381
297420
|
var api_1 = require_src2();
|
|
297382
297421
|
var constants_1 = require_constants10();
|
|
297383
297422
|
function serializeKeyPairs(keyPairs) {
|
|
@@ -297425,6 +297464,30 @@ var require_utils8 = __commonJS((exports) => {
|
|
|
297425
297464
|
return { key: key2, value, metadata };
|
|
297426
297465
|
}
|
|
297427
297466
|
exports.parsePairKeyValue = parsePairKeyValue;
|
|
297467
|
+
function parseBaggageHeaderString(value, baggage, count3, totalSize) {
|
|
297468
|
+
let start = 0;
|
|
297469
|
+
while (start < value.length && count3 < constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS) {
|
|
297470
|
+
const end = value.indexOf(constants_1.BAGGAGE_ITEMS_SEPARATOR, start);
|
|
297471
|
+
const entryEnd = end === -1 ? value.length : end;
|
|
297472
|
+
const entryLength = entryEnd - start;
|
|
297473
|
+
if (entryLength <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS) {
|
|
297474
|
+
const keyPair = parsePairKeyValue(value.substring(start, entryEnd));
|
|
297475
|
+
if (keyPair) {
|
|
297476
|
+
const entrySize = (count3 === 0 ? 0 : 1) + entryLength;
|
|
297477
|
+
if (totalSize + entrySize > constants_1.BAGGAGE_MAX_TOTAL_LENGTH)
|
|
297478
|
+
break;
|
|
297479
|
+
baggage[keyPair.key] = keyPair.metadata ? { value: keyPair.value, metadata: keyPair.metadata } : { value: keyPair.value };
|
|
297480
|
+
count3++;
|
|
297481
|
+
totalSize += entrySize;
|
|
297482
|
+
}
|
|
297483
|
+
}
|
|
297484
|
+
if (end === -1)
|
|
297485
|
+
break;
|
|
297486
|
+
start = end + 1;
|
|
297487
|
+
}
|
|
297488
|
+
return [count3, totalSize];
|
|
297489
|
+
}
|
|
297490
|
+
exports.parseBaggageHeaderString = parseBaggageHeaderString;
|
|
297428
297491
|
function parseKeyPairsIntoRecord(value) {
|
|
297429
297492
|
const result = {};
|
|
297430
297493
|
if (typeof value === "string" && value.length > 0) {
|
|
@@ -297464,25 +297527,20 @@ var require_W3CBaggagePropagator = __commonJS((exports) => {
|
|
|
297464
297527
|
}
|
|
297465
297528
|
extract(context, carrier, getter) {
|
|
297466
297529
|
const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER);
|
|
297467
|
-
|
|
297468
|
-
if (!baggageString)
|
|
297469
|
-
return context;
|
|
297470
|
-
const baggage = {};
|
|
297471
|
-
if (baggageString.length === 0) {
|
|
297530
|
+
if (!headerValue) {
|
|
297472
297531
|
return context;
|
|
297473
297532
|
}
|
|
297474
|
-
const
|
|
297475
|
-
|
|
297476
|
-
|
|
297477
|
-
|
|
297478
|
-
|
|
297479
|
-
|
|
297480
|
-
baggageEntry.metadata = keyPair.metadata;
|
|
297481
|
-
}
|
|
297482
|
-
baggage[keyPair.key] = baggageEntry;
|
|
297533
|
+
const baggage = {};
|
|
297534
|
+
let count3 = 0;
|
|
297535
|
+
let totalSize = 0;
|
|
297536
|
+
if (Array.isArray(headerValue)) {
|
|
297537
|
+
for (let i3 = 0;i3 < headerValue.length; i3++) {
|
|
297538
|
+
[count3, totalSize] = (0, utils_1.parseBaggageHeaderString)(headerValue[i3], baggage, count3, totalSize);
|
|
297483
297539
|
}
|
|
297484
|
-
}
|
|
297485
|
-
|
|
297540
|
+
} else {
|
|
297541
|
+
[count3] = (0, utils_1.parseBaggageHeaderString)(headerValue, baggage, count3, totalSize);
|
|
297542
|
+
}
|
|
297543
|
+
if (count3 === 0) {
|
|
297486
297544
|
return context;
|
|
297487
297545
|
}
|
|
297488
297546
|
return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage));
|
|
@@ -297706,7 +297764,7 @@ var require_globalThis = __commonJS((exports) => {
|
|
|
297706
297764
|
var require_version2 = __commonJS((exports) => {
|
|
297707
297765
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
297708
297766
|
exports.VERSION = undefined;
|
|
297709
|
-
exports.VERSION = "2.
|
|
297767
|
+
exports.VERSION = "2.9.0";
|
|
297710
297768
|
});
|
|
297711
297769
|
|
|
297712
297770
|
// node_modules/@opentelemetry/semantic-conventions/build/src/internal/utils.js
|
|
@@ -299018,9 +299076,10 @@ var require_resource = __commonJS((exports) => {
|
|
|
299018
299076
|
// node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js
|
|
299019
299077
|
var require_stable_attributes = __commonJS((exports) => {
|
|
299020
299078
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
299021
|
-
exports.
|
|
299022
|
-
exports.
|
|
299023
|
-
exports.
|
|
299079
|
+
exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN1 = exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN0 = exports.ATTR_DOTNET_GC_HEAP_GENERATION = exports.DEPLOYMENT_ENVIRONMENT_NAME_VALUE_TEST = exports.DEPLOYMENT_ENVIRONMENT_NAME_VALUE_STAGING = exports.DEPLOYMENT_ENVIRONMENT_NAME_VALUE_PRODUCTION = exports.DEPLOYMENT_ENVIRONMENT_NAME_VALUE_DEVELOPMENT = exports.ATTR_DEPLOYMENT_ENVIRONMENT_NAME = exports.DB_SYSTEM_NAME_VALUE_POSTGRESQL = exports.DB_SYSTEM_NAME_VALUE_MYSQL = exports.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER = exports.DB_SYSTEM_NAME_VALUE_MARIADB = exports.ATTR_DB_SYSTEM_NAME = exports.ATTR_DB_STORED_PROCEDURE_NAME = exports.ATTR_DB_RESPONSE_STATUS_CODE = exports.ATTR_DB_QUERY_TEXT = exports.ATTR_DB_QUERY_SUMMARY = exports.ATTR_DB_OPERATION_NAME = exports.ATTR_DB_OPERATION_BATCH_SIZE = exports.ATTR_DB_NAMESPACE = exports.ATTR_DB_COLLECTION_NAME = exports.ATTR_CONTAINER_IMAGE_TAGS = exports.ATTR_CONTAINER_IMAGE_REPO_DIGESTS = exports.ATTR_CONTAINER_IMAGE_NAME = exports.ATTR_CONTAINER_ID = exports.ATTR_CODE_STACKTRACE = exports.ATTR_CODE_LINE_NUMBER = exports.ATTR_CODE_FUNCTION_NAME = exports.ATTR_CODE_FILE_PATH = exports.ATTR_CODE_COLUMN_NUMBER = exports.ATTR_CLIENT_PORT = exports.ATTR_CLIENT_ADDRESS = exports.ATTR_ASPNETCORE_USER_IS_AUTHENTICATED = exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS = exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE = exports.ATTR_ASPNETCORE_ROUTING_MATCH_STATUS = exports.ATTR_ASPNETCORE_ROUTING_IS_FALLBACK = exports.ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED = exports.ATTR_ASPNETCORE_RATE_LIMITING_RESULT = exports.ATTR_ASPNETCORE_RATE_LIMITING_POLICY = exports.ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED = exports.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = undefined;
|
|
299080
|
+
exports.ATTR_K8S_DAEMONSET_LABEL = exports.ATTR_K8S_DAEMONSET_ANNOTATION = exports.ATTR_K8S_CRONJOB_UID = exports.ATTR_K8S_CRONJOB_NAME = exports.ATTR_K8S_CRONJOB_LABEL = exports.ATTR_K8S_CRONJOB_ANNOTATION = exports.ATTR_K8S_CONTAINER_RESTART_COUNT = exports.ATTR_K8S_CONTAINER_NAME = exports.ATTR_K8S_CLUSTER_UID = exports.ATTR_K8S_CLUSTER_NAME = exports.JVM_THREAD_STATE_VALUE_WAITING = exports.JVM_THREAD_STATE_VALUE_TIMED_WAITING = exports.JVM_THREAD_STATE_VALUE_TERMINATED = exports.JVM_THREAD_STATE_VALUE_RUNNABLE = exports.JVM_THREAD_STATE_VALUE_NEW = exports.JVM_THREAD_STATE_VALUE_BLOCKED = exports.ATTR_JVM_THREAD_STATE = exports.ATTR_JVM_THREAD_DAEMON = exports.JVM_MEMORY_TYPE_VALUE_NON_HEAP = exports.JVM_MEMORY_TYPE_VALUE_HEAP = exports.ATTR_JVM_MEMORY_TYPE = exports.ATTR_JVM_MEMORY_POOL_NAME = exports.ATTR_JVM_GC_NAME = exports.ATTR_JVM_GC_ACTION = exports.ATTR_HTTP_ROUTE = exports.ATTR_HTTP_RESPONSE_STATUS_CODE = exports.ATTR_HTTP_RESPONSE_HEADER = exports.ATTR_HTTP_REQUEST_RESEND_COUNT = exports.ATTR_HTTP_REQUEST_METHOD_ORIGINAL = exports.HTTP_REQUEST_METHOD_VALUE_TRACE = exports.HTTP_REQUEST_METHOD_VALUE_PUT = exports.HTTP_REQUEST_METHOD_VALUE_POST = exports.HTTP_REQUEST_METHOD_VALUE_PATCH = exports.HTTP_REQUEST_METHOD_VALUE_OPTIONS = exports.HTTP_REQUEST_METHOD_VALUE_HEAD = exports.HTTP_REQUEST_METHOD_VALUE_GET = exports.HTTP_REQUEST_METHOD_VALUE_DELETE = exports.HTTP_REQUEST_METHOD_VALUE_CONNECT = exports.HTTP_REQUEST_METHOD_VALUE_OTHER = exports.ATTR_HTTP_REQUEST_METHOD = exports.ATTR_HTTP_REQUEST_HEADER = exports.ATTR_EXCEPTION_TYPE = exports.ATTR_EXCEPTION_STACKTRACE = exports.ATTR_EXCEPTION_MESSAGE = exports.ATTR_EXCEPTION_ESCAPED = exports.ERROR_TYPE_VALUE_OTHER = exports.ATTR_ERROR_TYPE = exports.DOTNET_GC_HEAP_GENERATION_VALUE_POH = exports.DOTNET_GC_HEAP_GENERATION_VALUE_LOH = exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN2 = undefined;
|
|
299081
|
+
exports.ATTR_OTEL_SCOPE_VERSION = exports.ATTR_OTEL_SCOPE_NAME = exports.ATTR_OTEL_EVENT_NAME = exports.NETWORK_TYPE_VALUE_IPV6 = exports.NETWORK_TYPE_VALUE_IPV4 = exports.ATTR_NETWORK_TYPE = exports.NETWORK_TRANSPORT_VALUE_UNIX = exports.NETWORK_TRANSPORT_VALUE_UDP = exports.NETWORK_TRANSPORT_VALUE_TCP = exports.NETWORK_TRANSPORT_VALUE_QUIC = exports.NETWORK_TRANSPORT_VALUE_PIPE = exports.ATTR_NETWORK_TRANSPORT = exports.ATTR_NETWORK_PROTOCOL_VERSION = exports.ATTR_NETWORK_PROTOCOL_NAME = exports.ATTR_NETWORK_PEER_PORT = exports.ATTR_NETWORK_PEER_ADDRESS = exports.ATTR_NETWORK_LOCAL_PORT = exports.ATTR_NETWORK_LOCAL_ADDRESS = exports.ATTR_K8S_STATEFULSET_UID = exports.ATTR_K8S_STATEFULSET_NAME = exports.ATTR_K8S_STATEFULSET_LABEL = exports.ATTR_K8S_STATEFULSET_ANNOTATION = exports.ATTR_K8S_REPLICASET_UID = exports.ATTR_K8S_REPLICASET_NAME = exports.ATTR_K8S_REPLICASET_LABEL = exports.ATTR_K8S_REPLICASET_ANNOTATION = exports.ATTR_K8S_POD_UID = exports.ATTR_K8S_POD_START_TIME = exports.ATTR_K8S_POD_NAME = exports.ATTR_K8S_POD_LABEL = exports.ATTR_K8S_POD_IP = exports.ATTR_K8S_POD_HOSTNAME = exports.ATTR_K8S_POD_ANNOTATION = exports.ATTR_K8S_NODE_UID = exports.ATTR_K8S_NODE_NAME = exports.ATTR_K8S_NODE_LABEL = exports.ATTR_K8S_NODE_ANNOTATION = exports.ATTR_K8S_NAMESPACE_NAME = exports.ATTR_K8S_NAMESPACE_LABEL = exports.ATTR_K8S_NAMESPACE_ANNOTATION = exports.ATTR_K8S_JOB_UID = exports.ATTR_K8S_JOB_NAME = exports.ATTR_K8S_JOB_LABEL = exports.ATTR_K8S_JOB_ANNOTATION = exports.ATTR_K8S_DEPLOYMENT_UID = exports.ATTR_K8S_DEPLOYMENT_NAME = exports.ATTR_K8S_DEPLOYMENT_LABEL = exports.ATTR_K8S_DEPLOYMENT_ANNOTATION = exports.ATTR_K8S_DAEMONSET_UID = exports.ATTR_K8S_DAEMONSET_NAME = undefined;
|
|
299082
|
+
exports.ATTR_USER_AGENT_ORIGINAL = exports.ATTR_URL_SCHEME = exports.ATTR_URL_QUERY = exports.ATTR_URL_PATH = exports.ATTR_URL_FULL = exports.ATTR_URL_FRAGMENT = exports.ATTR_TELEMETRY_SDK_VERSION = exports.ATTR_TELEMETRY_SDK_NAME = exports.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS = exports.TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT = exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUST = exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUBY = exports.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON = exports.TELEMETRY_SDK_LANGUAGE_VALUE_PHP = exports.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS = exports.TELEMETRY_SDK_LANGUAGE_VALUE_KOTLIN = exports.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA = exports.TELEMETRY_SDK_LANGUAGE_VALUE_GO = exports.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG = exports.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET = exports.TELEMETRY_SDK_LANGUAGE_VALUE_CPP = exports.ATTR_TELEMETRY_SDK_LANGUAGE = exports.ATTR_TELEMETRY_DISTRO_VERSION = exports.ATTR_TELEMETRY_DISTRO_NAME = exports.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS = exports.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS = exports.SIGNALR_TRANSPORT_VALUE_LONG_POLLING = exports.ATTR_SIGNALR_TRANSPORT = exports.SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT = exports.SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE = exports.SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN = exports.ATTR_SIGNALR_CONNECTION_STATUS = exports.ATTR_SERVICE_VERSION = exports.ATTR_SERVICE_NAMESPACE = exports.ATTR_SERVICE_NAME = exports.ATTR_SERVICE_INSTANCE_ID = exports.ATTR_SERVER_PORT = exports.ATTR_SERVER_ADDRESS = exports.ATTR_OTEL_STATUS_DESCRIPTION = exports.OTEL_STATUS_CODE_VALUE_OK = exports.OTEL_STATUS_CODE_VALUE_ERROR = exports.ATTR_OTEL_STATUS_CODE = undefined;
|
|
299024
299083
|
exports.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = "aspnetcore.diagnostics.exception.result";
|
|
299025
299084
|
exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED = "aborted";
|
|
299026
299085
|
exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED = "handled";
|
|
@@ -299046,6 +299105,10 @@ var require_stable_attributes = __commonJS((exports) => {
|
|
|
299046
299105
|
exports.ATTR_CODE_FUNCTION_NAME = "code.function.name";
|
|
299047
299106
|
exports.ATTR_CODE_LINE_NUMBER = "code.line.number";
|
|
299048
299107
|
exports.ATTR_CODE_STACKTRACE = "code.stacktrace";
|
|
299108
|
+
exports.ATTR_CONTAINER_ID = "container.id";
|
|
299109
|
+
exports.ATTR_CONTAINER_IMAGE_NAME = "container.image.name";
|
|
299110
|
+
exports.ATTR_CONTAINER_IMAGE_REPO_DIGESTS = "container.image.repo_digests";
|
|
299111
|
+
exports.ATTR_CONTAINER_IMAGE_TAGS = "container.image.tags";
|
|
299049
299112
|
exports.ATTR_DB_COLLECTION_NAME = "db.collection.name";
|
|
299050
299113
|
exports.ATTR_DB_NAMESPACE = "db.namespace";
|
|
299051
299114
|
exports.ATTR_DB_OPERATION_BATCH_SIZE = "db.operation.batch.size";
|
|
@@ -299059,6 +299122,11 @@ var require_stable_attributes = __commonJS((exports) => {
|
|
|
299059
299122
|
exports.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER = "microsoft.sql_server";
|
|
299060
299123
|
exports.DB_SYSTEM_NAME_VALUE_MYSQL = "mysql";
|
|
299061
299124
|
exports.DB_SYSTEM_NAME_VALUE_POSTGRESQL = "postgresql";
|
|
299125
|
+
exports.ATTR_DEPLOYMENT_ENVIRONMENT_NAME = "deployment.environment.name";
|
|
299126
|
+
exports.DEPLOYMENT_ENVIRONMENT_NAME_VALUE_DEVELOPMENT = "development";
|
|
299127
|
+
exports.DEPLOYMENT_ENVIRONMENT_NAME_VALUE_PRODUCTION = "production";
|
|
299128
|
+
exports.DEPLOYMENT_ENVIRONMENT_NAME_VALUE_STAGING = "staging";
|
|
299129
|
+
exports.DEPLOYMENT_ENVIRONMENT_NAME_VALUE_TEST = "test";
|
|
299062
299130
|
exports.ATTR_DOTNET_GC_HEAP_GENERATION = "dotnet.gc.heap.generation";
|
|
299063
299131
|
exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN0 = "gen0";
|
|
299064
299132
|
exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN1 = "gen1";
|
|
@@ -299104,6 +299172,66 @@ var require_stable_attributes = __commonJS((exports) => {
|
|
|
299104
299172
|
exports.JVM_THREAD_STATE_VALUE_TERMINATED = "terminated";
|
|
299105
299173
|
exports.JVM_THREAD_STATE_VALUE_TIMED_WAITING = "timed_waiting";
|
|
299106
299174
|
exports.JVM_THREAD_STATE_VALUE_WAITING = "waiting";
|
|
299175
|
+
exports.ATTR_K8S_CLUSTER_NAME = "k8s.cluster.name";
|
|
299176
|
+
exports.ATTR_K8S_CLUSTER_UID = "k8s.cluster.uid";
|
|
299177
|
+
exports.ATTR_K8S_CONTAINER_NAME = "k8s.container.name";
|
|
299178
|
+
exports.ATTR_K8S_CONTAINER_RESTART_COUNT = "k8s.container.restart_count";
|
|
299179
|
+
var ATTR_K8S_CRONJOB_ANNOTATION = (key2) => `k8s.cronjob.annotation.${key2}`;
|
|
299180
|
+
exports.ATTR_K8S_CRONJOB_ANNOTATION = ATTR_K8S_CRONJOB_ANNOTATION;
|
|
299181
|
+
var ATTR_K8S_CRONJOB_LABEL = (key2) => `k8s.cronjob.label.${key2}`;
|
|
299182
|
+
exports.ATTR_K8S_CRONJOB_LABEL = ATTR_K8S_CRONJOB_LABEL;
|
|
299183
|
+
exports.ATTR_K8S_CRONJOB_NAME = "k8s.cronjob.name";
|
|
299184
|
+
exports.ATTR_K8S_CRONJOB_UID = "k8s.cronjob.uid";
|
|
299185
|
+
var ATTR_K8S_DAEMONSET_ANNOTATION = (key2) => `k8s.daemonset.annotation.${key2}`;
|
|
299186
|
+
exports.ATTR_K8S_DAEMONSET_ANNOTATION = ATTR_K8S_DAEMONSET_ANNOTATION;
|
|
299187
|
+
var ATTR_K8S_DAEMONSET_LABEL = (key2) => `k8s.daemonset.label.${key2}`;
|
|
299188
|
+
exports.ATTR_K8S_DAEMONSET_LABEL = ATTR_K8S_DAEMONSET_LABEL;
|
|
299189
|
+
exports.ATTR_K8S_DAEMONSET_NAME = "k8s.daemonset.name";
|
|
299190
|
+
exports.ATTR_K8S_DAEMONSET_UID = "k8s.daemonset.uid";
|
|
299191
|
+
var ATTR_K8S_DEPLOYMENT_ANNOTATION = (key2) => `k8s.deployment.annotation.${key2}`;
|
|
299192
|
+
exports.ATTR_K8S_DEPLOYMENT_ANNOTATION = ATTR_K8S_DEPLOYMENT_ANNOTATION;
|
|
299193
|
+
var ATTR_K8S_DEPLOYMENT_LABEL = (key2) => `k8s.deployment.label.${key2}`;
|
|
299194
|
+
exports.ATTR_K8S_DEPLOYMENT_LABEL = ATTR_K8S_DEPLOYMENT_LABEL;
|
|
299195
|
+
exports.ATTR_K8S_DEPLOYMENT_NAME = "k8s.deployment.name";
|
|
299196
|
+
exports.ATTR_K8S_DEPLOYMENT_UID = "k8s.deployment.uid";
|
|
299197
|
+
var ATTR_K8S_JOB_ANNOTATION = (key2) => `k8s.job.annotation.${key2}`;
|
|
299198
|
+
exports.ATTR_K8S_JOB_ANNOTATION = ATTR_K8S_JOB_ANNOTATION;
|
|
299199
|
+
var ATTR_K8S_JOB_LABEL = (key2) => `k8s.job.label.${key2}`;
|
|
299200
|
+
exports.ATTR_K8S_JOB_LABEL = ATTR_K8S_JOB_LABEL;
|
|
299201
|
+
exports.ATTR_K8S_JOB_NAME = "k8s.job.name";
|
|
299202
|
+
exports.ATTR_K8S_JOB_UID = "k8s.job.uid";
|
|
299203
|
+
var ATTR_K8S_NAMESPACE_ANNOTATION = (key2) => `k8s.namespace.annotation.${key2}`;
|
|
299204
|
+
exports.ATTR_K8S_NAMESPACE_ANNOTATION = ATTR_K8S_NAMESPACE_ANNOTATION;
|
|
299205
|
+
var ATTR_K8S_NAMESPACE_LABEL = (key2) => `k8s.namespace.label.${key2}`;
|
|
299206
|
+
exports.ATTR_K8S_NAMESPACE_LABEL = ATTR_K8S_NAMESPACE_LABEL;
|
|
299207
|
+
exports.ATTR_K8S_NAMESPACE_NAME = "k8s.namespace.name";
|
|
299208
|
+
var ATTR_K8S_NODE_ANNOTATION = (key2) => `k8s.node.annotation.${key2}`;
|
|
299209
|
+
exports.ATTR_K8S_NODE_ANNOTATION = ATTR_K8S_NODE_ANNOTATION;
|
|
299210
|
+
var ATTR_K8S_NODE_LABEL = (key2) => `k8s.node.label.${key2}`;
|
|
299211
|
+
exports.ATTR_K8S_NODE_LABEL = ATTR_K8S_NODE_LABEL;
|
|
299212
|
+
exports.ATTR_K8S_NODE_NAME = "k8s.node.name";
|
|
299213
|
+
exports.ATTR_K8S_NODE_UID = "k8s.node.uid";
|
|
299214
|
+
var ATTR_K8S_POD_ANNOTATION = (key2) => `k8s.pod.annotation.${key2}`;
|
|
299215
|
+
exports.ATTR_K8S_POD_ANNOTATION = ATTR_K8S_POD_ANNOTATION;
|
|
299216
|
+
exports.ATTR_K8S_POD_HOSTNAME = "k8s.pod.hostname";
|
|
299217
|
+
exports.ATTR_K8S_POD_IP = "k8s.pod.ip";
|
|
299218
|
+
var ATTR_K8S_POD_LABEL = (key2) => `k8s.pod.label.${key2}`;
|
|
299219
|
+
exports.ATTR_K8S_POD_LABEL = ATTR_K8S_POD_LABEL;
|
|
299220
|
+
exports.ATTR_K8S_POD_NAME = "k8s.pod.name";
|
|
299221
|
+
exports.ATTR_K8S_POD_START_TIME = "k8s.pod.start_time";
|
|
299222
|
+
exports.ATTR_K8S_POD_UID = "k8s.pod.uid";
|
|
299223
|
+
var ATTR_K8S_REPLICASET_ANNOTATION = (key2) => `k8s.replicaset.annotation.${key2}`;
|
|
299224
|
+
exports.ATTR_K8S_REPLICASET_ANNOTATION = ATTR_K8S_REPLICASET_ANNOTATION;
|
|
299225
|
+
var ATTR_K8S_REPLICASET_LABEL = (key2) => `k8s.replicaset.label.${key2}`;
|
|
299226
|
+
exports.ATTR_K8S_REPLICASET_LABEL = ATTR_K8S_REPLICASET_LABEL;
|
|
299227
|
+
exports.ATTR_K8S_REPLICASET_NAME = "k8s.replicaset.name";
|
|
299228
|
+
exports.ATTR_K8S_REPLICASET_UID = "k8s.replicaset.uid";
|
|
299229
|
+
var ATTR_K8S_STATEFULSET_ANNOTATION = (key2) => `k8s.statefulset.annotation.${key2}`;
|
|
299230
|
+
exports.ATTR_K8S_STATEFULSET_ANNOTATION = ATTR_K8S_STATEFULSET_ANNOTATION;
|
|
299231
|
+
var ATTR_K8S_STATEFULSET_LABEL = (key2) => `k8s.statefulset.label.${key2}`;
|
|
299232
|
+
exports.ATTR_K8S_STATEFULSET_LABEL = ATTR_K8S_STATEFULSET_LABEL;
|
|
299233
|
+
exports.ATTR_K8S_STATEFULSET_NAME = "k8s.statefulset.name";
|
|
299234
|
+
exports.ATTR_K8S_STATEFULSET_UID = "k8s.statefulset.uid";
|
|
299107
299235
|
exports.ATTR_NETWORK_LOCAL_ADDRESS = "network.local.address";
|
|
299108
299236
|
exports.ATTR_NETWORK_LOCAL_PORT = "network.local.port";
|
|
299109
299237
|
exports.ATTR_NETWORK_PEER_ADDRESS = "network.peer.address";
|
|
@@ -299119,6 +299247,7 @@ var require_stable_attributes = __commonJS((exports) => {
|
|
|
299119
299247
|
exports.ATTR_NETWORK_TYPE = "network.type";
|
|
299120
299248
|
exports.NETWORK_TYPE_VALUE_IPV4 = "ipv4";
|
|
299121
299249
|
exports.NETWORK_TYPE_VALUE_IPV6 = "ipv6";
|
|
299250
|
+
exports.ATTR_OTEL_EVENT_NAME = "otel.event.name";
|
|
299122
299251
|
exports.ATTR_OTEL_SCOPE_NAME = "otel.scope.name";
|
|
299123
299252
|
exports.ATTR_OTEL_SCOPE_VERSION = "otel.scope.version";
|
|
299124
299253
|
exports.ATTR_OTEL_STATUS_CODE = "otel.status_code";
|
|
@@ -299139,12 +299268,15 @@ var require_stable_attributes = __commonJS((exports) => {
|
|
|
299139
299268
|
exports.SIGNALR_TRANSPORT_VALUE_LONG_POLLING = "long_polling";
|
|
299140
299269
|
exports.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS = "server_sent_events";
|
|
299141
299270
|
exports.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS = "web_sockets";
|
|
299271
|
+
exports.ATTR_TELEMETRY_DISTRO_NAME = "telemetry.distro.name";
|
|
299272
|
+
exports.ATTR_TELEMETRY_DISTRO_VERSION = "telemetry.distro.version";
|
|
299142
299273
|
exports.ATTR_TELEMETRY_SDK_LANGUAGE = "telemetry.sdk.language";
|
|
299143
299274
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_CPP = "cpp";
|
|
299144
299275
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET = "dotnet";
|
|
299145
299276
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG = "erlang";
|
|
299146
299277
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_GO = "go";
|
|
299147
299278
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA = "java";
|
|
299279
|
+
exports.TELEMETRY_SDK_LANGUAGE_VALUE_KOTLIN = "kotlin";
|
|
299148
299280
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS = "nodejs";
|
|
299149
299281
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_PHP = "php";
|
|
299150
299282
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON = "python";
|
|
@@ -299338,7 +299470,7 @@ var require_platform = __commonJS((exports) => {
|
|
|
299338
299470
|
// node_modules/@opentelemetry/core/build/src/common/time.js
|
|
299339
299471
|
var require_time = __commonJS((exports) => {
|
|
299340
299472
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
299341
|
-
exports.addHrTimes = exports.isTimeInput = exports.isTimeInputHrTime = exports.
|
|
299473
|
+
exports.addHrTimes = exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToSeconds = exports.hrTimeToMilliseconds = exports.hrTimeToMicroseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = exports.getTimeOrigin = exports.millisToHrTime = undefined;
|
|
299342
299474
|
var platform_1 = require_platform();
|
|
299343
299475
|
var NANOSECOND_DIGITS = 9;
|
|
299344
299476
|
var NANOSECOND_DIGITS_IN_MILLIS = 6;
|
|
@@ -299365,7 +299497,7 @@ var require_time = __commonJS((exports) => {
|
|
|
299365
299497
|
if (isTimeInputHrTime(time3)) {
|
|
299366
299498
|
return time3;
|
|
299367
299499
|
} else if (typeof time3 === "number") {
|
|
299368
|
-
if (time3 < platform_1.otperformance.timeOrigin) {
|
|
299500
|
+
if (time3 < platform_1.otperformance.timeOrigin / 2) {
|
|
299369
299501
|
return hrTime(time3);
|
|
299370
299502
|
} else {
|
|
299371
299503
|
return millisToHrTime(time3);
|
|
@@ -299399,14 +299531,18 @@ var require_time = __commonJS((exports) => {
|
|
|
299399
299531
|
return time3[0] * SECOND_TO_NANOSECONDS + time3[1];
|
|
299400
299532
|
}
|
|
299401
299533
|
exports.hrTimeToNanoseconds = hrTimeToNanoseconds;
|
|
299534
|
+
function hrTimeToMicroseconds(time3) {
|
|
299535
|
+
return time3[0] * 1e6 + time3[1] / 1000;
|
|
299536
|
+
}
|
|
299537
|
+
exports.hrTimeToMicroseconds = hrTimeToMicroseconds;
|
|
299402
299538
|
function hrTimeToMilliseconds(time3) {
|
|
299403
299539
|
return time3[0] * 1000 + time3[1] / 1e6;
|
|
299404
299540
|
}
|
|
299405
299541
|
exports.hrTimeToMilliseconds = hrTimeToMilliseconds;
|
|
299406
|
-
function
|
|
299407
|
-
return time3[0]
|
|
299542
|
+
function hrTimeToSeconds(time3) {
|
|
299543
|
+
return time3[0] + time3[1] / SECOND_TO_NANOSECONDS;
|
|
299408
299544
|
}
|
|
299409
|
-
exports.
|
|
299545
|
+
exports.hrTimeToSeconds = hrTimeToSeconds;
|
|
299410
299546
|
function isTimeInputHrTime(value) {
|
|
299411
299547
|
return Array.isArray(value) && value.length === 2 && typeof value[0] === "number" && typeof value[1] === "number";
|
|
299412
299548
|
}
|
|
@@ -299460,7 +299596,14 @@ var require_composite = __commonJS((exports) => {
|
|
|
299460
299596
|
_fields;
|
|
299461
299597
|
constructor(config4 = {}) {
|
|
299462
299598
|
this._propagators = config4.propagators ?? [];
|
|
299463
|
-
|
|
299599
|
+
const fields = new Set;
|
|
299600
|
+
for (const propagator of this._propagators) {
|
|
299601
|
+
const propagatorFields = typeof propagator.fields === "function" ? propagator.fields() : [];
|
|
299602
|
+
for (const field of propagatorFields) {
|
|
299603
|
+
fields.add(field);
|
|
299604
|
+
}
|
|
299605
|
+
}
|
|
299606
|
+
this._fields = Array.from(fields);
|
|
299464
299607
|
}
|
|
299465
299608
|
inject(context, carrier, setter) {
|
|
299466
299609
|
for (const propagator of this._propagators) {
|
|
@@ -299519,58 +299662,99 @@ var require_TraceState = __commonJS((exports) => {
|
|
|
299519
299662
|
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
299520
299663
|
|
|
299521
299664
|
class TraceState {
|
|
299522
|
-
|
|
299665
|
+
_length;
|
|
299666
|
+
_rawTraceState;
|
|
299667
|
+
_internalState;
|
|
299523
299668
|
constructor(rawTraceState) {
|
|
299524
|
-
|
|
299525
|
-
|
|
299669
|
+
this._rawTraceState = typeof rawTraceState === "string" ? rawTraceState : "";
|
|
299670
|
+
this._length = this._rawTraceState.length;
|
|
299526
299671
|
}
|
|
299527
299672
|
set(key2, value) {
|
|
299528
|
-
|
|
299529
|
-
|
|
299530
|
-
traceState._internalState.delete(key2);
|
|
299673
|
+
if (!(0, validators_1.validateKey)(key2) || !(0, validators_1.validateValue)(value)) {
|
|
299674
|
+
return this;
|
|
299531
299675
|
}
|
|
299532
|
-
|
|
299533
|
-
|
|
299676
|
+
const currState = this._getState();
|
|
299677
|
+
const currValue = currState.get(key2);
|
|
299678
|
+
let newLength = this._length;
|
|
299679
|
+
if (typeof currValue === "string") {
|
|
299680
|
+
newLength += value.length - currValue.length;
|
|
299681
|
+
} else {
|
|
299682
|
+
newLength += key2.length + value.length + (currState.size > 0 ? 2 : 1);
|
|
299683
|
+
}
|
|
299684
|
+
if (newLength > MAX_TRACE_STATE_LEN) {
|
|
299685
|
+
return this;
|
|
299686
|
+
}
|
|
299687
|
+
const newState = new Map(currState);
|
|
299688
|
+
newState.delete(key2);
|
|
299689
|
+
newState.set(key2, value);
|
|
299690
|
+
return this._fromState(newState, newLength);
|
|
299534
299691
|
}
|
|
299535
299692
|
unset(key2) {
|
|
299536
|
-
const
|
|
299537
|
-
|
|
299538
|
-
|
|
299693
|
+
const currState = this._getState();
|
|
299694
|
+
const currValue = currState.get(key2);
|
|
299695
|
+
if (typeof currValue !== "string") {
|
|
299696
|
+
return this;
|
|
299697
|
+
}
|
|
299698
|
+
let newLength = this._length - (key2.length + currValue.length + 1);
|
|
299699
|
+
if (currState.size > 1) {
|
|
299700
|
+
newLength = newLength - 1;
|
|
299701
|
+
}
|
|
299702
|
+
const newState = new Map(currState);
|
|
299703
|
+
newState.delete(key2);
|
|
299704
|
+
return this._fromState(newState, newLength);
|
|
299539
299705
|
}
|
|
299540
299706
|
get(key2) {
|
|
299541
|
-
|
|
299707
|
+
const currState = this._getState();
|
|
299708
|
+
return currState.get(key2);
|
|
299542
299709
|
}
|
|
299543
299710
|
serialize() {
|
|
299544
|
-
|
|
299545
|
-
|
|
299546
|
-
|
|
299547
|
-
|
|
299548
|
-
|
|
299549
|
-
_parse(rawTraceState) {
|
|
299550
|
-
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
299551
|
-
return;
|
|
299552
|
-
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reverse().reduce((agg, part) => {
|
|
299553
|
-
const listMember = part.trim();
|
|
299554
|
-
const i3 = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
299555
|
-
if (i3 !== -1) {
|
|
299556
|
-
const key2 = listMember.slice(0, i3);
|
|
299557
|
-
const value = listMember.slice(i3 + 1, part.length);
|
|
299558
|
-
if ((0, validators_1.validateKey)(key2) && (0, validators_1.validateValue)(value)) {
|
|
299559
|
-
agg.set(key2, value);
|
|
299560
|
-
} else {}
|
|
299711
|
+
let serialized = "";
|
|
299712
|
+
let index = 0;
|
|
299713
|
+
for (const entry of this._getState()) {
|
|
299714
|
+
if (index > 0) {
|
|
299715
|
+
serialized = LIST_MEMBERS_SEPARATOR + serialized;
|
|
299561
299716
|
}
|
|
299562
|
-
|
|
299563
|
-
|
|
299564
|
-
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
299565
|
-
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
299717
|
+
serialized = `${entry[0]}${LIST_MEMBER_KEY_VALUE_SPLITTER}${entry[1]}` + serialized;
|
|
299718
|
+
index++;
|
|
299566
299719
|
}
|
|
299720
|
+
return serialized;
|
|
299567
299721
|
}
|
|
299568
|
-
|
|
299569
|
-
|
|
299722
|
+
_getState() {
|
|
299723
|
+
if (this._internalState) {
|
|
299724
|
+
return this._internalState;
|
|
299725
|
+
}
|
|
299726
|
+
const vendorMembers = this._rawTraceState.split(LIST_MEMBERS_SEPARATOR);
|
|
299727
|
+
const vendorEntries = new Map;
|
|
299728
|
+
let currentLength = 0;
|
|
299729
|
+
for (const member of vendorMembers) {
|
|
299730
|
+
const m2 = member.trim();
|
|
299731
|
+
const idx = m2.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
299732
|
+
if (idx === -1) {
|
|
299733
|
+
continue;
|
|
299734
|
+
}
|
|
299735
|
+
const key2 = m2.slice(0, idx);
|
|
299736
|
+
const value = m2.slice(idx + 1);
|
|
299737
|
+
if (!(0, validators_1.validateKey)(key2) || !(0, validators_1.validateValue)(value)) {
|
|
299738
|
+
continue;
|
|
299739
|
+
}
|
|
299740
|
+
const futureLength = currentLength + m2.length + (vendorEntries.size > 0 ? 1 : 0);
|
|
299741
|
+
if (futureLength > MAX_TRACE_STATE_LEN) {
|
|
299742
|
+
continue;
|
|
299743
|
+
}
|
|
299744
|
+
vendorEntries.set(key2, value);
|
|
299745
|
+
currentLength = futureLength;
|
|
299746
|
+
if (vendorEntries.size >= MAX_TRACE_STATE_ITEMS) {
|
|
299747
|
+
break;
|
|
299748
|
+
}
|
|
299749
|
+
}
|
|
299750
|
+
this._length = currentLength;
|
|
299751
|
+
this._internalState = new Map(Array.from(vendorEntries.entries()).reverse());
|
|
299752
|
+
return this._internalState;
|
|
299570
299753
|
}
|
|
299571
|
-
|
|
299572
|
-
const traceState =
|
|
299573
|
-
traceState._internalState =
|
|
299754
|
+
_fromState(state, length) {
|
|
299755
|
+
const traceState = Object.create(TraceState.prototype);
|
|
299756
|
+
traceState._internalState = state;
|
|
299757
|
+
traceState._length = length;
|
|
299574
299758
|
return traceState;
|
|
299575
299759
|
}
|
|
299576
299760
|
}
|
|
@@ -299763,6 +299947,9 @@ var require_merge2 = __commonJS((exports) => {
|
|
|
299763
299947
|
const keys2 = Object.keys(two);
|
|
299764
299948
|
for (let i3 = 0, j2 = keys2.length;i3 < j2; i3++) {
|
|
299765
299949
|
const key2 = keys2[i3];
|
|
299950
|
+
if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") {
|
|
299951
|
+
continue;
|
|
299952
|
+
}
|
|
299766
299953
|
result[key2] = takeValue(two[key2]);
|
|
299767
299954
|
}
|
|
299768
299955
|
}
|
|
@@ -299775,6 +299962,9 @@ var require_merge2 = __commonJS((exports) => {
|
|
|
299775
299962
|
const keys2 = Object.keys(two);
|
|
299776
299963
|
for (let i3 = 0, j2 = keys2.length;i3 < j2; i3++) {
|
|
299777
299964
|
const key2 = keys2[i3];
|
|
299965
|
+
if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") {
|
|
299966
|
+
continue;
|
|
299967
|
+
}
|
|
299778
299968
|
const twoValue = two[key2];
|
|
299779
299969
|
if (isPrimitive(twoValue)) {
|
|
299780
299970
|
if (typeof twoValue === "undefined") {
|
|
@@ -300003,7 +300193,8 @@ var require_exporter = __commonJS((exports) => {
|
|
|
300003
300193
|
// node_modules/@opentelemetry/core/build/src/index.js
|
|
300004
300194
|
var require_src5 = __commonJS((exports) => {
|
|
300005
300195
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
300006
|
-
exports.
|
|
300196
|
+
exports.diagLogLevelFromString = exports.BindOnceFuture = exports.urlMatches = exports.isUrlIgnored = exports.callWithTimeout = exports.TimeoutError = exports.merge = exports.TraceState = exports.unsuppressTracing = exports.suppressTracing = exports.isTracingSuppressed = exports.setRPCMetadata = exports.getRPCMetadata = exports.deleteRPCMetadata = exports.RPCType = exports.parseTraceParent = exports.W3CTraceContextPropagator = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = exports.CompositePropagator = exports.otperformance = exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = exports._globalThis = exports.SDK_INFO = exports.parseKeyPairsIntoRecord = exports.ExportResultCode = exports.unrefTimer = exports.timeInputToHrTime = exports.millisToHrTime = exports.isTimeInputHrTime = exports.isTimeInput = exports.hrTimeToTimeStamp = exports.hrTimeToSeconds = exports.hrTimeToNanoseconds = exports.hrTimeToMilliseconds = exports.hrTimeToMicroseconds = exports.hrTimeDuration = exports.hrTime = exports.getTimeOrigin = exports.addHrTimes = exports.loggingErrorHandler = exports.setGlobalErrorHandler = exports.globalErrorHandler = exports.sanitizeAttributes = exports.isAttributeValue = exports.AnchoredClock = exports.W3CBaggagePropagator = undefined;
|
|
300197
|
+
exports.internal = undefined;
|
|
300007
300198
|
var W3CBaggagePropagator_1 = require_W3CBaggagePropagator();
|
|
300008
300199
|
Object.defineProperty(exports, "W3CBaggagePropagator", { enumerable: true, get: function() {
|
|
300009
300200
|
return W3CBaggagePropagator_1.W3CBaggagePropagator;
|
|
@@ -300052,6 +300243,9 @@ var require_src5 = __commonJS((exports) => {
|
|
|
300052
300243
|
Object.defineProperty(exports, "hrTimeToNanoseconds", { enumerable: true, get: function() {
|
|
300053
300244
|
return time_1.hrTimeToNanoseconds;
|
|
300054
300245
|
} });
|
|
300246
|
+
Object.defineProperty(exports, "hrTimeToSeconds", { enumerable: true, get: function() {
|
|
300247
|
+
return time_1.hrTimeToSeconds;
|
|
300248
|
+
} });
|
|
300055
300249
|
Object.defineProperty(exports, "hrTimeToTimeStamp", { enumerable: true, get: function() {
|
|
300056
300250
|
return time_1.hrTimeToTimeStamp;
|
|
300057
300251
|
} });
|
|
@@ -300407,11 +300601,11 @@ var require_EnvDetector = __commonJS((exports) => {
|
|
|
300407
300601
|
if (!rawEnvAttributes)
|
|
300408
300602
|
return {};
|
|
300409
300603
|
const attributes = {};
|
|
300410
|
-
const rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR);
|
|
300604
|
+
const rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR).filter((attr) => attr.trim() !== "");
|
|
300411
300605
|
for (const rawAttribute of rawAttributes) {
|
|
300412
300606
|
const keyValuePair = rawAttribute.split(this._LABEL_KEY_VALUE_SPLITTER);
|
|
300413
300607
|
if (keyValuePair.length !== 2) {
|
|
300414
|
-
throw new Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${rawAttribute}". ` +
|
|
300608
|
+
throw new Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${rawAttribute}". ` + "Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.");
|
|
300415
300609
|
}
|
|
300416
300610
|
const [rawKey, rawValue] = keyValuePair;
|
|
300417
300611
|
const key2 = rawKey.trim();
|
|
@@ -300425,7 +300619,7 @@ var require_EnvDetector = __commonJS((exports) => {
|
|
|
300425
300619
|
decodedKey = decodeURIComponent(key2);
|
|
300426
300620
|
decodedValue = decodeURIComponent(value);
|
|
300427
300621
|
} catch (e) {
|
|
300428
|
-
throw new Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${rawAttribute}": ${e instanceof Error ? e.message : e}
|
|
300622
|
+
throw new Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${rawAttribute}": ${e instanceof Error ? e.message : e}`, { cause: e });
|
|
300429
300623
|
}
|
|
300430
300624
|
if (decodedKey.length > this._MAX_LENGTH) {
|
|
300431
300625
|
throw new Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${decodedKey}".`);
|
|
@@ -300889,7 +301083,8 @@ var require_src6 = __commonJS((exports) => {
|
|
|
300889
301083
|
// node_modules/@opentelemetry/sdk-logs/build/src/utils/validation.js
|
|
300890
301084
|
var require_validation3 = __commonJS((exports) => {
|
|
300891
301085
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
300892
|
-
exports.isLogAttributeValue = undefined;
|
|
301086
|
+
exports.normalizeScopeAttributes = exports.addAttribute = exports.AddAttributeDecision = exports.isLogAttributeValue = undefined;
|
|
301087
|
+
var api_1 = require_src2();
|
|
300893
301088
|
function isLogAttributeValue(val) {
|
|
300894
301089
|
return isLogAttributeValueInternal(val, new WeakSet);
|
|
300895
301090
|
}
|
|
@@ -300910,16 +301105,105 @@ var require_validation3 = __commonJS((exports) => {
|
|
|
300910
301105
|
}
|
|
300911
301106
|
visited.add(val);
|
|
300912
301107
|
if (Array.isArray(val)) {
|
|
300913
|
-
|
|
301108
|
+
for (const item of val) {
|
|
301109
|
+
if (!isLogAttributeValueInternal(item, visited)) {
|
|
301110
|
+
return false;
|
|
301111
|
+
}
|
|
301112
|
+
}
|
|
301113
|
+
return true;
|
|
300914
301114
|
}
|
|
300915
301115
|
const obj = val;
|
|
300916
301116
|
if (obj.constructor !== Object && obj.constructor !== undefined) {
|
|
300917
301117
|
return false;
|
|
300918
301118
|
}
|
|
300919
|
-
|
|
301119
|
+
for (const key2 in obj) {
|
|
301120
|
+
if (Object.prototype.hasOwnProperty.call(obj, key2) && !isLogAttributeValueInternal(obj[key2], visited)) {
|
|
301121
|
+
return false;
|
|
301122
|
+
}
|
|
301123
|
+
}
|
|
301124
|
+
return true;
|
|
300920
301125
|
}
|
|
300921
301126
|
return false;
|
|
300922
301127
|
}
|
|
301128
|
+
var AddAttributeDecision;
|
|
301129
|
+
(function(AddAttributeDecision2) {
|
|
301130
|
+
AddAttributeDecision2[AddAttributeDecision2["DROP_INVALID"] = 0] = "DROP_INVALID";
|
|
301131
|
+
AddAttributeDecision2[AddAttributeDecision2["DROP_LIMIT_REACHED"] = 1] = "DROP_LIMIT_REACHED";
|
|
301132
|
+
AddAttributeDecision2[AddAttributeDecision2["ADD_NEW"] = 2] = "ADD_NEW";
|
|
301133
|
+
AddAttributeDecision2[AddAttributeDecision2["ADD_OVERWRITE_EXISTING"] = 3] = "ADD_OVERWRITE_EXISTING";
|
|
301134
|
+
})(AddAttributeDecision = exports.AddAttributeDecision || (exports.AddAttributeDecision = {}));
|
|
301135
|
+
function addAttribute(attributes, limits, currentAttributesCount, key2, value) {
|
|
301136
|
+
if (key2.length === 0) {
|
|
301137
|
+
api_1.diag.warn(`Invalid attribute key: ${key2}`);
|
|
301138
|
+
return AddAttributeDecision.DROP_INVALID;
|
|
301139
|
+
}
|
|
301140
|
+
if (!isLogAttributeValue(value)) {
|
|
301141
|
+
api_1.diag.warn(`Invalid attribute value set for key: ${key2}`);
|
|
301142
|
+
return AddAttributeDecision.DROP_INVALID;
|
|
301143
|
+
}
|
|
301144
|
+
const isNewKey = !Object.prototype.hasOwnProperty.call(attributes, key2);
|
|
301145
|
+
if (isNewKey && currentAttributesCount >= limits.attributeCountLimit) {
|
|
301146
|
+
return AddAttributeDecision.DROP_LIMIT_REACHED;
|
|
301147
|
+
}
|
|
301148
|
+
attributes[key2] = truncateToSize(value, limits.attributeValueLengthLimit);
|
|
301149
|
+
if (isNewKey) {
|
|
301150
|
+
return AddAttributeDecision.ADD_NEW;
|
|
301151
|
+
}
|
|
301152
|
+
return AddAttributeDecision.ADD_OVERWRITE_EXISTING;
|
|
301153
|
+
}
|
|
301154
|
+
exports.addAttribute = addAttribute;
|
|
301155
|
+
function truncateToSize(value, limit) {
|
|
301156
|
+
if (limit <= 0) {
|
|
301157
|
+
api_1.diag.warn(`Attribute value limit must be positive, got ${limit}`);
|
|
301158
|
+
return value;
|
|
301159
|
+
}
|
|
301160
|
+
if (value == null) {
|
|
301161
|
+
return value;
|
|
301162
|
+
}
|
|
301163
|
+
if (typeof value === "string") {
|
|
301164
|
+
if (value.length <= limit) {
|
|
301165
|
+
return value;
|
|
301166
|
+
}
|
|
301167
|
+
return value.substring(0, limit);
|
|
301168
|
+
}
|
|
301169
|
+
if (value instanceof Uint8Array) {
|
|
301170
|
+
return value;
|
|
301171
|
+
}
|
|
301172
|
+
if (Array.isArray(value)) {
|
|
301173
|
+
return value.map((val) => truncateToSize(val, limit));
|
|
301174
|
+
}
|
|
301175
|
+
if (typeof value === "object") {
|
|
301176
|
+
const truncatedObj = {};
|
|
301177
|
+
for (const [k2, v2] of Object.entries(value)) {
|
|
301178
|
+
truncatedObj[k2] = truncateToSize(v2, limit);
|
|
301179
|
+
}
|
|
301180
|
+
return truncatedObj;
|
|
301181
|
+
}
|
|
301182
|
+
return value;
|
|
301183
|
+
}
|
|
301184
|
+
function normalizeScopeAttributes(limits, attributes) {
|
|
301185
|
+
if (attributes == null) {
|
|
301186
|
+
return {};
|
|
301187
|
+
}
|
|
301188
|
+
const normalizedAttributes = {};
|
|
301189
|
+
let currentAttributesCount = 0;
|
|
301190
|
+
let droppedAttributesCount = 0;
|
|
301191
|
+
for (const [key2, value] of Object.entries(attributes)) {
|
|
301192
|
+
const decision = addAttribute(normalizedAttributes, limits, currentAttributesCount, key2, value);
|
|
301193
|
+
if (decision === AddAttributeDecision.ADD_NEW) {
|
|
301194
|
+
currentAttributesCount += 1;
|
|
301195
|
+
} else if (decision === AddAttributeDecision.DROP_INVALID) {
|
|
301196
|
+
droppedAttributesCount += 1;
|
|
301197
|
+
} else if (decision === AddAttributeDecision.DROP_LIMIT_REACHED) {
|
|
301198
|
+
droppedAttributesCount += 1;
|
|
301199
|
+
} else {}
|
|
301200
|
+
}
|
|
301201
|
+
return {
|
|
301202
|
+
attributes: currentAttributesCount > 0 ? normalizedAttributes : undefined,
|
|
301203
|
+
droppedAttributesCount
|
|
301204
|
+
};
|
|
301205
|
+
}
|
|
301206
|
+
exports.normalizeScopeAttributes = normalizeScopeAttributes;
|
|
300923
301207
|
});
|
|
300924
301208
|
|
|
300925
301209
|
// node_modules/@opentelemetry/sdk-logs/build/src/LogRecordImpl.js
|
|
@@ -301012,24 +301296,13 @@ var require_LogRecordImpl = __commonJS((exports) => {
|
|
|
301012
301296
|
if (this._isLogRecordReadonly()) {
|
|
301013
301297
|
return this;
|
|
301014
301298
|
}
|
|
301015
|
-
|
|
301016
|
-
|
|
301017
|
-
return this;
|
|
301018
|
-
}
|
|
301019
|
-
if (!(0, validation_1.isLogAttributeValue)(value)) {
|
|
301020
|
-
api2.diag.warn(`Invalid attribute value set for key: ${key2}`);
|
|
301021
|
-
return this;
|
|
301022
|
-
}
|
|
301023
|
-
const isNewKey = !Object.prototype.hasOwnProperty.call(this.attributes, key2);
|
|
301024
|
-
if (isNewKey && this._attributesCount >= this._logRecordLimits.attributeCountLimit) {
|
|
301299
|
+
const decision = (0, validation_1.addAttribute)(this.attributes, this._logRecordLimits, this._attributesCount, key2, value);
|
|
301300
|
+
if (decision === validation_1.AddAttributeDecision.DROP_LIMIT_REACHED) {
|
|
301025
301301
|
this._droppedAttributesCount++;
|
|
301026
301302
|
if (this._droppedAttributesCount === 1) {
|
|
301027
301303
|
api2.diag.warn("Dropping extra attributes.");
|
|
301028
301304
|
}
|
|
301029
|
-
|
|
301030
|
-
}
|
|
301031
|
-
this.attributes[key2] = this._truncateToSize(value);
|
|
301032
|
-
if (isNewKey) {
|
|
301305
|
+
} else if (decision === validation_1.AddAttributeDecision.ADD_NEW) {
|
|
301033
301306
|
this._attributesCount++;
|
|
301034
301307
|
}
|
|
301035
301308
|
return this;
|
|
@@ -301059,33 +301332,6 @@ var require_LogRecordImpl = __commonJS((exports) => {
|
|
|
301059
301332
|
_makeReadonly() {
|
|
301060
301333
|
this._isReadonly = true;
|
|
301061
301334
|
}
|
|
301062
|
-
_truncateToSize(value) {
|
|
301063
|
-
const limit = this._logRecordLimits.attributeValueLengthLimit;
|
|
301064
|
-
if (limit <= 0) {
|
|
301065
|
-
api2.diag.warn(`Attribute value limit must be positive, got ${limit}`);
|
|
301066
|
-
return value;
|
|
301067
|
-
}
|
|
301068
|
-
if (value == null) {
|
|
301069
|
-
return value;
|
|
301070
|
-
}
|
|
301071
|
-
if (typeof value === "string") {
|
|
301072
|
-
return this._truncateToLimitUtil(value, limit);
|
|
301073
|
-
}
|
|
301074
|
-
if (value instanceof Uint8Array) {
|
|
301075
|
-
return value;
|
|
301076
|
-
}
|
|
301077
|
-
if (Array.isArray(value)) {
|
|
301078
|
-
return value.map((val) => this._truncateToSize(val));
|
|
301079
|
-
}
|
|
301080
|
-
if (typeof value === "object") {
|
|
301081
|
-
const truncatedObj = {};
|
|
301082
|
-
for (const [k2, v2] of Object.entries(value)) {
|
|
301083
|
-
truncatedObj[k2] = this._truncateToSize(v2);
|
|
301084
|
-
}
|
|
301085
|
-
return truncatedObj;
|
|
301086
|
-
}
|
|
301087
|
-
return value;
|
|
301088
|
-
}
|
|
301089
301335
|
_setException(exception) {
|
|
301090
301336
|
let hasMinimumAttributes = false;
|
|
301091
301337
|
if (typeof exception === "string" || typeof exception === "number") {
|
|
@@ -301123,12 +301369,6 @@ var require_LogRecordImpl = __commonJS((exports) => {
|
|
|
301123
301369
|
api2.diag.warn(`Failed to record an exception ${exception}`);
|
|
301124
301370
|
}
|
|
301125
301371
|
}
|
|
301126
|
-
_truncateToLimitUtil(value, limit) {
|
|
301127
|
-
if (value.length <= limit) {
|
|
301128
|
-
return value;
|
|
301129
|
-
}
|
|
301130
|
-
return value.substring(0, limit);
|
|
301131
|
-
}
|
|
301132
301372
|
_isLogRecordReadonly() {
|
|
301133
301373
|
if (this._isReadonly) {
|
|
301134
301374
|
api2.diag.warn("Can not execute the operation on emitted log record");
|
|
@@ -301148,36 +301388,61 @@ var require_Logger = __commonJS((exports) => {
|
|
|
301148
301388
|
var LogRecordImpl_1 = require_LogRecordImpl();
|
|
301149
301389
|
|
|
301150
301390
|
class Logger {
|
|
301151
|
-
|
|
301391
|
+
_instrumentationScope;
|
|
301152
301392
|
_sharedState;
|
|
301153
301393
|
_loggerConfig;
|
|
301154
301394
|
constructor(instrumentationScope, sharedState) {
|
|
301155
|
-
this.
|
|
301395
|
+
this._instrumentationScope = instrumentationScope;
|
|
301156
301396
|
this._sharedState = sharedState;
|
|
301157
|
-
this._loggerConfig = this._sharedState.getLoggerConfig(this.
|
|
301397
|
+
this._loggerConfig = this._sharedState.getLoggerConfig(this._instrumentationScope);
|
|
301158
301398
|
}
|
|
301159
301399
|
emit(logRecord) {
|
|
301160
|
-
const loggerConfig = this._loggerConfig;
|
|
301161
301400
|
const currentContext = logRecord.context || api_1.context.active();
|
|
301162
|
-
|
|
301163
|
-
if (recordSeverity !== api_logs_1.SeverityNumber.UNSPECIFIED && recordSeverity < loggerConfig.minimumSeverity) {
|
|
301401
|
+
if (!this.enabled(logRecord)) {
|
|
301164
301402
|
return;
|
|
301165
301403
|
}
|
|
301404
|
+
const logRecordInstance = new LogRecordImpl_1.LogRecordImpl(this._sharedState, this._instrumentationScope, {
|
|
301405
|
+
context: currentContext,
|
|
301406
|
+
...logRecord
|
|
301407
|
+
});
|
|
301408
|
+
this._sharedState.loggerMetrics.emitLog();
|
|
301409
|
+
this._sharedState.activeProcessor.onEmit(logRecordInstance, currentContext);
|
|
301410
|
+
logRecordInstance._makeReadonly();
|
|
301411
|
+
}
|
|
301412
|
+
enabled(options) {
|
|
301413
|
+
if (this._sharedState.hasShutdown) {
|
|
301414
|
+
return false;
|
|
301415
|
+
}
|
|
301416
|
+
const loggerConfig = this._loggerConfig;
|
|
301417
|
+
if (loggerConfig.disabled) {
|
|
301418
|
+
return false;
|
|
301419
|
+
}
|
|
301420
|
+
const severityNumber = options?.severityNumber;
|
|
301421
|
+
if (typeof severityNumber === "number" && severityNumber !== api_logs_1.SeverityNumber.UNSPECIFIED && severityNumber < loggerConfig.minimumSeverity) {
|
|
301422
|
+
return false;
|
|
301423
|
+
}
|
|
301424
|
+
const currentContext = options?.context || api_1.context.active();
|
|
301166
301425
|
if (loggerConfig.traceBased) {
|
|
301167
301426
|
const spanContext = api_1.trace.getSpanContext(currentContext);
|
|
301168
301427
|
if (spanContext && (0, api_1.isSpanContextValid)(spanContext)) {
|
|
301169
301428
|
const isSampled = (spanContext.traceFlags & api_1.TraceFlags.SAMPLED) === api_1.TraceFlags.SAMPLED;
|
|
301170
301429
|
if (!isSampled) {
|
|
301171
|
-
return;
|
|
301430
|
+
return false;
|
|
301172
301431
|
}
|
|
301173
301432
|
}
|
|
301174
301433
|
}
|
|
301175
|
-
const
|
|
301434
|
+
const enabledOpts = {
|
|
301176
301435
|
context: currentContext,
|
|
301177
|
-
|
|
301178
|
-
|
|
301179
|
-
|
|
301180
|
-
|
|
301436
|
+
instrumentationScope: this._instrumentationScope,
|
|
301437
|
+
severityNumber: options?.severityNumber,
|
|
301438
|
+
eventName: options?.eventName
|
|
301439
|
+
};
|
|
301440
|
+
for (const processor of this._sharedState.processors) {
|
|
301441
|
+
if (!processor.enabled || processor.enabled(enabledOpts)) {
|
|
301442
|
+
return true;
|
|
301443
|
+
}
|
|
301444
|
+
}
|
|
301445
|
+
return false;
|
|
301181
301446
|
}
|
|
301182
301447
|
}
|
|
301183
301448
|
exports.Logger = Logger;
|
|
@@ -301196,6 +301461,9 @@ var require_NoopLogRecordProcessor = __commonJS((exports) => {
|
|
|
301196
301461
|
shutdown() {
|
|
301197
301462
|
return Promise.resolve();
|
|
301198
301463
|
}
|
|
301464
|
+
enabled(_options) {
|
|
301465
|
+
return false;
|
|
301466
|
+
}
|
|
301199
301467
|
}
|
|
301200
301468
|
exports.NoopLogRecordProcessor = NoopLogRecordProcessor;
|
|
301201
301469
|
});
|
|
@@ -301223,6 +301491,14 @@ var require_MultiLogRecordProcessor = __commonJS((exports) => {
|
|
|
301223
301491
|
async shutdown() {
|
|
301224
301492
|
await Promise.all(this.processors.map((processor) => processor.shutdown()));
|
|
301225
301493
|
}
|
|
301494
|
+
enabled(options) {
|
|
301495
|
+
for (const processor of this.processors) {
|
|
301496
|
+
if (!processor.enabled || processor.enabled(options)) {
|
|
301497
|
+
return true;
|
|
301498
|
+
}
|
|
301499
|
+
}
|
|
301500
|
+
return false;
|
|
301501
|
+
}
|
|
301226
301502
|
}
|
|
301227
301503
|
exports.MultiLogRecordProcessor = MultiLogRecordProcessor;
|
|
301228
301504
|
});
|
|
@@ -301231,20 +301507,100 @@ var require_MultiLogRecordProcessor = __commonJS((exports) => {
|
|
|
301231
301507
|
var require_utils12 = __commonJS((exports) => {
|
|
301232
301508
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
301233
301509
|
exports.getInstrumentationScopeKey = undefined;
|
|
301510
|
+
function normalizeAnyValue(value) {
|
|
301511
|
+
if (value === undefined) {
|
|
301512
|
+
return ["u", null];
|
|
301513
|
+
}
|
|
301514
|
+
if (value === null) {
|
|
301515
|
+
return ["n", null];
|
|
301516
|
+
}
|
|
301517
|
+
const valueType = typeof value;
|
|
301518
|
+
if (valueType === "string") {
|
|
301519
|
+
return ["s", value];
|
|
301520
|
+
}
|
|
301521
|
+
if (valueType === "boolean") {
|
|
301522
|
+
return ["b", value];
|
|
301523
|
+
}
|
|
301524
|
+
if (valueType === "number") {
|
|
301525
|
+
if (Number.isNaN(value))
|
|
301526
|
+
return ["nan", null];
|
|
301527
|
+
if (value === Infinity)
|
|
301528
|
+
return ["inf", null];
|
|
301529
|
+
if (value === -Infinity)
|
|
301530
|
+
return ["-inf", null];
|
|
301531
|
+
if (Object.is(value, -0))
|
|
301532
|
+
return ["n0", null];
|
|
301533
|
+
return ["d", value];
|
|
301534
|
+
}
|
|
301535
|
+
if (value instanceof Uint8Array) {
|
|
301536
|
+
return ["bytes", Array.from(value)];
|
|
301537
|
+
}
|
|
301538
|
+
if (Array.isArray(value)) {
|
|
301539
|
+
return ["arr", value.map(normalizeAnyValue)];
|
|
301540
|
+
}
|
|
301541
|
+
return [
|
|
301542
|
+
"map",
|
|
301543
|
+
Object.entries(value).sort(([a2], [b3]) => a2.localeCompare(b3)).map(([k2, v2]) => [k2, normalizeAnyValue(v2)])
|
|
301544
|
+
];
|
|
301545
|
+
}
|
|
301234
301546
|
function getInstrumentationScopeKey(scope) {
|
|
301235
|
-
return
|
|
301547
|
+
return JSON.stringify([
|
|
301548
|
+
scope.name,
|
|
301549
|
+
scope.version || "",
|
|
301550
|
+
scope.schemaUrl || "",
|
|
301551
|
+
normalizeAnyValue(scope.attributes),
|
|
301552
|
+
scope.droppedAttributesCount ?? 0
|
|
301553
|
+
]);
|
|
301236
301554
|
}
|
|
301237
301555
|
exports.getInstrumentationScopeKey = getInstrumentationScopeKey;
|
|
301238
301556
|
});
|
|
301239
301557
|
|
|
301558
|
+
// node_modules/@opentelemetry/sdk-logs/build/src/semconv.js
|
|
301559
|
+
var require_semconv3 = __commonJS((exports) => {
|
|
301560
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
301561
|
+
exports.METRIC_OTEL_SDK_LOG_CREATED = undefined;
|
|
301562
|
+
exports.METRIC_OTEL_SDK_LOG_CREATED = "otel.sdk.log.created";
|
|
301563
|
+
});
|
|
301564
|
+
|
|
301565
|
+
// node_modules/@opentelemetry/sdk-logs/build/src/LoggerMetrics.js
|
|
301566
|
+
var require_LoggerMetrics = __commonJS((exports) => {
|
|
301567
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
301568
|
+
exports.LoggerMetrics = undefined;
|
|
301569
|
+
var semconv_1 = require_semconv3();
|
|
301570
|
+
|
|
301571
|
+
class LoggerMetrics {
|
|
301572
|
+
createdLogs;
|
|
301573
|
+
constructor(meter) {
|
|
301574
|
+
this.createdLogs = meter.createCounter(semconv_1.METRIC_OTEL_SDK_LOG_CREATED, {
|
|
301575
|
+
unit: "{log_record}",
|
|
301576
|
+
description: "The number of logs submitted to enabled SDK Loggers."
|
|
301577
|
+
});
|
|
301578
|
+
}
|
|
301579
|
+
emitLog() {
|
|
301580
|
+
this.createdLogs.add(1);
|
|
301581
|
+
}
|
|
301582
|
+
}
|
|
301583
|
+
exports.LoggerMetrics = LoggerMetrics;
|
|
301584
|
+
});
|
|
301585
|
+
|
|
301586
|
+
// node_modules/@opentelemetry/sdk-logs/build/src/version.js
|
|
301587
|
+
var require_version3 = __commonJS((exports) => {
|
|
301588
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
301589
|
+
exports.VERSION = undefined;
|
|
301590
|
+
exports.VERSION = "0.220.0";
|
|
301591
|
+
});
|
|
301592
|
+
|
|
301240
301593
|
// node_modules/@opentelemetry/sdk-logs/build/src/internal/LoggerProviderSharedState.js
|
|
301241
301594
|
var require_LoggerProviderSharedState = __commonJS((exports) => {
|
|
301242
301595
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
301243
301596
|
exports.LoggerProviderSharedState = exports.DEFAULT_LOGGER_CONFIGURATOR = undefined;
|
|
301597
|
+
var api_1 = require_src2();
|
|
301244
301598
|
var api_logs_1 = require_src3();
|
|
301245
301599
|
var NoopLogRecordProcessor_1 = require_NoopLogRecordProcessor();
|
|
301246
301600
|
var MultiLogRecordProcessor_1 = require_MultiLogRecordProcessor();
|
|
301247
301601
|
var utils_1 = require_utils12();
|
|
301602
|
+
var LoggerMetrics_1 = require_LoggerMetrics();
|
|
301603
|
+
var version_1 = require_version3();
|
|
301248
301604
|
var DEFAULT_LOGGER_CONFIG = {
|
|
301249
301605
|
disabled: false,
|
|
301250
301606
|
minimumSeverity: api_logs_1.SeverityNumber.UNSPECIFIED,
|
|
@@ -301263,9 +301619,11 @@ var require_LoggerProviderSharedState = __commonJS((exports) => {
|
|
|
301263
301619
|
forceFlushTimeoutMillis;
|
|
301264
301620
|
logRecordLimits;
|
|
301265
301621
|
processors;
|
|
301622
|
+
loggerMetrics;
|
|
301623
|
+
hasShutdown = false;
|
|
301266
301624
|
_loggerConfigurator;
|
|
301267
301625
|
_loggerConfigs = new Map;
|
|
301268
|
-
constructor(resource, forceFlushTimeoutMillis, logRecordLimits, processors, loggerConfigurator) {
|
|
301626
|
+
constructor(resource, forceFlushTimeoutMillis, logRecordLimits, processors, loggerConfigurator, meterProvider) {
|
|
301269
301627
|
this.resource = resource;
|
|
301270
301628
|
this.forceFlushTimeoutMillis = forceFlushTimeoutMillis;
|
|
301271
301629
|
this.logRecordLimits = logRecordLimits;
|
|
@@ -301277,6 +301635,8 @@ var require_LoggerProviderSharedState = __commonJS((exports) => {
|
|
|
301277
301635
|
this.activeProcessor = new NoopLogRecordProcessor_1.NoopLogRecordProcessor;
|
|
301278
301636
|
}
|
|
301279
301637
|
this._loggerConfigurator = loggerConfigurator ?? exports.DEFAULT_LOGGER_CONFIGURATOR;
|
|
301638
|
+
const meter = meterProvider ? meterProvider.getMeter("@opentelemetry/sdk-logs", version_1.VERSION) : (0, api_1.createNoopMeter)();
|
|
301639
|
+
this.loggerMetrics = new LoggerMetrics_1.LoggerMetrics(meter);
|
|
301280
301640
|
}
|
|
301281
301641
|
getLoggerConfig(instrumentationScope) {
|
|
301282
301642
|
const key2 = (0, utils_1.getInstrumentationScopeKey)(instrumentationScope);
|
|
@@ -301302,6 +301662,8 @@ var require_LoggerProvider = __commonJS((exports) => {
|
|
|
301302
301662
|
var core_1 = require_src5();
|
|
301303
301663
|
var Logger_1 = require_Logger();
|
|
301304
301664
|
var LoggerProviderSharedState_1 = require_LoggerProviderSharedState();
|
|
301665
|
+
var utils_1 = require_utils12();
|
|
301666
|
+
var validation_1 = require_validation3();
|
|
301305
301667
|
exports.DEFAULT_LOGGER_NAME = "unknown";
|
|
301306
301668
|
|
|
301307
301669
|
class LoggerProvider {
|
|
@@ -301316,23 +301678,30 @@ var require_LoggerProvider = __commonJS((exports) => {
|
|
|
301316
301678
|
attributeValueLengthLimit: config4.logRecordLimits?.attributeValueLengthLimit ?? Infinity
|
|
301317
301679
|
},
|
|
301318
301680
|
loggerConfigurator: config4.loggerConfigurator ?? LoggerProviderSharedState_1.DEFAULT_LOGGER_CONFIGURATOR,
|
|
301319
|
-
processors: config4.processors ?? []
|
|
301681
|
+
processors: config4.processors ?? [],
|
|
301682
|
+
meterProvider: config4.meterProvider
|
|
301320
301683
|
};
|
|
301321
|
-
this._sharedState = new LoggerProviderSharedState_1.LoggerProviderSharedState(mergedConfig.resource, mergedConfig.forceFlushTimeoutMillis, mergedConfig.logRecordLimits, mergedConfig.processors, mergedConfig.loggerConfigurator);
|
|
301684
|
+
this._sharedState = new LoggerProviderSharedState_1.LoggerProviderSharedState(mergedConfig.resource, mergedConfig.forceFlushTimeoutMillis, mergedConfig.logRecordLimits, mergedConfig.processors, mergedConfig.loggerConfigurator, mergedConfig.meterProvider);
|
|
301322
301685
|
this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);
|
|
301323
301686
|
}
|
|
301324
301687
|
getLogger(name, version2, options) {
|
|
301325
301688
|
if (this._shutdownOnce.isCalled) {
|
|
301326
301689
|
api_1.diag.warn("A shutdown LoggerProvider cannot provide a Logger");
|
|
301327
|
-
return api_logs_1.
|
|
301690
|
+
return (0, api_logs_1.createNoopLogger)();
|
|
301328
301691
|
}
|
|
301329
301692
|
if (!name) {
|
|
301330
301693
|
api_1.diag.warn("Logger requested without instrumentation scope name.");
|
|
301331
301694
|
}
|
|
301332
301695
|
const loggerName = name || exports.DEFAULT_LOGGER_NAME;
|
|
301333
|
-
const
|
|
301696
|
+
const instrumentationScope = {
|
|
301697
|
+
name: loggerName,
|
|
301698
|
+
version: version2,
|
|
301699
|
+
schemaUrl: options?.schemaUrl,
|
|
301700
|
+
...(0, validation_1.normalizeScopeAttributes)(this._sharedState.logRecordLimits, options?.attributes)
|
|
301701
|
+
};
|
|
301702
|
+
const key2 = (0, utils_1.getInstrumentationScopeKey)(instrumentationScope);
|
|
301334
301703
|
if (!this._sharedState.loggers.has(key2)) {
|
|
301335
|
-
this._sharedState.loggers.set(key2, new Logger_1.Logger(
|
|
301704
|
+
this._sharedState.loggers.set(key2, new Logger_1.Logger(instrumentationScope, this._sharedState));
|
|
301336
301705
|
}
|
|
301337
301706
|
return this._sharedState.loggers.get(key2);
|
|
301338
301707
|
}
|
|
@@ -301351,6 +301720,7 @@ var require_LoggerProvider = __commonJS((exports) => {
|
|
|
301351
301720
|
return this._shutdownOnce.call();
|
|
301352
301721
|
}
|
|
301353
301722
|
_shutdown() {
|
|
301723
|
+
this._sharedState.hasShutdown = true;
|
|
301354
301724
|
return this._sharedState.activeProcessor.shutdown();
|
|
301355
301725
|
}
|
|
301356
301726
|
}
|
|
@@ -301367,9 +301737,8 @@ var require_ConsoleLogRecordExporter = __commonJS((exports) => {
|
|
|
301367
301737
|
export(logs, resultCallback) {
|
|
301368
301738
|
this._sendLogRecords(logs, resultCallback);
|
|
301369
301739
|
}
|
|
301370
|
-
|
|
301371
|
-
|
|
301372
|
-
}
|
|
301740
|
+
async forceFlush() {}
|
|
301741
|
+
async shutdown() {}
|
|
301373
301742
|
_exportInfo(logRecord) {
|
|
301374
301743
|
return {
|
|
301375
301744
|
resource: {
|
|
@@ -301407,12 +301776,12 @@ var require_SimpleLogRecordProcessor = __commonJS((exports) => {
|
|
|
301407
301776
|
_exporter;
|
|
301408
301777
|
_shutdownOnce;
|
|
301409
301778
|
_unresolvedExports;
|
|
301410
|
-
constructor(
|
|
301411
|
-
this._exporter = exporter;
|
|
301779
|
+
constructor(options) {
|
|
301780
|
+
this._exporter = options.exporter;
|
|
301412
301781
|
this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);
|
|
301413
301782
|
this._unresolvedExports = new Set;
|
|
301414
301783
|
}
|
|
301415
|
-
onEmit(logRecord) {
|
|
301784
|
+
onEmit(logRecord, _context) {
|
|
301416
301785
|
if (this._shutdownOnce.isCalled) {
|
|
301417
301786
|
return;
|
|
301418
301787
|
}
|
|
@@ -301465,11 +301834,11 @@ var require_InMemoryLogRecordExporter = __commonJS((exports) => {
|
|
|
301465
301834
|
this._finishedLogRecords.push(...logs);
|
|
301466
301835
|
resultCallback({ code: core_1.ExportResultCode.SUCCESS });
|
|
301467
301836
|
}
|
|
301468
|
-
shutdown() {
|
|
301837
|
+
async shutdown() {
|
|
301469
301838
|
this._stopped = true;
|
|
301470
301839
|
this.reset();
|
|
301471
|
-
return Promise.resolve();
|
|
301472
301840
|
}
|
|
301841
|
+
async forceFlush() {}
|
|
301473
301842
|
getFinishedLogRecords() {
|
|
301474
301843
|
return this._finishedLogRecords;
|
|
301475
301844
|
}
|
|
@@ -301486,6 +301855,63 @@ var require_BatchLogRecordProcessorBase = __commonJS((exports) => {
|
|
|
301486
301855
|
exports.BatchLogRecordProcessorBase = undefined;
|
|
301487
301856
|
var api_1 = require_src2();
|
|
301488
301857
|
var core_1 = require_src5();
|
|
301858
|
+
async function waitForResources(logRecords) {
|
|
301859
|
+
const pendingResources = [];
|
|
301860
|
+
for (let i3 = 0, len = logRecords.length;i3 < len; i3++) {
|
|
301861
|
+
const logRecord = logRecords[i3];
|
|
301862
|
+
if (logRecord.resource.asyncAttributesPending && logRecord.resource.waitForAsyncAttributes) {
|
|
301863
|
+
pendingResources.push(logRecord.resource.waitForAsyncAttributes());
|
|
301864
|
+
}
|
|
301865
|
+
}
|
|
301866
|
+
if (pendingResources != null && pendingResources.length > 0) {
|
|
301867
|
+
await Promise.all(pendingResources);
|
|
301868
|
+
}
|
|
301869
|
+
}
|
|
301870
|
+
|
|
301871
|
+
class ExportOperation {
|
|
301872
|
+
_exportCompleted;
|
|
301873
|
+
_exportScheduledPromise;
|
|
301874
|
+
_exportScheduledResolve;
|
|
301875
|
+
constructor(exporter, logRecords, exportTimeoutMillis) {
|
|
301876
|
+
this._exportScheduledPromise = new Promise((resolve25) => {
|
|
301877
|
+
this._exportScheduledResolve = resolve25;
|
|
301878
|
+
});
|
|
301879
|
+
this._exportCompleted = this._executeExport(exporter, logRecords, exportTimeoutMillis);
|
|
301880
|
+
}
|
|
301881
|
+
get exportCompleted() {
|
|
301882
|
+
return this._exportCompleted;
|
|
301883
|
+
}
|
|
301884
|
+
get exportScheduled() {
|
|
301885
|
+
return this._exportScheduledPromise;
|
|
301886
|
+
}
|
|
301887
|
+
async _executeExport(exporter, logRecords, exportTimeoutMillis) {
|
|
301888
|
+
try {
|
|
301889
|
+
await waitForResources(logRecords);
|
|
301890
|
+
await api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), async () => {
|
|
301891
|
+
return this._exportWithTimeout(exporter, logRecords, exportTimeoutMillis);
|
|
301892
|
+
});
|
|
301893
|
+
} catch (e) {
|
|
301894
|
+
(0, core_1.globalErrorHandler)(e);
|
|
301895
|
+
this._exportScheduledResolve();
|
|
301896
|
+
}
|
|
301897
|
+
}
|
|
301898
|
+
async _exportWithTimeout(exporter, logRecords, exportTimeoutMillis) {
|
|
301899
|
+
return new Promise((resolve25, reject2) => {
|
|
301900
|
+
const timer = setTimeout(() => {
|
|
301901
|
+
reject2(new Error("Timeout"));
|
|
301902
|
+
}, exportTimeoutMillis);
|
|
301903
|
+
exporter.export(logRecords, (result) => {
|
|
301904
|
+
clearTimeout(timer);
|
|
301905
|
+
if (result.code === core_1.ExportResultCode.SUCCESS) {
|
|
301906
|
+
resolve25();
|
|
301907
|
+
} else {
|
|
301908
|
+
reject2(result.error ?? new Error("BatchLogRecordProcessor: log record export failed"));
|
|
301909
|
+
}
|
|
301910
|
+
});
|
|
301911
|
+
this._exportScheduledResolve();
|
|
301912
|
+
});
|
|
301913
|
+
}
|
|
301914
|
+
}
|
|
301489
301915
|
|
|
301490
301916
|
class BatchLogRecordProcessorBase {
|
|
301491
301917
|
_maxExportBatchSize;
|
|
@@ -301493,16 +301919,17 @@ var require_BatchLogRecordProcessorBase = __commonJS((exports) => {
|
|
|
301493
301919
|
_scheduledDelayMillis;
|
|
301494
301920
|
_exportTimeoutMillis;
|
|
301495
301921
|
_exporter;
|
|
301496
|
-
|
|
301922
|
+
_currentExport = null;
|
|
301497
301923
|
_finishedLogRecords = [];
|
|
301498
301924
|
_timer;
|
|
301499
301925
|
_shutdownOnce;
|
|
301500
|
-
|
|
301501
|
-
|
|
301502
|
-
this.
|
|
301503
|
-
this.
|
|
301504
|
-
this.
|
|
301505
|
-
this.
|
|
301926
|
+
_flushing = false;
|
|
301927
|
+
constructor(options) {
|
|
301928
|
+
this._exporter = options.exporter;
|
|
301929
|
+
this._maxExportBatchSize = options.maxExportBatchSize ?? 512;
|
|
301930
|
+
this._maxQueueSize = options.maxQueueSize ?? 2048;
|
|
301931
|
+
this._scheduledDelayMillis = options.scheduledDelayMillis ?? 1000;
|
|
301932
|
+
this._exportTimeoutMillis = options.exportTimeoutMillis ?? 30000;
|
|
301506
301933
|
this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);
|
|
301507
301934
|
if (this._maxExportBatchSize > this._maxQueueSize) {
|
|
301508
301935
|
api_1.diag.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize");
|
|
@@ -301521,6 +301948,13 @@ var require_BatchLogRecordProcessorBase = __commonJS((exports) => {
|
|
|
301521
301948
|
}
|
|
301522
301949
|
return this._flushAll();
|
|
301523
301950
|
}
|
|
301951
|
+
_addToBuffer(logRecord) {
|
|
301952
|
+
if (this._finishedLogRecords.length >= this._maxQueueSize) {
|
|
301953
|
+
return;
|
|
301954
|
+
}
|
|
301955
|
+
this._finishedLogRecords.push(logRecord);
|
|
301956
|
+
this._maybeStartTimer();
|
|
301957
|
+
}
|
|
301524
301958
|
shutdown() {
|
|
301525
301959
|
return this._shutdownOnce.call();
|
|
301526
301960
|
}
|
|
@@ -301529,54 +301963,96 @@ var require_BatchLogRecordProcessorBase = __commonJS((exports) => {
|
|
|
301529
301963
|
await this._flushAll();
|
|
301530
301964
|
await this._exporter.shutdown();
|
|
301531
301965
|
}
|
|
301532
|
-
|
|
301533
|
-
if (this.
|
|
301966
|
+
async _flushAll() {
|
|
301967
|
+
if (this._flushing) {
|
|
301534
301968
|
return;
|
|
301535
301969
|
}
|
|
301536
|
-
this.
|
|
301970
|
+
this._flushing = true;
|
|
301971
|
+
let toFlush = this._finishedLogRecords;
|
|
301972
|
+
this._finishedLogRecords = [];
|
|
301973
|
+
this._clearTimer();
|
|
301974
|
+
const inFlight = this._currentExport;
|
|
301975
|
+
if (inFlight !== null) {
|
|
301976
|
+
await this._exporter.forceFlush();
|
|
301977
|
+
await inFlight.exportCompleted;
|
|
301978
|
+
this._currentExport = null;
|
|
301979
|
+
}
|
|
301980
|
+
while (toFlush.length > 0) {
|
|
301981
|
+
let batch;
|
|
301982
|
+
if (toFlush.length <= this._maxExportBatchSize) {
|
|
301983
|
+
batch = toFlush;
|
|
301984
|
+
toFlush = [];
|
|
301985
|
+
} else {
|
|
301986
|
+
batch = toFlush.splice(0, this._maxExportBatchSize);
|
|
301987
|
+
}
|
|
301988
|
+
const exportOp = new ExportOperation(this._exporter, batch, this._exportTimeoutMillis);
|
|
301989
|
+
this._currentExport = exportOp;
|
|
301990
|
+
try {
|
|
301991
|
+
await exportOp.exportScheduled;
|
|
301992
|
+
await this._exporter.forceFlush();
|
|
301993
|
+
await exportOp.exportCompleted;
|
|
301994
|
+
} catch (e) {
|
|
301995
|
+
(0, core_1.globalErrorHandler)(e);
|
|
301996
|
+
} finally {
|
|
301997
|
+
this._currentExport = null;
|
|
301998
|
+
}
|
|
301999
|
+
}
|
|
302000
|
+
this._flushing = false;
|
|
301537
302001
|
this._maybeStartTimer();
|
|
301538
302002
|
}
|
|
301539
|
-
|
|
301540
|
-
|
|
301541
|
-
|
|
301542
|
-
|
|
301543
|
-
|
|
301544
|
-
|
|
301545
|
-
|
|
301546
|
-
|
|
301547
|
-
|
|
301548
|
-
|
|
301549
|
-
}
|
|
302003
|
+
_extractBatch() {
|
|
302004
|
+
if (this._finishedLogRecords.length === 0) {
|
|
302005
|
+
return null;
|
|
302006
|
+
}
|
|
302007
|
+
if (this._finishedLogRecords.length <= this._maxExportBatchSize) {
|
|
302008
|
+
const batch = this._finishedLogRecords;
|
|
302009
|
+
this._finishedLogRecords = [];
|
|
302010
|
+
return batch;
|
|
302011
|
+
} else {
|
|
302012
|
+
return this._finishedLogRecords.splice(0, this._maxExportBatchSize);
|
|
302013
|
+
}
|
|
301550
302014
|
}
|
|
301551
|
-
|
|
302015
|
+
_exportOneBatch() {
|
|
301552
302016
|
this._clearTimer();
|
|
301553
|
-
|
|
301554
|
-
|
|
302017
|
+
const logRecords = this._extractBatch();
|
|
302018
|
+
if (logRecords === null) {
|
|
302019
|
+
return;
|
|
301555
302020
|
}
|
|
301556
|
-
|
|
302021
|
+
const exportOp = new ExportOperation(this._exporter, logRecords, this._exportTimeoutMillis);
|
|
302022
|
+
this._currentExport = exportOp;
|
|
302023
|
+
exportOp.exportCompleted.then(() => {
|
|
302024
|
+
this._currentExport = null;
|
|
302025
|
+
this._maybeStartTimer();
|
|
302026
|
+
}).catch((error49) => {
|
|
302027
|
+
this._currentExport = null;
|
|
302028
|
+
(0, core_1.globalErrorHandler)(error49);
|
|
302029
|
+
this._maybeStartTimer();
|
|
302030
|
+
});
|
|
301557
302031
|
}
|
|
301558
302032
|
_maybeStartTimer() {
|
|
301559
|
-
if (this.
|
|
302033
|
+
if (this._shutdownOnce.isCalled) {
|
|
301560
302034
|
return;
|
|
301561
|
-
|
|
301562
|
-
|
|
301563
|
-
|
|
301564
|
-
|
|
301565
|
-
|
|
301566
|
-
|
|
301567
|
-
|
|
301568
|
-
|
|
301569
|
-
|
|
301570
|
-
|
|
301571
|
-
(0, core_1.globalErrorHandler)(e);
|
|
301572
|
-
});
|
|
301573
|
-
};
|
|
302035
|
+
}
|
|
302036
|
+
if (this._flushing) {
|
|
302037
|
+
return;
|
|
302038
|
+
}
|
|
302039
|
+
if (this._finishedLogRecords.length === 0) {
|
|
302040
|
+
return;
|
|
302041
|
+
}
|
|
302042
|
+
if (this._currentExport !== null) {
|
|
302043
|
+
return;
|
|
302044
|
+
}
|
|
301574
302045
|
if (this._finishedLogRecords.length >= this._maxExportBatchSize) {
|
|
301575
|
-
|
|
302046
|
+
this._exportOneBatch();
|
|
302047
|
+
return;
|
|
301576
302048
|
}
|
|
301577
|
-
if (this._timer !== undefined)
|
|
302049
|
+
if (this._timer !== undefined) {
|
|
301578
302050
|
return;
|
|
301579
|
-
|
|
302051
|
+
}
|
|
302052
|
+
this._timer = setTimeout(() => {
|
|
302053
|
+
this._timer = undefined;
|
|
302054
|
+
this._exportOneBatch();
|
|
302055
|
+
}, this._scheduledDelayMillis);
|
|
301580
302056
|
if (typeof this._timer !== "number") {
|
|
301581
302057
|
this._timer.unref();
|
|
301582
302058
|
}
|
|
@@ -301587,25 +302063,6 @@ var require_BatchLogRecordProcessorBase = __commonJS((exports) => {
|
|
|
301587
302063
|
this._timer = undefined;
|
|
301588
302064
|
}
|
|
301589
302065
|
}
|
|
301590
|
-
_export(logRecords) {
|
|
301591
|
-
const doExport = () => core_1.internal._export(this._exporter, logRecords).then((result) => {
|
|
301592
|
-
if (result.code !== core_1.ExportResultCode.SUCCESS) {
|
|
301593
|
-
(0, core_1.globalErrorHandler)(result.error ?? new Error(`BatchLogRecordProcessor: log record export failed (status ${result})`));
|
|
301594
|
-
}
|
|
301595
|
-
}).catch(core_1.globalErrorHandler);
|
|
301596
|
-
const pendingResources = [];
|
|
301597
|
-
for (let i3 = 0;i3 < logRecords.length; i3++) {
|
|
301598
|
-
const resource = logRecords[i3].resource;
|
|
301599
|
-
if (resource.asyncAttributesPending && typeof resource.waitForAsyncAttributes === "function") {
|
|
301600
|
-
pendingResources.push(resource.waitForAsyncAttributes());
|
|
301601
|
-
}
|
|
301602
|
-
}
|
|
301603
|
-
if (pendingResources.length === 0) {
|
|
301604
|
-
return doExport();
|
|
301605
|
-
} else {
|
|
301606
|
-
return Promise.all(pendingResources).then(doExport, core_1.globalErrorHandler);
|
|
301607
|
-
}
|
|
301608
|
-
}
|
|
301609
302066
|
}
|
|
301610
302067
|
exports.BatchLogRecordProcessorBase = BatchLogRecordProcessorBase;
|
|
301611
302068
|
});
|
|
@@ -303071,6 +303528,57 @@ var require_AggregationSelector = __commonJS((exports) => {
|
|
|
303071
303528
|
exports.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;
|
|
303072
303529
|
});
|
|
303073
303530
|
|
|
303531
|
+
// node_modules/@opentelemetry/sdk-metrics/build/src/semconv.js
|
|
303532
|
+
var require_semconv4 = __commonJS((exports) => {
|
|
303533
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
303534
|
+
exports.ATTR_ERROR_TYPE = exports.METRIC_OTEL_SDK_METRIC_READER_COLLECTION_DURATION = exports.OTEL_COMPONENT_TYPE_VALUE_PERIODIC_METRIC_READER = exports.ATTR_OTEL_COMPONENT_TYPE = exports.ATTR_OTEL_COMPONENT_NAME = undefined;
|
|
303535
|
+
exports.ATTR_OTEL_COMPONENT_NAME = "otel.component.name";
|
|
303536
|
+
exports.ATTR_OTEL_COMPONENT_TYPE = "otel.component.type";
|
|
303537
|
+
exports.OTEL_COMPONENT_TYPE_VALUE_PERIODIC_METRIC_READER = "periodic_metric_reader";
|
|
303538
|
+
exports.METRIC_OTEL_SDK_METRIC_READER_COLLECTION_DURATION = "otel.sdk.metric_reader.collection.duration";
|
|
303539
|
+
exports.ATTR_ERROR_TYPE = "error.type";
|
|
303540
|
+
});
|
|
303541
|
+
|
|
303542
|
+
// node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReaderMetrics.js
|
|
303543
|
+
var require_MetricReaderMetrics = __commonJS((exports) => {
|
|
303544
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
303545
|
+
exports.MetricReaderMetrics = undefined;
|
|
303546
|
+
var semconv_1 = require_semconv4();
|
|
303547
|
+
var componentCounter = new Map;
|
|
303548
|
+
|
|
303549
|
+
class MetricReaderMetrics {
|
|
303550
|
+
collectionDuration;
|
|
303551
|
+
standardAttrs;
|
|
303552
|
+
constructor(componentType, meter) {
|
|
303553
|
+
const counter = componentCounter.get(componentType) ?? 0;
|
|
303554
|
+
componentCounter.set(componentType, counter + 1);
|
|
303555
|
+
this.standardAttrs = {
|
|
303556
|
+
[semconv_1.ATTR_OTEL_COMPONENT_TYPE]: componentType,
|
|
303557
|
+
[semconv_1.ATTR_OTEL_COMPONENT_NAME]: `${componentType}/${counter}`
|
|
303558
|
+
};
|
|
303559
|
+
this.collectionDuration = meter.createHistogram(semconv_1.METRIC_OTEL_SDK_METRIC_READER_COLLECTION_DURATION, {
|
|
303560
|
+
unit: "s",
|
|
303561
|
+
description: "The duration of the collect operation of the metric reader.",
|
|
303562
|
+
advice: {
|
|
303563
|
+
explicitBucketBoundaries: []
|
|
303564
|
+
}
|
|
303565
|
+
});
|
|
303566
|
+
}
|
|
303567
|
+
recordCollection(durationSecs, error49) {
|
|
303568
|
+
const attrs = error49 ? { ...this.standardAttrs, [semconv_1.ATTR_ERROR_TYPE]: error49 } : this.standardAttrs;
|
|
303569
|
+
this.collectionDuration.record(durationSecs, attrs);
|
|
303570
|
+
}
|
|
303571
|
+
}
|
|
303572
|
+
exports.MetricReaderMetrics = MetricReaderMetrics;
|
|
303573
|
+
});
|
|
303574
|
+
|
|
303575
|
+
// node_modules/@opentelemetry/sdk-metrics/build/src/version.js
|
|
303576
|
+
var require_version4 = __commonJS((exports) => {
|
|
303577
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
303578
|
+
exports.VERSION = undefined;
|
|
303579
|
+
exports.VERSION = "2.9.0";
|
|
303580
|
+
});
|
|
303581
|
+
|
|
303074
303582
|
// node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.js
|
|
303075
303583
|
var require_MetricReader = __commonJS((exports) => {
|
|
303076
303584
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -303078,19 +303586,26 @@ var require_MetricReader = __commonJS((exports) => {
|
|
|
303078
303586
|
var api2 = require_src2();
|
|
303079
303587
|
var utils_1 = require_utils13();
|
|
303080
303588
|
var AggregationSelector_1 = require_AggregationSelector();
|
|
303589
|
+
var MetricReaderMetrics_1 = require_MetricReaderMetrics();
|
|
303590
|
+
var version_1 = require_version4();
|
|
303591
|
+
var core_1 = require_src5();
|
|
303081
303592
|
|
|
303082
303593
|
class MetricReader {
|
|
303083
303594
|
_shutdown = false;
|
|
303084
303595
|
_metricProducers;
|
|
303085
303596
|
_sdkMetricProducer;
|
|
303597
|
+
_selfObsMetrics;
|
|
303086
303598
|
_aggregationTemporalitySelector;
|
|
303087
303599
|
_aggregationSelector;
|
|
303088
303600
|
_cardinalitySelector;
|
|
303601
|
+
_otelComponentType;
|
|
303089
303602
|
constructor(options) {
|
|
303090
303603
|
this._aggregationSelector = options?.aggregationSelector ?? AggregationSelector_1.DEFAULT_AGGREGATION_SELECTOR;
|
|
303091
303604
|
this._aggregationTemporalitySelector = options?.aggregationTemporalitySelector ?? AggregationSelector_1.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;
|
|
303092
303605
|
this._metricProducers = options?.metricProducers ?? [];
|
|
303093
303606
|
this._cardinalitySelector = options?.cardinalitySelector;
|
|
303607
|
+
this._otelComponentType = options?.otelComponentType ?? this.constructor.name;
|
|
303608
|
+
this._selfObsMetrics = new MetricReaderMetrics_1.MetricReaderMetrics(this._otelComponentType, api2.createNoopMeter());
|
|
303094
303609
|
}
|
|
303095
303610
|
setMetricProducer(metricProducer) {
|
|
303096
303611
|
if (this._sdkMetricProducer) {
|
|
@@ -303099,6 +303614,10 @@ var require_MetricReader = __commonJS((exports) => {
|
|
|
303099
303614
|
this._sdkMetricProducer = metricProducer;
|
|
303100
303615
|
this.onInitialized();
|
|
303101
303616
|
}
|
|
303617
|
+
_setSelfObsMeterProvider(meterProvider) {
|
|
303618
|
+
const meter = meterProvider.getMeter("@opentelemetry/sdk-metrics", version_1.VERSION);
|
|
303619
|
+
this._selfObsMetrics = new MetricReaderMetrics_1.MetricReaderMetrics(this._otelComponentType, meter);
|
|
303620
|
+
}
|
|
303102
303621
|
selectAggregation(instrumentType) {
|
|
303103
303622
|
return this._aggregationSelector(instrumentType);
|
|
303104
303623
|
}
|
|
@@ -303116,6 +303635,7 @@ var require_MetricReader = __commonJS((exports) => {
|
|
|
303116
303635
|
if (this._shutdown) {
|
|
303117
303636
|
throw new Error("MetricReader is shutdown");
|
|
303118
303637
|
}
|
|
303638
|
+
const startTime = (0, core_1.hrTime)();
|
|
303119
303639
|
const [sdkCollectionResults, ...additionalCollectionResults] = await Promise.all([
|
|
303120
303640
|
this._sdkMetricProducer.collect({
|
|
303121
303641
|
timeoutMillis: options?.timeoutMillis
|
|
@@ -303124,7 +303644,10 @@ var require_MetricReader = __commonJS((exports) => {
|
|
|
303124
303644
|
timeoutMillis: options?.timeoutMillis
|
|
303125
303645
|
}))
|
|
303126
303646
|
]);
|
|
303647
|
+
const endTime = (0, core_1.hrTime)();
|
|
303127
303648
|
const errors6 = sdkCollectionResults.errors.concat(additionalCollectionResults.flatMap((result) => result.errors));
|
|
303649
|
+
const collectDuration = (0, core_1.hrTimeToSeconds)((0, core_1.hrTimeDuration)(startTime, endTime));
|
|
303650
|
+
this._selfObsMetrics.recordCollection(collectDuration, errors6.length > 0 ? errors6[0].name ?? "collect_error" : undefined);
|
|
303128
303651
|
const resource = sdkCollectionResults.resourceMetrics.resource;
|
|
303129
303652
|
const scopeMetrics = sdkCollectionResults.resourceMetrics.scopeMetrics.concat(additionalCollectionResults.flatMap((result) => result.resourceMetrics.scopeMetrics));
|
|
303130
303653
|
return {
|
|
@@ -303162,6 +303685,67 @@ var require_MetricReader = __commonJS((exports) => {
|
|
|
303162
303685
|
exports.MetricReader = MetricReader;
|
|
303163
303686
|
});
|
|
303164
303687
|
|
|
303688
|
+
// node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricDataSplitter.js
|
|
303689
|
+
var require_MetricDataSplitter = __commonJS((exports) => {
|
|
303690
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
303691
|
+
exports.splitMetricData = undefined;
|
|
303692
|
+
function splitMetricData(resourceMetrics, maxExportBatchSize) {
|
|
303693
|
+
if (!Number.isInteger(maxExportBatchSize) || maxExportBatchSize <= 0) {
|
|
303694
|
+
throw new Error("maxExportBatchSize must be a positive integer");
|
|
303695
|
+
}
|
|
303696
|
+
const batches = [];
|
|
303697
|
+
let currentBatchPoints = 0;
|
|
303698
|
+
let currentScopeMetrics = [];
|
|
303699
|
+
function flush() {
|
|
303700
|
+
if (currentScopeMetrics.length > 0) {
|
|
303701
|
+
batches.push({
|
|
303702
|
+
resource: resourceMetrics.resource,
|
|
303703
|
+
scopeMetrics: currentScopeMetrics
|
|
303704
|
+
});
|
|
303705
|
+
currentScopeMetrics = [];
|
|
303706
|
+
currentBatchPoints = 0;
|
|
303707
|
+
}
|
|
303708
|
+
}
|
|
303709
|
+
for (const scopeMetric of resourceMetrics.scopeMetrics) {
|
|
303710
|
+
let scopeMetricCopy = null;
|
|
303711
|
+
for (const metric of scopeMetric.metrics) {
|
|
303712
|
+
const dataPoints = metric.dataPoints;
|
|
303713
|
+
if (dataPoints.length === 0) {
|
|
303714
|
+
if (!scopeMetricCopy) {
|
|
303715
|
+
scopeMetricCopy = { scope: scopeMetric.scope, metrics: [] };
|
|
303716
|
+
currentScopeMetrics.push(scopeMetricCopy);
|
|
303717
|
+
}
|
|
303718
|
+
scopeMetricCopy.metrics.push(metric);
|
|
303719
|
+
continue;
|
|
303720
|
+
}
|
|
303721
|
+
let offset = 0;
|
|
303722
|
+
while (offset < dataPoints.length) {
|
|
303723
|
+
const spaceLeft = maxExportBatchSize - currentBatchPoints;
|
|
303724
|
+
const take = Math.min(spaceLeft, dataPoints.length - offset);
|
|
303725
|
+
if (!scopeMetricCopy) {
|
|
303726
|
+
scopeMetricCopy = { scope: scopeMetric.scope, metrics: [] };
|
|
303727
|
+
currentScopeMetrics.push(scopeMetricCopy);
|
|
303728
|
+
}
|
|
303729
|
+
const metricCopy = {
|
|
303730
|
+
...metric,
|
|
303731
|
+
dataPoints: dataPoints.slice(offset, offset + take)
|
|
303732
|
+
};
|
|
303733
|
+
scopeMetricCopy.metrics.push(metricCopy);
|
|
303734
|
+
offset += take;
|
|
303735
|
+
currentBatchPoints += take;
|
|
303736
|
+
if (currentBatchPoints === maxExportBatchSize) {
|
|
303737
|
+
flush();
|
|
303738
|
+
scopeMetricCopy = null;
|
|
303739
|
+
}
|
|
303740
|
+
}
|
|
303741
|
+
}
|
|
303742
|
+
}
|
|
303743
|
+
flush();
|
|
303744
|
+
return batches;
|
|
303745
|
+
}
|
|
303746
|
+
exports.splitMetricData = splitMetricData;
|
|
303747
|
+
});
|
|
303748
|
+
|
|
303165
303749
|
// node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.js
|
|
303166
303750
|
var require_PeriodicExportingMetricReader = __commonJS((exports) => {
|
|
303167
303751
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -303170,19 +303754,49 @@ var require_PeriodicExportingMetricReader = __commonJS((exports) => {
|
|
|
303170
303754
|
var core_1 = require_src5();
|
|
303171
303755
|
var MetricReader_1 = require_MetricReader();
|
|
303172
303756
|
var utils_1 = require_utils13();
|
|
303757
|
+
var MetricData_1 = require_MetricData();
|
|
303758
|
+
var MetricDataSplitter_1 = require_MetricDataSplitter();
|
|
303759
|
+
var semconv_1 = require_semconv4();
|
|
303173
303760
|
|
|
303174
303761
|
class PeriodicExportingMetricReader extends MetricReader_1.MetricReader {
|
|
303175
303762
|
_interval;
|
|
303176
303763
|
_exporter;
|
|
303177
303764
|
_exportInterval;
|
|
303178
303765
|
_exportTimeout;
|
|
303766
|
+
_maxExportBatchSize;
|
|
303767
|
+
_ongoingExportPromise = null;
|
|
303179
303768
|
constructor(options) {
|
|
303180
|
-
const { exporter, exportIntervalMillis = 60000, metricProducers } = options;
|
|
303769
|
+
const { exporter, exportIntervalMillis = 60000, metricProducers, cardinalityLimits, maxExportBatchSize } = options;
|
|
303181
303770
|
let { exportTimeoutMillis = 30000 } = options;
|
|
303182
303771
|
super({
|
|
303183
303772
|
aggregationSelector: exporter.selectAggregation?.bind(exporter),
|
|
303184
303773
|
aggregationTemporalitySelector: exporter.selectAggregationTemporality?.bind(exporter),
|
|
303185
|
-
|
|
303774
|
+
otelComponentType: semconv_1.OTEL_COMPONENT_TYPE_VALUE_PERIODIC_METRIC_READER,
|
|
303775
|
+
metricProducers,
|
|
303776
|
+
cardinalitySelector: (instrumentType) => {
|
|
303777
|
+
const limits = {
|
|
303778
|
+
default: 2000,
|
|
303779
|
+
...cardinalityLimits
|
|
303780
|
+
};
|
|
303781
|
+
switch (instrumentType) {
|
|
303782
|
+
case MetricData_1.InstrumentType.COUNTER:
|
|
303783
|
+
return limits.counter ?? limits.default;
|
|
303784
|
+
case MetricData_1.InstrumentType.GAUGE:
|
|
303785
|
+
return limits.gauge ?? limits.default;
|
|
303786
|
+
case MetricData_1.InstrumentType.HISTOGRAM:
|
|
303787
|
+
return limits.histogram ?? limits.default;
|
|
303788
|
+
case MetricData_1.InstrumentType.OBSERVABLE_COUNTER:
|
|
303789
|
+
return limits.observableCounter ?? limits.default;
|
|
303790
|
+
case MetricData_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:
|
|
303791
|
+
return limits.observableUpDownCounter ?? limits.default;
|
|
303792
|
+
case MetricData_1.InstrumentType.OBSERVABLE_GAUGE:
|
|
303793
|
+
return limits.observableGauge ?? limits.default;
|
|
303794
|
+
case MetricData_1.InstrumentType.UP_DOWN_COUNTER:
|
|
303795
|
+
return limits.upDownCounter ?? limits.default;
|
|
303796
|
+
default:
|
|
303797
|
+
return limits.default;
|
|
303798
|
+
}
|
|
303799
|
+
}
|
|
303186
303800
|
});
|
|
303187
303801
|
if (exportIntervalMillis <= 0) {
|
|
303188
303802
|
throw Error("exportIntervalMillis must be greater than 0");
|
|
@@ -303190,6 +303804,9 @@ var require_PeriodicExportingMetricReader = __commonJS((exports) => {
|
|
|
303190
303804
|
if (exportTimeoutMillis <= 0) {
|
|
303191
303805
|
throw Error("exportTimeoutMillis must be greater than 0");
|
|
303192
303806
|
}
|
|
303807
|
+
if (maxExportBatchSize !== undefined && (!Number.isInteger(maxExportBatchSize) || maxExportBatchSize <= 0)) {
|
|
303808
|
+
throw Error("maxExportBatchSize must be a positive integer");
|
|
303809
|
+
}
|
|
303193
303810
|
if (exportIntervalMillis < exportTimeoutMillis) {
|
|
303194
303811
|
if ("exportIntervalMillis" in options && "exportTimeoutMillis" in options) {
|
|
303195
303812
|
throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");
|
|
@@ -303201,39 +303818,66 @@ var require_PeriodicExportingMetricReader = __commonJS((exports) => {
|
|
|
303201
303818
|
this._exportInterval = exportIntervalMillis;
|
|
303202
303819
|
this._exportTimeout = exportTimeoutMillis;
|
|
303203
303820
|
this._exporter = exporter;
|
|
303821
|
+
this._maxExportBatchSize = maxExportBatchSize;
|
|
303204
303822
|
}
|
|
303205
303823
|
async _runOnce() {
|
|
303206
303824
|
try {
|
|
303207
|
-
await
|
|
303825
|
+
await this._doRun();
|
|
303208
303826
|
} catch (err2) {
|
|
303209
|
-
if (err2 instanceof utils_1.TimeoutError) {
|
|
303210
|
-
api2.diag.error("Export took longer than %s milliseconds and timed out.", this._exportTimeout);
|
|
303211
|
-
return;
|
|
303212
|
-
}
|
|
303213
303827
|
(0, core_1.globalErrorHandler)(err2);
|
|
303214
303828
|
}
|
|
303215
303829
|
}
|
|
303216
303830
|
async _doRun() {
|
|
303217
|
-
|
|
303218
|
-
|
|
303219
|
-
});
|
|
303220
|
-
if (errors6.length > 0) {
|
|
303221
|
-
api2.diag.error("PeriodicExportingMetricReader: metrics collection errors", ...errors6);
|
|
303222
|
-
}
|
|
303223
|
-
if (resourceMetrics.resource.asyncAttributesPending) {
|
|
303224
|
-
try {
|
|
303225
|
-
await resourceMetrics.resource.waitForAsyncAttributes?.();
|
|
303226
|
-
} catch (e) {
|
|
303227
|
-
api2.diag.debug("Error while resolving async portion of resource: ", e);
|
|
303228
|
-
(0, core_1.globalErrorHandler)(e);
|
|
303229
|
-
}
|
|
303230
|
-
}
|
|
303231
|
-
if (resourceMetrics.scopeMetrics.length === 0) {
|
|
303831
|
+
if (this._ongoingExportPromise) {
|
|
303832
|
+
api2.diag.debug("PeriodicExportingMetricReader: export already in progress, skipping");
|
|
303232
303833
|
return;
|
|
303233
303834
|
}
|
|
303234
|
-
const
|
|
303235
|
-
|
|
303236
|
-
|
|
303835
|
+
const currentRun = async () => {
|
|
303836
|
+
const { resourceMetrics, errors: errors6 } = await this.collect({
|
|
303837
|
+
timeoutMillis: this._exportTimeout
|
|
303838
|
+
});
|
|
303839
|
+
if (errors6.length > 0) {
|
|
303840
|
+
api2.diag.error("PeriodicExportingMetricReader: metrics collection errors", ...errors6);
|
|
303841
|
+
}
|
|
303842
|
+
if (resourceMetrics.resource.asyncAttributesPending) {
|
|
303843
|
+
try {
|
|
303844
|
+
await resourceMetrics.resource.waitForAsyncAttributes?.();
|
|
303845
|
+
} catch (e) {
|
|
303846
|
+
api2.diag.debug("Error while resolving async portion of resource: ", e);
|
|
303847
|
+
(0, core_1.globalErrorHandler)(e);
|
|
303848
|
+
}
|
|
303849
|
+
}
|
|
303850
|
+
if (resourceMetrics.scopeMetrics.length === 0) {
|
|
303851
|
+
return;
|
|
303852
|
+
}
|
|
303853
|
+
const batches = this._maxExportBatchSize ? (0, MetricDataSplitter_1.splitMetricData)(resourceMetrics, this._maxExportBatchSize) : [resourceMetrics];
|
|
303854
|
+
let anyErr = null;
|
|
303855
|
+
for (const batch of batches) {
|
|
303856
|
+
try {
|
|
303857
|
+
const result = await (0, utils_1.callWithTimeout)(core_1.internal._export(this._exporter, batch), this._exportTimeout);
|
|
303858
|
+
if (result.code !== core_1.ExportResultCode.SUCCESS) {
|
|
303859
|
+
const err2 = new Error(`PeriodicExportingMetricReader: metrics export failed (error ${result.error})`);
|
|
303860
|
+
anyErr = err2;
|
|
303861
|
+
}
|
|
303862
|
+
} catch (e) {
|
|
303863
|
+
if (e instanceof utils_1.TimeoutError) {
|
|
303864
|
+
api2.diag.error(`PeriodicExportingMetricReader: metrics export timed out after ${this._exportTimeout}ms`);
|
|
303865
|
+
break;
|
|
303866
|
+
} else {
|
|
303867
|
+
api2.diag.error("PeriodicExportingMetricReader: metrics export threw error", e);
|
|
303868
|
+
anyErr = e instanceof Error ? e : new Error(String(e));
|
|
303869
|
+
}
|
|
303870
|
+
}
|
|
303871
|
+
}
|
|
303872
|
+
if (anyErr) {
|
|
303873
|
+
throw anyErr;
|
|
303874
|
+
}
|
|
303875
|
+
};
|
|
303876
|
+
this._ongoingExportPromise = currentRun();
|
|
303877
|
+
try {
|
|
303878
|
+
await this._ongoingExportPromise;
|
|
303879
|
+
} finally {
|
|
303880
|
+
this._ongoingExportPromise = null;
|
|
303237
303881
|
}
|
|
303238
303882
|
}
|
|
303239
303883
|
onInitialized() {
|
|
@@ -303245,9 +303889,22 @@ var require_PeriodicExportingMetricReader = __commonJS((exports) => {
|
|
|
303245
303889
|
}
|
|
303246
303890
|
}
|
|
303247
303891
|
async onForceFlush() {
|
|
303248
|
-
await this.
|
|
303892
|
+
await this._awaitOngoingExport();
|
|
303893
|
+
if (this._ongoingExportPromise) {
|
|
303894
|
+
await this._awaitOngoingExport();
|
|
303895
|
+
} else {
|
|
303896
|
+
await this._runOnce();
|
|
303897
|
+
}
|
|
303249
303898
|
await this._exporter.forceFlush();
|
|
303250
303899
|
}
|
|
303900
|
+
async _awaitOngoingExport() {
|
|
303901
|
+
if (this._ongoingExportPromise) {
|
|
303902
|
+
api2.diag.debug("PeriodicExportingMetricReader: export already in progress, awaiting ongoing export");
|
|
303903
|
+
try {
|
|
303904
|
+
await this._ongoingExportPromise;
|
|
303905
|
+
} catch {}
|
|
303906
|
+
}
|
|
303907
|
+
}
|
|
303251
303908
|
async onShutdown() {
|
|
303252
303909
|
if (this._interval) {
|
|
303253
303910
|
clearInterval(this._interval);
|
|
@@ -303419,7 +304076,6 @@ var require_Instruments = __commonJS((exports) => {
|
|
|
303419
304076
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
303420
304077
|
exports.isObservableInstrument = exports.ObservableUpDownCounterInstrument = exports.ObservableGaugeInstrument = exports.ObservableCounterInstrument = exports.ObservableInstrument = exports.HistogramInstrument = exports.GaugeInstrument = exports.CounterInstrument = exports.UpDownCounterInstrument = exports.SyncInstrument = undefined;
|
|
303421
304078
|
var api_1 = require_src2();
|
|
303422
|
-
var core_1 = require_src5();
|
|
303423
304079
|
|
|
303424
304080
|
class SyncInstrument {
|
|
303425
304081
|
_writableMetricStorage;
|
|
@@ -303428,7 +304084,7 @@ var require_Instruments = __commonJS((exports) => {
|
|
|
303428
304084
|
this._writableMetricStorage = writableMetricStorage;
|
|
303429
304085
|
this._descriptor = descriptor;
|
|
303430
304086
|
}
|
|
303431
|
-
_record(value, attributes = {}, context
|
|
304087
|
+
_record(value, attributes = {}, context) {
|
|
303432
304088
|
if (typeof value !== "number") {
|
|
303433
304089
|
api_1.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${value}`);
|
|
303434
304090
|
return;
|
|
@@ -303440,7 +304096,7 @@ var require_Instruments = __commonJS((exports) => {
|
|
|
303440
304096
|
return;
|
|
303441
304097
|
}
|
|
303442
304098
|
}
|
|
303443
|
-
this._writableMetricStorage.record(value, attributes, context,
|
|
304099
|
+
this._writableMetricStorage.record(value, attributes, context, Date.now());
|
|
303444
304100
|
}
|
|
303445
304101
|
}
|
|
303446
304102
|
exports.SyncInstrument = SyncInstrument;
|
|
@@ -303674,6 +304330,7 @@ var require_HashMap = __commonJS((exports) => {
|
|
|
303674
304330
|
var require_DeltaMetricProcessor = __commonJS((exports) => {
|
|
303675
304331
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
303676
304332
|
exports.DeltaMetricProcessor = undefined;
|
|
304333
|
+
var core_1 = require_src5();
|
|
303677
304334
|
var utils_1 = require_utils13();
|
|
303678
304335
|
var HashMap_1 = require_HashMap();
|
|
303679
304336
|
|
|
@@ -303689,21 +304346,24 @@ var require_DeltaMetricProcessor = __commonJS((exports) => {
|
|
|
303689
304346
|
this._cardinalityLimit = (aggregationCardinalityLimit ?? 2000) - 1;
|
|
303690
304347
|
this._overflowHashCode = (0, utils_1.hashAttributes)(this._overflowAttributes);
|
|
303691
304348
|
}
|
|
303692
|
-
record(value, attributes,
|
|
304349
|
+
record(value, attributes, collectionTime) {
|
|
303693
304350
|
let accumulation = this._activeCollectionStorage.get(attributes);
|
|
303694
304351
|
if (!accumulation) {
|
|
304352
|
+
const hrTime = (0, core_1.millisToHrTime)(collectionTime);
|
|
303695
304353
|
if (this._activeCollectionStorage.size >= this._cardinalityLimit) {
|
|
303696
|
-
const overflowAccumulation = this._activeCollectionStorage.getOrDefault(this._overflowAttributes, () => this._aggregator.createAccumulation(
|
|
304354
|
+
const overflowAccumulation = this._activeCollectionStorage.getOrDefault(this._overflowAttributes, () => this._aggregator.createAccumulation(hrTime));
|
|
303697
304355
|
overflowAccumulation?.record(value);
|
|
303698
304356
|
return;
|
|
303699
304357
|
}
|
|
303700
|
-
accumulation = this._aggregator.createAccumulation(
|
|
304358
|
+
accumulation = this._aggregator.createAccumulation(hrTime);
|
|
303701
304359
|
this._activeCollectionStorage.set(attributes, accumulation);
|
|
303702
304360
|
}
|
|
303703
304361
|
accumulation?.record(value);
|
|
303704
304362
|
}
|
|
303705
304363
|
batchCumulate(measurements, collectionTime) {
|
|
303706
|
-
|
|
304364
|
+
for (const [originalAttributes, value, originalHashCode] of measurements.entries()) {
|
|
304365
|
+
let attributes = originalAttributes;
|
|
304366
|
+
let hashCode = originalHashCode;
|
|
303707
304367
|
const accumulation = this._aggregator.createAccumulation(collectionTime);
|
|
303708
304368
|
accumulation?.record(value);
|
|
303709
304369
|
let delta = accumulation;
|
|
@@ -303726,7 +304386,7 @@ var require_DeltaMetricProcessor = __commonJS((exports) => {
|
|
|
303726
304386
|
}
|
|
303727
304387
|
this._cumulativeMemoStorage.set(attributes, accumulation, hashCode);
|
|
303728
304388
|
this._activeCollectionStorage.set(attributes, delta, hashCode);
|
|
303729
|
-
}
|
|
304389
|
+
}
|
|
303730
304390
|
}
|
|
303731
304391
|
collect() {
|
|
303732
304392
|
const unreportedDelta = this._activeCollectionStorage;
|
|
@@ -303858,10 +304518,14 @@ var require_AsyncMetricStorage = __commonJS((exports) => {
|
|
|
303858
304518
|
this._attributesProcessor = attributesProcessor;
|
|
303859
304519
|
}
|
|
303860
304520
|
record(measurements, observationTime) {
|
|
304521
|
+
if (this._attributesProcessor === undefined) {
|
|
304522
|
+
this._deltaMetricStorage.batchCumulate(measurements, observationTime);
|
|
304523
|
+
return;
|
|
304524
|
+
}
|
|
303861
304525
|
const processed = new HashMap_1.AttributeHashMap;
|
|
303862
|
-
|
|
304526
|
+
for (const [attributes, value] of measurements.entries()) {
|
|
303863
304527
|
processed.set(this._attributesProcessor.process(attributes), value);
|
|
303864
|
-
}
|
|
304528
|
+
}
|
|
303865
304529
|
this._deltaMetricStorage.batchCumulate(processed, observationTime);
|
|
303866
304530
|
}
|
|
303867
304531
|
collect(collector, collectionTime) {
|
|
@@ -304042,16 +304706,23 @@ To resolve the conflict:`, (0, RegistrationConflicts_1.getConflictResolutionReci
|
|
|
304042
304706
|
var require_MultiWritableMetricStorage = __commonJS((exports) => {
|
|
304043
304707
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
304044
304708
|
exports.MultiMetricStorage = undefined;
|
|
304709
|
+
var api_1 = require_src2();
|
|
304045
304710
|
|
|
304046
304711
|
class MultiMetricStorage {
|
|
304047
304712
|
_backingStorages;
|
|
304713
|
+
hasAttributeProcessor;
|
|
304048
304714
|
constructor(backingStorages) {
|
|
304049
304715
|
this._backingStorages = backingStorages;
|
|
304716
|
+
this.hasAttributeProcessor = backingStorages.some((s) => s.hasAttributeProcessor);
|
|
304050
304717
|
}
|
|
304051
304718
|
record(value, attributes, context, recordTime) {
|
|
304052
|
-
this.
|
|
304053
|
-
|
|
304054
|
-
}
|
|
304719
|
+
if (this.hasAttributeProcessor && context === undefined) {
|
|
304720
|
+
context = api_1.context.active();
|
|
304721
|
+
}
|
|
304722
|
+
const storages = this._backingStorages;
|
|
304723
|
+
for (let i3 = 0;i3 < storages.length; i3++) {
|
|
304724
|
+
storages[i3].record(value, attributes, context, recordTime);
|
|
304725
|
+
}
|
|
304055
304726
|
}
|
|
304056
304727
|
}
|
|
304057
304728
|
exports.MultiMetricStorage = MultiMetricStorage;
|
|
@@ -304224,6 +304895,7 @@ var require_ObservableRegistry = __commonJS((exports) => {
|
|
|
304224
304895
|
var require_SyncMetricStorage = __commonJS((exports) => {
|
|
304225
304896
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
304226
304897
|
exports.SyncMetricStorage = undefined;
|
|
304898
|
+
var api_1 = require_src2();
|
|
304227
304899
|
var MetricStorage_1 = require_MetricStorage();
|
|
304228
304900
|
var DeltaMetricProcessor_1 = require_DeltaMetricProcessor();
|
|
304229
304901
|
var TemporalMetricProcessor_1 = require_TemporalMetricProcessor();
|
|
@@ -304239,10 +304911,14 @@ var require_SyncMetricStorage = __commonJS((exports) => {
|
|
|
304239
304911
|
this._deltaMetricStorage = new DeltaMetricProcessor_1.DeltaMetricProcessor(aggregator, this._aggregationCardinalityLimit);
|
|
304240
304912
|
this._temporalMetricStorage = new TemporalMetricProcessor_1.TemporalMetricProcessor(aggregator, collectorHandles);
|
|
304241
304913
|
this._attributesProcessor = attributesProcessor;
|
|
304914
|
+
this.hasAttributeProcessor = attributesProcessor !== undefined;
|
|
304242
304915
|
}
|
|
304916
|
+
hasAttributeProcessor;
|
|
304243
304917
|
record(value, attributes, context, recordTime) {
|
|
304244
|
-
|
|
304245
|
-
|
|
304918
|
+
if (this._attributesProcessor !== undefined) {
|
|
304919
|
+
attributes = this._attributesProcessor.process(attributes, context ?? api_1.context.active());
|
|
304920
|
+
}
|
|
304921
|
+
this._deltaMetricStorage.record(value, attributes, recordTime);
|
|
304246
304922
|
}
|
|
304247
304923
|
collect(collector, collectionTime) {
|
|
304248
304924
|
const accumulations = this._deltaMetricStorage.collect();
|
|
@@ -304252,81 +304928,6 @@ var require_SyncMetricStorage = __commonJS((exports) => {
|
|
|
304252
304928
|
exports.SyncMetricStorage = SyncMetricStorage;
|
|
304253
304929
|
});
|
|
304254
304930
|
|
|
304255
|
-
// node_modules/@opentelemetry/sdk-metrics/build/src/view/AttributesProcessor.js
|
|
304256
|
-
var require_AttributesProcessor = __commonJS((exports) => {
|
|
304257
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
304258
|
-
exports.createDenyListAttributesProcessor = exports.createAllowListAttributesProcessor = exports.createMultiAttributesProcessor = exports.createNoopAttributesProcessor = undefined;
|
|
304259
|
-
|
|
304260
|
-
class NoopAttributesProcessor {
|
|
304261
|
-
process(incoming, _context) {
|
|
304262
|
-
return incoming;
|
|
304263
|
-
}
|
|
304264
|
-
}
|
|
304265
|
-
|
|
304266
|
-
class MultiAttributesProcessor {
|
|
304267
|
-
_processors;
|
|
304268
|
-
constructor(processors) {
|
|
304269
|
-
this._processors = processors;
|
|
304270
|
-
}
|
|
304271
|
-
process(incoming, context) {
|
|
304272
|
-
let filteredAttributes = incoming;
|
|
304273
|
-
for (const processor of this._processors) {
|
|
304274
|
-
filteredAttributes = processor.process(filteredAttributes, context);
|
|
304275
|
-
}
|
|
304276
|
-
return filteredAttributes;
|
|
304277
|
-
}
|
|
304278
|
-
}
|
|
304279
|
-
|
|
304280
|
-
class AllowListProcessor {
|
|
304281
|
-
_allowedAttributeNames;
|
|
304282
|
-
constructor(allowedAttributeNames) {
|
|
304283
|
-
this._allowedAttributeNames = allowedAttributeNames;
|
|
304284
|
-
}
|
|
304285
|
-
process(incoming, _context) {
|
|
304286
|
-
const filteredAttributes = {};
|
|
304287
|
-
Object.keys(incoming).forEach((attributeName) => {
|
|
304288
|
-
if (this._allowedAttributeNames.includes(attributeName)) {
|
|
304289
|
-
filteredAttributes[attributeName] = incoming[attributeName];
|
|
304290
|
-
}
|
|
304291
|
-
});
|
|
304292
|
-
return filteredAttributes;
|
|
304293
|
-
}
|
|
304294
|
-
}
|
|
304295
|
-
|
|
304296
|
-
class DenyListProcessor {
|
|
304297
|
-
_deniedAttributeNames;
|
|
304298
|
-
constructor(deniedAttributeNames) {
|
|
304299
|
-
this._deniedAttributeNames = deniedAttributeNames;
|
|
304300
|
-
}
|
|
304301
|
-
process(incoming, _context) {
|
|
304302
|
-
const filteredAttributes = {};
|
|
304303
|
-
Object.keys(incoming).forEach((attributeName) => {
|
|
304304
|
-
if (!this._deniedAttributeNames.includes(attributeName)) {
|
|
304305
|
-
filteredAttributes[attributeName] = incoming[attributeName];
|
|
304306
|
-
}
|
|
304307
|
-
});
|
|
304308
|
-
return filteredAttributes;
|
|
304309
|
-
}
|
|
304310
|
-
}
|
|
304311
|
-
function createNoopAttributesProcessor() {
|
|
304312
|
-
return NOOP;
|
|
304313
|
-
}
|
|
304314
|
-
exports.createNoopAttributesProcessor = createNoopAttributesProcessor;
|
|
304315
|
-
function createMultiAttributesProcessor(processors) {
|
|
304316
|
-
return new MultiAttributesProcessor(processors);
|
|
304317
|
-
}
|
|
304318
|
-
exports.createMultiAttributesProcessor = createMultiAttributesProcessor;
|
|
304319
|
-
function createAllowListAttributesProcessor(attributeAllowList) {
|
|
304320
|
-
return new AllowListProcessor(attributeAllowList);
|
|
304321
|
-
}
|
|
304322
|
-
exports.createAllowListAttributesProcessor = createAllowListAttributesProcessor;
|
|
304323
|
-
function createDenyListAttributesProcessor(attributeDenyList) {
|
|
304324
|
-
return new DenyListProcessor(attributeDenyList);
|
|
304325
|
-
}
|
|
304326
|
-
exports.createDenyListAttributesProcessor = createDenyListAttributesProcessor;
|
|
304327
|
-
var NOOP = new NoopAttributesProcessor;
|
|
304328
|
-
});
|
|
304329
|
-
|
|
304330
304931
|
// node_modules/@opentelemetry/sdk-metrics/build/src/state/MeterSharedState.js
|
|
304331
304932
|
var require_MeterSharedState = __commonJS((exports) => {
|
|
304332
304933
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -304338,7 +304939,6 @@ var require_MeterSharedState = __commonJS((exports) => {
|
|
|
304338
304939
|
var MultiWritableMetricStorage_1 = require_MultiWritableMetricStorage();
|
|
304339
304940
|
var ObservableRegistry_1 = require_ObservableRegistry();
|
|
304340
304941
|
var SyncMetricStorage_1 = require_SyncMetricStorage();
|
|
304341
|
-
var AttributesProcessor_1 = require_AttributesProcessor();
|
|
304342
304942
|
|
|
304343
304943
|
class MeterSharedState {
|
|
304344
304944
|
metricStorageRegistry = new MetricStorageRegistry_1.MetricStorageRegistry;
|
|
@@ -304408,7 +305008,7 @@ var require_MeterSharedState = __commonJS((exports) => {
|
|
|
304408
305008
|
}
|
|
304409
305009
|
const aggregator = aggregation.createAggregator(descriptor);
|
|
304410
305010
|
const cardinalityLimit = collector.selectCardinalityLimit(descriptor.type);
|
|
304411
|
-
const storage = new MetricStorageType(descriptor, aggregator,
|
|
305011
|
+
const storage = new MetricStorageType(descriptor, aggregator, undefined, [collector], cardinalityLimit);
|
|
304412
305012
|
this.metricStorageRegistry.registerForCollector(collector, storage);
|
|
304413
305013
|
return storage;
|
|
304414
305014
|
});
|
|
@@ -304567,6 +305167,81 @@ var require_Predicate = __commonJS((exports) => {
|
|
|
304567
305167
|
exports.ExactPredicate = ExactPredicate;
|
|
304568
305168
|
});
|
|
304569
305169
|
|
|
305170
|
+
// node_modules/@opentelemetry/sdk-metrics/build/src/view/AttributesProcessor.js
|
|
305171
|
+
var require_AttributesProcessor = __commonJS((exports) => {
|
|
305172
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305173
|
+
exports.createDenyListAttributesProcessor = exports.createAllowListAttributesProcessor = exports.createMultiAttributesProcessor = exports.createNoopAttributesProcessor = undefined;
|
|
305174
|
+
|
|
305175
|
+
class NoopAttributesProcessor {
|
|
305176
|
+
process(incoming, _context) {
|
|
305177
|
+
return incoming;
|
|
305178
|
+
}
|
|
305179
|
+
}
|
|
305180
|
+
|
|
305181
|
+
class MultiAttributesProcessor {
|
|
305182
|
+
_processors;
|
|
305183
|
+
constructor(processors) {
|
|
305184
|
+
this._processors = processors;
|
|
305185
|
+
}
|
|
305186
|
+
process(incoming, context) {
|
|
305187
|
+
let filteredAttributes = incoming;
|
|
305188
|
+
for (const processor of this._processors) {
|
|
305189
|
+
filteredAttributes = processor.process(filteredAttributes, context);
|
|
305190
|
+
}
|
|
305191
|
+
return filteredAttributes;
|
|
305192
|
+
}
|
|
305193
|
+
}
|
|
305194
|
+
|
|
305195
|
+
class AllowListProcessor {
|
|
305196
|
+
_allowedAttributeNames;
|
|
305197
|
+
constructor(allowedAttributeNames) {
|
|
305198
|
+
this._allowedAttributeNames = new Set(allowedAttributeNames);
|
|
305199
|
+
}
|
|
305200
|
+
process(incoming, _context) {
|
|
305201
|
+
const filteredAttributes = {};
|
|
305202
|
+
for (const attributeName in incoming) {
|
|
305203
|
+
if (Object.prototype.hasOwnProperty.call(incoming, attributeName) && this._allowedAttributeNames.has(attributeName)) {
|
|
305204
|
+
filteredAttributes[attributeName] = incoming[attributeName];
|
|
305205
|
+
}
|
|
305206
|
+
}
|
|
305207
|
+
return filteredAttributes;
|
|
305208
|
+
}
|
|
305209
|
+
}
|
|
305210
|
+
|
|
305211
|
+
class DenyListProcessor {
|
|
305212
|
+
_deniedAttributeNames;
|
|
305213
|
+
constructor(deniedAttributeNames) {
|
|
305214
|
+
this._deniedAttributeNames = new Set(deniedAttributeNames);
|
|
305215
|
+
}
|
|
305216
|
+
process(incoming, _context) {
|
|
305217
|
+
const filteredAttributes = {};
|
|
305218
|
+
for (const attributeName in incoming) {
|
|
305219
|
+
if (Object.prototype.hasOwnProperty.call(incoming, attributeName) && !this._deniedAttributeNames.has(attributeName)) {
|
|
305220
|
+
filteredAttributes[attributeName] = incoming[attributeName];
|
|
305221
|
+
}
|
|
305222
|
+
}
|
|
305223
|
+
return filteredAttributes;
|
|
305224
|
+
}
|
|
305225
|
+
}
|
|
305226
|
+
function createNoopAttributesProcessor() {
|
|
305227
|
+
return NOOP;
|
|
305228
|
+
}
|
|
305229
|
+
exports.createNoopAttributesProcessor = createNoopAttributesProcessor;
|
|
305230
|
+
function createMultiAttributesProcessor(processors) {
|
|
305231
|
+
return new MultiAttributesProcessor(processors);
|
|
305232
|
+
}
|
|
305233
|
+
exports.createMultiAttributesProcessor = createMultiAttributesProcessor;
|
|
305234
|
+
function createAllowListAttributesProcessor(attributeAllowList) {
|
|
305235
|
+
return new AllowListProcessor(attributeAllowList);
|
|
305236
|
+
}
|
|
305237
|
+
exports.createAllowListAttributesProcessor = createAllowListAttributesProcessor;
|
|
305238
|
+
function createDenyListAttributesProcessor(attributeDenyList) {
|
|
305239
|
+
return new DenyListProcessor(attributeDenyList);
|
|
305240
|
+
}
|
|
305241
|
+
exports.createDenyListAttributesProcessor = createDenyListAttributesProcessor;
|
|
305242
|
+
var NOOP = new NoopAttributesProcessor;
|
|
305243
|
+
});
|
|
305244
|
+
|
|
304570
305245
|
// node_modules/@opentelemetry/sdk-metrics/build/src/view/InstrumentSelector.js
|
|
304571
305246
|
var require_InstrumentSelector = __commonJS((exports) => {
|
|
304572
305247
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -304684,6 +305359,7 @@ var require_MeterProvider = __commonJS((exports) => {
|
|
|
304684
305359
|
exports.MeterProvider = undefined;
|
|
304685
305360
|
var api_1 = require_src2();
|
|
304686
305361
|
var resources_1 = require_src6();
|
|
305362
|
+
var MetricReader_1 = require_MetricReader();
|
|
304687
305363
|
var MeterProviderSharedState_1 = require_MeterProviderSharedState();
|
|
304688
305364
|
var MetricCollector_1 = require_MetricCollector();
|
|
304689
305365
|
var View_1 = require_View();
|
|
@@ -304703,6 +305379,9 @@ var require_MeterProvider = __commonJS((exports) => {
|
|
|
304703
305379
|
const collector = new MetricCollector_1.MetricCollector(this._sharedState, metricReader);
|
|
304704
305380
|
metricReader.setMetricProducer(collector);
|
|
304705
305381
|
this._sharedState.metricCollectors.push(collector);
|
|
305382
|
+
if (options.sdkMetricsEnabled && metricReader instanceof MetricReader_1.MetricReader) {
|
|
305383
|
+
metricReader._setSelfObsMeterProvider(this);
|
|
305384
|
+
}
|
|
304706
305385
|
}
|
|
304707
305386
|
}
|
|
304708
305387
|
}
|
|
@@ -304792,14 +305471,49 @@ var require_src8 = __commonJS((exports) => {
|
|
|
304792
305471
|
} });
|
|
304793
305472
|
});
|
|
304794
305473
|
|
|
304795
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
305474
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/enums.js
|
|
304796
305475
|
var require_enums = __commonJS((exports) => {
|
|
304797
305476
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
304798
305477
|
exports.ExceptionEventName = undefined;
|
|
304799
305478
|
exports.ExceptionEventName = "exception";
|
|
304800
305479
|
});
|
|
304801
305480
|
|
|
304802
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
305481
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/inspect.js
|
|
305482
|
+
var require_inspect = __commonJS((exports) => {
|
|
305483
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305484
|
+
exports.formatInspect = exports.settledResourceAttributes = exports.inspectCustom = undefined;
|
|
305485
|
+
exports.inspectCustom = Symbol.for("nodejs.util.inspect.custom");
|
|
305486
|
+
function settledResourceAttributes(resource) {
|
|
305487
|
+
const attrs = {};
|
|
305488
|
+
for (const [k2, v2] of resource.getRawAttributes()) {
|
|
305489
|
+
if (typeof v2?.then === "function") {
|
|
305490
|
+
continue;
|
|
305491
|
+
}
|
|
305492
|
+
if (v2 != null) {
|
|
305493
|
+
attrs[k2] ??= v2;
|
|
305494
|
+
}
|
|
305495
|
+
}
|
|
305496
|
+
return attrs;
|
|
305497
|
+
}
|
|
305498
|
+
exports.settledResourceAttributes = settledResourceAttributes;
|
|
305499
|
+
function formatInspect(className, payload, depth, options, inspect3) {
|
|
305500
|
+
if (typeof depth === "number" && depth < 0) {
|
|
305501
|
+
const tag = `[${className}]`;
|
|
305502
|
+
return options?.stylize ? options.stylize(tag, "special") : tag;
|
|
305503
|
+
}
|
|
305504
|
+
if (typeof inspect3 !== "function" || !options) {
|
|
305505
|
+
return payload;
|
|
305506
|
+
}
|
|
305507
|
+
const childOptions = {
|
|
305508
|
+
...options,
|
|
305509
|
+
depth: options.depth == null ? options.depth : options.depth - 1
|
|
305510
|
+
};
|
|
305511
|
+
return `${className} ${inspect3(payload, childOptions)}`;
|
|
305512
|
+
}
|
|
305513
|
+
exports.formatInspect = formatInspect;
|
|
305514
|
+
});
|
|
305515
|
+
|
|
305516
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/Span.js
|
|
304803
305517
|
var require_Span = __commonJS((exports) => {
|
|
304804
305518
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
304805
305519
|
exports.SpanImpl = undefined;
|
|
@@ -304807,6 +305521,7 @@ var require_Span = __commonJS((exports) => {
|
|
|
304807
305521
|
var core_1 = require_src5();
|
|
304808
305522
|
var semantic_conventions_1 = require_src4();
|
|
304809
305523
|
var enums_1 = require_enums();
|
|
305524
|
+
var inspect_1 = require_inspect();
|
|
304810
305525
|
|
|
304811
305526
|
class SpanImpl {
|
|
304812
305527
|
_spanContext;
|
|
@@ -305127,11 +305842,33 @@ var require_Span = __commonJS((exports) => {
|
|
|
305127
305842
|
}
|
|
305128
305843
|
return value;
|
|
305129
305844
|
}
|
|
305845
|
+
[inspect_1.inspectCustom](depth, options, inspect3) {
|
|
305846
|
+
const payload = {
|
|
305847
|
+
name: this.name,
|
|
305848
|
+
kind: this.kind,
|
|
305849
|
+
spanContext: this._spanContext,
|
|
305850
|
+
parentSpanContext: this.parentSpanContext,
|
|
305851
|
+
status: this.status,
|
|
305852
|
+
startTime: this.startTime,
|
|
305853
|
+
endTime: this.endTime,
|
|
305854
|
+
duration: this._duration,
|
|
305855
|
+
ended: this._ended,
|
|
305856
|
+
attributes: this.attributes,
|
|
305857
|
+
events: this.events,
|
|
305858
|
+
links: this.links,
|
|
305859
|
+
droppedAttributesCount: this._droppedAttributesCount,
|
|
305860
|
+
droppedEventsCount: this._droppedEventsCount,
|
|
305861
|
+
droppedLinksCount: this._droppedLinksCount,
|
|
305862
|
+
instrumentationScope: this.instrumentationScope,
|
|
305863
|
+
resource: { attributes: (0, inspect_1.settledResourceAttributes)(this.resource) }
|
|
305864
|
+
};
|
|
305865
|
+
return (0, inspect_1.formatInspect)("SpanImpl", payload, depth, options, inspect3);
|
|
305866
|
+
}
|
|
305130
305867
|
}
|
|
305131
305868
|
exports.SpanImpl = SpanImpl;
|
|
305132
305869
|
});
|
|
305133
305870
|
|
|
305134
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
305871
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/Sampler.js
|
|
305135
305872
|
var require_Sampler = __commonJS((exports) => {
|
|
305136
305873
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305137
305874
|
exports.SamplingDecision = undefined;
|
|
@@ -305143,7 +305880,268 @@ var require_Sampler = __commonJS((exports) => {
|
|
|
305143
305880
|
})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
|
|
305144
305881
|
});
|
|
305145
305882
|
|
|
305146
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
305883
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/semconv.js
|
|
305884
|
+
var require_semconv5 = __commonJS((exports) => {
|
|
305885
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305886
|
+
exports.OTEL_COMPONENT_TYPE_VALUE_SIMPLE_SPAN_PROCESSOR = exports.OTEL_COMPONENT_TYPE_VALUE_BATCHING_SPAN_PROCESSOR = exports.METRIC_OTEL_SDK_SPAN_STARTED = exports.METRIC_OTEL_SDK_SPAN_LIVE = exports.METRIC_OTEL_SDK_PROCESSOR_SPAN_QUEUE_SIZE = exports.METRIC_OTEL_SDK_PROCESSOR_SPAN_QUEUE_CAPACITY = exports.METRIC_OTEL_SDK_PROCESSOR_SPAN_PROCESSED = exports.ATTR_OTEL_SPAN_SAMPLING_RESULT = exports.ATTR_OTEL_SPAN_PARENT_ORIGIN = exports.ATTR_OTEL_COMPONENT_TYPE = exports.ATTR_OTEL_COMPONENT_NAME = undefined;
|
|
305887
|
+
exports.ATTR_OTEL_COMPONENT_NAME = "otel.component.name";
|
|
305888
|
+
exports.ATTR_OTEL_COMPONENT_TYPE = "otel.component.type";
|
|
305889
|
+
exports.ATTR_OTEL_SPAN_PARENT_ORIGIN = "otel.span.parent.origin";
|
|
305890
|
+
exports.ATTR_OTEL_SPAN_SAMPLING_RESULT = "otel.span.sampling_result";
|
|
305891
|
+
exports.METRIC_OTEL_SDK_PROCESSOR_SPAN_PROCESSED = "otel.sdk.processor.span.processed";
|
|
305892
|
+
exports.METRIC_OTEL_SDK_PROCESSOR_SPAN_QUEUE_CAPACITY = "otel.sdk.processor.span.queue.capacity";
|
|
305893
|
+
exports.METRIC_OTEL_SDK_PROCESSOR_SPAN_QUEUE_SIZE = "otel.sdk.processor.span.queue.size";
|
|
305894
|
+
exports.METRIC_OTEL_SDK_SPAN_LIVE = "otel.sdk.span.live";
|
|
305895
|
+
exports.METRIC_OTEL_SDK_SPAN_STARTED = "otel.sdk.span.started";
|
|
305896
|
+
exports.OTEL_COMPONENT_TYPE_VALUE_BATCHING_SPAN_PROCESSOR = "batching_span_processor";
|
|
305897
|
+
exports.OTEL_COMPONENT_TYPE_VALUE_SIMPLE_SPAN_PROCESSOR = "simple_span_processor";
|
|
305898
|
+
});
|
|
305899
|
+
|
|
305900
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/TracerMetrics.js
|
|
305901
|
+
var require_TracerMetrics = __commonJS((exports) => {
|
|
305902
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305903
|
+
exports.TracerMetrics = undefined;
|
|
305904
|
+
var Sampler_1 = require_Sampler();
|
|
305905
|
+
var semconv_1 = require_semconv5();
|
|
305906
|
+
|
|
305907
|
+
class TracerMetrics {
|
|
305908
|
+
startedSpans;
|
|
305909
|
+
liveSpans;
|
|
305910
|
+
constructor(meter) {
|
|
305911
|
+
this.startedSpans = meter.createCounter(semconv_1.METRIC_OTEL_SDK_SPAN_STARTED, {
|
|
305912
|
+
unit: "{span}",
|
|
305913
|
+
description: "The number of created spans."
|
|
305914
|
+
});
|
|
305915
|
+
this.liveSpans = meter.createUpDownCounter(semconv_1.METRIC_OTEL_SDK_SPAN_LIVE, {
|
|
305916
|
+
unit: "{span}",
|
|
305917
|
+
description: "The number of currently live spans."
|
|
305918
|
+
});
|
|
305919
|
+
}
|
|
305920
|
+
startSpan(parentSpanCtx, samplingDecision) {
|
|
305921
|
+
const samplingDecisionStr = samplingDecisionToString(samplingDecision);
|
|
305922
|
+
this.startedSpans.add(1, {
|
|
305923
|
+
[semconv_1.ATTR_OTEL_SPAN_PARENT_ORIGIN]: parentOrigin(parentSpanCtx),
|
|
305924
|
+
[semconv_1.ATTR_OTEL_SPAN_SAMPLING_RESULT]: samplingDecisionStr
|
|
305925
|
+
});
|
|
305926
|
+
if (samplingDecision === Sampler_1.SamplingDecision.NOT_RECORD) {
|
|
305927
|
+
return () => {};
|
|
305928
|
+
}
|
|
305929
|
+
const liveSpanAttributes = {
|
|
305930
|
+
[semconv_1.ATTR_OTEL_SPAN_SAMPLING_RESULT]: samplingDecisionStr
|
|
305931
|
+
};
|
|
305932
|
+
this.liveSpans.add(1, liveSpanAttributes);
|
|
305933
|
+
return () => {
|
|
305934
|
+
this.liveSpans.add(-1, liveSpanAttributes);
|
|
305935
|
+
};
|
|
305936
|
+
}
|
|
305937
|
+
}
|
|
305938
|
+
exports.TracerMetrics = TracerMetrics;
|
|
305939
|
+
function parentOrigin(parentSpanContext) {
|
|
305940
|
+
if (!parentSpanContext) {
|
|
305941
|
+
return "none";
|
|
305942
|
+
}
|
|
305943
|
+
if (parentSpanContext.isRemote) {
|
|
305944
|
+
return "remote";
|
|
305945
|
+
}
|
|
305946
|
+
return "local";
|
|
305947
|
+
}
|
|
305948
|
+
function samplingDecisionToString(decision) {
|
|
305949
|
+
switch (decision) {
|
|
305950
|
+
case Sampler_1.SamplingDecision.RECORD_AND_SAMPLED:
|
|
305951
|
+
return "RECORD_AND_SAMPLE";
|
|
305952
|
+
case Sampler_1.SamplingDecision.RECORD:
|
|
305953
|
+
return "RECORD_ONLY";
|
|
305954
|
+
case Sampler_1.SamplingDecision.NOT_RECORD:
|
|
305955
|
+
return "DROP";
|
|
305956
|
+
}
|
|
305957
|
+
}
|
|
305958
|
+
});
|
|
305959
|
+
|
|
305960
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/version.js
|
|
305961
|
+
var require_version5 = __commonJS((exports) => {
|
|
305962
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305963
|
+
exports.VERSION = undefined;
|
|
305964
|
+
exports.VERSION = "2.9.0";
|
|
305965
|
+
});
|
|
305966
|
+
|
|
305967
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/Tracer.js
|
|
305968
|
+
var require_Tracer = __commonJS((exports) => {
|
|
305969
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305970
|
+
exports.Tracer = undefined;
|
|
305971
|
+
var api2 = require_src2();
|
|
305972
|
+
var core_1 = require_src5();
|
|
305973
|
+
var Span_1 = require_Span();
|
|
305974
|
+
var TracerMetrics_1 = require_TracerMetrics();
|
|
305975
|
+
var version_1 = require_version5();
|
|
305976
|
+
var inspect_1 = require_inspect();
|
|
305977
|
+
|
|
305978
|
+
class Tracer {
|
|
305979
|
+
_sampler;
|
|
305980
|
+
_spanLimits;
|
|
305981
|
+
_idGenerator;
|
|
305982
|
+
instrumentationScope;
|
|
305983
|
+
_resource;
|
|
305984
|
+
_spanProcessor;
|
|
305985
|
+
_tracerMetrics;
|
|
305986
|
+
constructor(instrumentationScope, options) {
|
|
305987
|
+
this.instrumentationScope = instrumentationScope;
|
|
305988
|
+
this._sampler = options.sampler;
|
|
305989
|
+
this._spanLimits = options.spanLimits;
|
|
305990
|
+
this._resource = options.resource;
|
|
305991
|
+
this._idGenerator = options.idGenerator;
|
|
305992
|
+
this._spanProcessor = options.spanProcessor;
|
|
305993
|
+
const meter = options.meterProvider.getMeter("@opentelemetry/sdk-trace", version_1.VERSION);
|
|
305994
|
+
this._tracerMetrics = new TracerMetrics_1.TracerMetrics(meter);
|
|
305995
|
+
}
|
|
305996
|
+
startSpan(name, options = {}, context = api2.context.active()) {
|
|
305997
|
+
if (options.root) {
|
|
305998
|
+
context = api2.trace.deleteSpan(context);
|
|
305999
|
+
}
|
|
306000
|
+
const parentSpan = api2.trace.getSpan(context);
|
|
306001
|
+
if ((0, core_1.isTracingSuppressed)(context)) {
|
|
306002
|
+
api2.diag.debug("Instrumentation suppressed, returning Noop Span");
|
|
306003
|
+
const nonRecordingSpan = api2.trace.wrapSpanContext(api2.INVALID_SPAN_CONTEXT);
|
|
306004
|
+
return nonRecordingSpan;
|
|
306005
|
+
}
|
|
306006
|
+
const parentSpanContext = parentSpan?.spanContext();
|
|
306007
|
+
const spanId = this._idGenerator.generateSpanId();
|
|
306008
|
+
let validParentSpanContext;
|
|
306009
|
+
let traceId;
|
|
306010
|
+
let traceState;
|
|
306011
|
+
if (!parentSpanContext || !api2.trace.isSpanContextValid(parentSpanContext)) {
|
|
306012
|
+
traceId = this._idGenerator.generateTraceId();
|
|
306013
|
+
} else {
|
|
306014
|
+
traceId = parentSpanContext.traceId;
|
|
306015
|
+
traceState = parentSpanContext.traceState;
|
|
306016
|
+
validParentSpanContext = parentSpanContext;
|
|
306017
|
+
}
|
|
306018
|
+
const spanKind = options.kind ?? api2.SpanKind.INTERNAL;
|
|
306019
|
+
const links = (options.links ?? []).map((link2) => {
|
|
306020
|
+
return {
|
|
306021
|
+
context: link2.context,
|
|
306022
|
+
attributes: (0, core_1.sanitizeAttributes)(link2.attributes)
|
|
306023
|
+
};
|
|
306024
|
+
});
|
|
306025
|
+
const attributes = (0, core_1.sanitizeAttributes)(options.attributes);
|
|
306026
|
+
const samplingResult = this._sampler.shouldSample(context, traceId, name, spanKind, attributes, links);
|
|
306027
|
+
const recordEndMetrics = this._tracerMetrics.startSpan(parentSpanContext, samplingResult.decision);
|
|
306028
|
+
traceState = samplingResult.traceState ?? traceState;
|
|
306029
|
+
const traceFlags = samplingResult.decision === api2.SamplingDecision.RECORD_AND_SAMPLED ? api2.TraceFlags.SAMPLED : api2.TraceFlags.NONE;
|
|
306030
|
+
const spanContext = { traceId, spanId, traceFlags, traceState };
|
|
306031
|
+
if (samplingResult.decision === api2.SamplingDecision.NOT_RECORD) {
|
|
306032
|
+
api2.diag.debug("Recording is off, propagating context in a non-recording span");
|
|
306033
|
+
const nonRecordingSpan = api2.trace.wrapSpanContext(spanContext);
|
|
306034
|
+
return nonRecordingSpan;
|
|
306035
|
+
}
|
|
306036
|
+
const initAttributes = (0, core_1.sanitizeAttributes)(Object.assign(attributes, samplingResult.attributes));
|
|
306037
|
+
const span = new Span_1.SpanImpl({
|
|
306038
|
+
resource: this._resource,
|
|
306039
|
+
scope: this.instrumentationScope,
|
|
306040
|
+
context,
|
|
306041
|
+
spanContext,
|
|
306042
|
+
name,
|
|
306043
|
+
kind: spanKind,
|
|
306044
|
+
links,
|
|
306045
|
+
parentSpanContext: validParentSpanContext,
|
|
306046
|
+
attributes: initAttributes,
|
|
306047
|
+
startTime: options.startTime,
|
|
306048
|
+
spanProcessor: this._spanProcessor,
|
|
306049
|
+
spanLimits: this._spanLimits,
|
|
306050
|
+
recordEndMetrics
|
|
306051
|
+
});
|
|
306052
|
+
return span;
|
|
306053
|
+
}
|
|
306054
|
+
startActiveSpan(name, arg2, arg3, arg4) {
|
|
306055
|
+
let opts;
|
|
306056
|
+
let ctx;
|
|
306057
|
+
let fn;
|
|
306058
|
+
if (arguments.length < 2) {
|
|
306059
|
+
return;
|
|
306060
|
+
} else if (arguments.length === 2) {
|
|
306061
|
+
fn = arg2;
|
|
306062
|
+
} else if (arguments.length === 3) {
|
|
306063
|
+
opts = arg2;
|
|
306064
|
+
fn = arg3;
|
|
306065
|
+
} else {
|
|
306066
|
+
opts = arg2;
|
|
306067
|
+
ctx = arg3;
|
|
306068
|
+
fn = arg4;
|
|
306069
|
+
}
|
|
306070
|
+
const parentContext = ctx ?? api2.context.active();
|
|
306071
|
+
const span = this.startSpan(name, opts, parentContext);
|
|
306072
|
+
const contextWithSpanSet = api2.trace.setSpan(parentContext, span);
|
|
306073
|
+
return api2.context.with(contextWithSpanSet, fn, undefined, span);
|
|
306074
|
+
}
|
|
306075
|
+
[inspect_1.inspectCustom](depth, options, inspect3) {
|
|
306076
|
+
const payload = {
|
|
306077
|
+
instrumentationScope: this.instrumentationScope,
|
|
306078
|
+
resource: { attributes: (0, inspect_1.settledResourceAttributes)(this._resource) },
|
|
306079
|
+
spanLimits: this._spanLimits
|
|
306080
|
+
};
|
|
306081
|
+
return (0, inspect_1.formatInspect)("Tracer", payload, depth, options, inspect3);
|
|
306082
|
+
}
|
|
306083
|
+
}
|
|
306084
|
+
exports.Tracer = Tracer;
|
|
306085
|
+
});
|
|
306086
|
+
|
|
306087
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/MultiSpanProcessor.js
|
|
306088
|
+
var require_MultiSpanProcessor = __commonJS((exports) => {
|
|
306089
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
306090
|
+
exports.MultiSpanProcessor = undefined;
|
|
306091
|
+
var core_1 = require_src5();
|
|
306092
|
+
|
|
306093
|
+
class MultiSpanProcessor {
|
|
306094
|
+
_spanProcessors;
|
|
306095
|
+
constructor(spanProcessors) {
|
|
306096
|
+
this._spanProcessors = spanProcessors;
|
|
306097
|
+
}
|
|
306098
|
+
forceFlush() {
|
|
306099
|
+
const promises = [];
|
|
306100
|
+
for (const spanProcessor of this._spanProcessors) {
|
|
306101
|
+
promises.push(spanProcessor.forceFlush());
|
|
306102
|
+
}
|
|
306103
|
+
return new Promise((resolve25) => {
|
|
306104
|
+
Promise.all(promises).then(() => {
|
|
306105
|
+
resolve25();
|
|
306106
|
+
}).catch((error49) => {
|
|
306107
|
+
(0, core_1.globalErrorHandler)(error49 || new Error("MultiSpanProcessor: forceFlush failed"));
|
|
306108
|
+
resolve25();
|
|
306109
|
+
});
|
|
306110
|
+
});
|
|
306111
|
+
}
|
|
306112
|
+
onStart(span, context) {
|
|
306113
|
+
for (const spanProcessor of this._spanProcessors) {
|
|
306114
|
+
spanProcessor.onStart(span, context);
|
|
306115
|
+
}
|
|
306116
|
+
}
|
|
306117
|
+
onEnding(span) {
|
|
306118
|
+
for (const spanProcessor of this._spanProcessors) {
|
|
306119
|
+
if (spanProcessor.onEnding) {
|
|
306120
|
+
spanProcessor.onEnding(span);
|
|
306121
|
+
}
|
|
306122
|
+
}
|
|
306123
|
+
}
|
|
306124
|
+
onEnd(span) {
|
|
306125
|
+
for (const spanProcessor of this._spanProcessors) {
|
|
306126
|
+
spanProcessor.onEnd(span);
|
|
306127
|
+
}
|
|
306128
|
+
}
|
|
306129
|
+
shutdown() {
|
|
306130
|
+
const promises = [];
|
|
306131
|
+
for (const spanProcessor of this._spanProcessors) {
|
|
306132
|
+
promises.push(spanProcessor.shutdown());
|
|
306133
|
+
}
|
|
306134
|
+
return new Promise((resolve25, reject2) => {
|
|
306135
|
+
Promise.all(promises).then(() => {
|
|
306136
|
+
resolve25();
|
|
306137
|
+
}, reject2);
|
|
306138
|
+
});
|
|
306139
|
+
}
|
|
306140
|
+
}
|
|
306141
|
+
exports.MultiSpanProcessor = MultiSpanProcessor;
|
|
306142
|
+
});
|
|
306143
|
+
|
|
306144
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/sampler/AlwaysOffSampler.js
|
|
305147
306145
|
var require_AlwaysOffSampler = __commonJS((exports) => {
|
|
305148
306146
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305149
306147
|
exports.AlwaysOffSampler = undefined;
|
|
@@ -305162,7 +306160,7 @@ var require_AlwaysOffSampler = __commonJS((exports) => {
|
|
|
305162
306160
|
exports.AlwaysOffSampler = AlwaysOffSampler;
|
|
305163
306161
|
});
|
|
305164
306162
|
|
|
305165
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
306163
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/sampler/AlwaysOnSampler.js
|
|
305166
306164
|
var require_AlwaysOnSampler = __commonJS((exports) => {
|
|
305167
306165
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305168
306166
|
exports.AlwaysOnSampler = undefined;
|
|
@@ -305181,7 +306179,7 @@ var require_AlwaysOnSampler = __commonJS((exports) => {
|
|
|
305181
306179
|
exports.AlwaysOnSampler = AlwaysOnSampler;
|
|
305182
306180
|
});
|
|
305183
306181
|
|
|
305184
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
306182
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/sampler/ParentBasedSampler.js
|
|
305185
306183
|
var require_ParentBasedSampler = __commonJS((exports) => {
|
|
305186
306184
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305187
306185
|
exports.ParentBasedSampler = undefined;
|
|
@@ -305230,162 +306228,81 @@ var require_ParentBasedSampler = __commonJS((exports) => {
|
|
|
305230
306228
|
exports.ParentBasedSampler = ParentBasedSampler;
|
|
305231
306229
|
});
|
|
305232
306230
|
|
|
305233
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
305234
|
-
var
|
|
306231
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/export/SpanProcessorMetrics.js
|
|
306232
|
+
var require_SpanProcessorMetrics = __commonJS((exports) => {
|
|
305235
306233
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305236
|
-
exports.
|
|
305237
|
-
var
|
|
305238
|
-
var
|
|
305239
|
-
|
|
305240
|
-
|
|
305241
|
-
|
|
305242
|
-
|
|
305243
|
-
|
|
305244
|
-
|
|
305245
|
-
|
|
305246
|
-
|
|
305247
|
-
|
|
305248
|
-
|
|
305249
|
-
|
|
305250
|
-
|
|
305251
|
-
|
|
305252
|
-
|
|
305253
|
-
|
|
306234
|
+
exports.SpanProcessorMetrics = undefined;
|
|
306235
|
+
var semantic_conventions_1 = require_src4();
|
|
306236
|
+
var semconv_1 = require_semconv5();
|
|
306237
|
+
var componentCounter = new Map;
|
|
306238
|
+
|
|
306239
|
+
class SpanProcessorMetrics {
|
|
306240
|
+
processedSpans;
|
|
306241
|
+
queueSize;
|
|
306242
|
+
queueSizeCallback;
|
|
306243
|
+
standardAttrs;
|
|
306244
|
+
droppedAttrs;
|
|
306245
|
+
constructor(componentType, meter, queueConfig) {
|
|
306246
|
+
const counter = componentCounter.get(componentType) ?? 0;
|
|
306247
|
+
componentCounter.set(componentType, counter + 1);
|
|
306248
|
+
this.standardAttrs = {
|
|
306249
|
+
[semconv_1.ATTR_OTEL_COMPONENT_TYPE]: componentType,
|
|
306250
|
+
[semconv_1.ATTR_OTEL_COMPONENT_NAME]: `${componentType}/${counter}`
|
|
306251
|
+
};
|
|
306252
|
+
this.droppedAttrs = {
|
|
306253
|
+
...this.standardAttrs,
|
|
306254
|
+
[semantic_conventions_1.ATTR_ERROR_TYPE]: "queue_full"
|
|
306255
|
+
};
|
|
306256
|
+
this.processedSpans = meter.createCounter(semconv_1.METRIC_OTEL_SDK_PROCESSOR_SPAN_PROCESSED, {
|
|
306257
|
+
unit: "{span}",
|
|
306258
|
+
description: "The number of spans for which the processing has finished, either successful or failed."
|
|
306259
|
+
});
|
|
306260
|
+
if (queueConfig) {
|
|
306261
|
+
const { capacity, getQueueSize } = queueConfig;
|
|
306262
|
+
const queueCapacity = meter.createUpDownCounter(semconv_1.METRIC_OTEL_SDK_PROCESSOR_SPAN_QUEUE_CAPACITY, {
|
|
306263
|
+
unit: "{span}",
|
|
306264
|
+
description: "The maximum number of spans the queue of a given instance of an SDK span processor can hold."
|
|
306265
|
+
});
|
|
306266
|
+
queueCapacity.add(capacity, this.standardAttrs);
|
|
306267
|
+
this.queueSize = meter.createObservableUpDownCounter(semconv_1.METRIC_OTEL_SDK_PROCESSOR_SPAN_QUEUE_SIZE, {
|
|
306268
|
+
unit: "{span}",
|
|
306269
|
+
description: "The number of spans in the queue of a given instance of an SDK span processor."
|
|
306270
|
+
});
|
|
306271
|
+
this.queueSizeCallback = (result) => result.observe(getQueueSize(), this.standardAttrs);
|
|
306272
|
+
this.queueSize.addCallback(this.queueSizeCallback);
|
|
306273
|
+
}
|
|
305254
306274
|
}
|
|
305255
|
-
|
|
305256
|
-
|
|
305257
|
-
return 0;
|
|
305258
|
-
return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;
|
|
306275
|
+
dropSpans(count3) {
|
|
306276
|
+
this.processedSpans.add(count3, this.droppedAttrs);
|
|
305259
306277
|
}
|
|
305260
|
-
|
|
305261
|
-
|
|
305262
|
-
|
|
305263
|
-
|
|
305264
|
-
const part = parseInt(traceId.slice(pos, pos + 8), 16);
|
|
305265
|
-
accumulation = (accumulation ^ part) >>> 0;
|
|
306278
|
+
finishSpans(count3, error49) {
|
|
306279
|
+
if (!error49) {
|
|
306280
|
+
this.processedSpans.add(count3, this.standardAttrs);
|
|
306281
|
+
return;
|
|
305266
306282
|
}
|
|
305267
|
-
|
|
306283
|
+
const attrs = {
|
|
306284
|
+
...this.standardAttrs,
|
|
306285
|
+
[semantic_conventions_1.ATTR_ERROR_TYPE]: error49.name
|
|
306286
|
+
};
|
|
306287
|
+
this.processedSpans.add(count3, attrs);
|
|
305268
306288
|
}
|
|
305269
|
-
|
|
305270
|
-
|
|
305271
|
-
|
|
305272
|
-
|
|
305273
|
-
// node_modules/@opentelemetry/sdk-trace-base/build/src/config.js
|
|
305274
|
-
var require_config = __commonJS((exports) => {
|
|
305275
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305276
|
-
exports.buildSamplerFromEnv = exports.loadDefaultConfig = undefined;
|
|
305277
|
-
var api_1 = require_src2();
|
|
305278
|
-
var core_1 = require_src5();
|
|
305279
|
-
var AlwaysOffSampler_1 = require_AlwaysOffSampler();
|
|
305280
|
-
var AlwaysOnSampler_1 = require_AlwaysOnSampler();
|
|
305281
|
-
var ParentBasedSampler_1 = require_ParentBasedSampler();
|
|
305282
|
-
var TraceIdRatioBasedSampler_1 = require_TraceIdRatioBasedSampler();
|
|
305283
|
-
var TracesSamplerValues;
|
|
305284
|
-
(function(TracesSamplerValues2) {
|
|
305285
|
-
TracesSamplerValues2["AlwaysOff"] = "always_off";
|
|
305286
|
-
TracesSamplerValues2["AlwaysOn"] = "always_on";
|
|
305287
|
-
TracesSamplerValues2["ParentBasedAlwaysOff"] = "parentbased_always_off";
|
|
305288
|
-
TracesSamplerValues2["ParentBasedAlwaysOn"] = "parentbased_always_on";
|
|
305289
|
-
TracesSamplerValues2["ParentBasedTraceIdRatio"] = "parentbased_traceidratio";
|
|
305290
|
-
TracesSamplerValues2["TraceIdRatio"] = "traceidratio";
|
|
305291
|
-
})(TracesSamplerValues || (TracesSamplerValues = {}));
|
|
305292
|
-
var DEFAULT_RATIO = 1;
|
|
305293
|
-
function loadDefaultConfig() {
|
|
305294
|
-
return {
|
|
305295
|
-
sampler: buildSamplerFromEnv(),
|
|
305296
|
-
forceFlushTimeoutMillis: 30000,
|
|
305297
|
-
generalLimits: {
|
|
305298
|
-
attributeValueLengthLimit: (0, core_1.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT") ?? Infinity,
|
|
305299
|
-
attributeCountLimit: (0, core_1.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT") ?? 128
|
|
305300
|
-
},
|
|
305301
|
-
spanLimits: {
|
|
305302
|
-
attributeValueLengthLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT") ?? Infinity,
|
|
305303
|
-
attributeCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT") ?? 128,
|
|
305304
|
-
linkCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_LINK_COUNT_LIMIT") ?? 128,
|
|
305305
|
-
eventCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_EVENT_COUNT_LIMIT") ?? 128,
|
|
305306
|
-
attributePerEventCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT") ?? 128,
|
|
305307
|
-
attributePerLinkCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT") ?? 128
|
|
306289
|
+
shutdown() {
|
|
306290
|
+
if (this.queueSize && this.queueSizeCallback) {
|
|
306291
|
+
this.queueSize.removeCallback(this.queueSizeCallback);
|
|
305308
306292
|
}
|
|
305309
|
-
};
|
|
305310
|
-
}
|
|
305311
|
-
exports.loadDefaultConfig = loadDefaultConfig;
|
|
305312
|
-
function buildSamplerFromEnv() {
|
|
305313
|
-
const sampler = (0, core_1.getStringFromEnv)("OTEL_TRACES_SAMPLER") ?? TracesSamplerValues.ParentBasedAlwaysOn;
|
|
305314
|
-
switch (sampler) {
|
|
305315
|
-
case TracesSamplerValues.AlwaysOn:
|
|
305316
|
-
return new AlwaysOnSampler_1.AlwaysOnSampler;
|
|
305317
|
-
case TracesSamplerValues.AlwaysOff:
|
|
305318
|
-
return new AlwaysOffSampler_1.AlwaysOffSampler;
|
|
305319
|
-
case TracesSamplerValues.ParentBasedAlwaysOn:
|
|
305320
|
-
return new ParentBasedSampler_1.ParentBasedSampler({
|
|
305321
|
-
root: new AlwaysOnSampler_1.AlwaysOnSampler
|
|
305322
|
-
});
|
|
305323
|
-
case TracesSamplerValues.ParentBasedAlwaysOff:
|
|
305324
|
-
return new ParentBasedSampler_1.ParentBasedSampler({
|
|
305325
|
-
root: new AlwaysOffSampler_1.AlwaysOffSampler
|
|
305326
|
-
});
|
|
305327
|
-
case TracesSamplerValues.TraceIdRatio:
|
|
305328
|
-
return new TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv());
|
|
305329
|
-
case TracesSamplerValues.ParentBasedTraceIdRatio:
|
|
305330
|
-
return new ParentBasedSampler_1.ParentBasedSampler({
|
|
305331
|
-
root: new TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv())
|
|
305332
|
-
});
|
|
305333
|
-
default:
|
|
305334
|
-
api_1.diag.error(`OTEL_TRACES_SAMPLER value "${sampler}" invalid, defaulting to "${TracesSamplerValues.ParentBasedAlwaysOn}".`);
|
|
305335
|
-
return new ParentBasedSampler_1.ParentBasedSampler({
|
|
305336
|
-
root: new AlwaysOnSampler_1.AlwaysOnSampler
|
|
305337
|
-
});
|
|
305338
|
-
}
|
|
305339
|
-
}
|
|
305340
|
-
exports.buildSamplerFromEnv = buildSamplerFromEnv;
|
|
305341
|
-
function getSamplerProbabilityFromEnv() {
|
|
305342
|
-
const probability = (0, core_1.getNumberFromEnv)("OTEL_TRACES_SAMPLER_ARG");
|
|
305343
|
-
if (probability == null) {
|
|
305344
|
-
api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${DEFAULT_RATIO}.`);
|
|
305345
|
-
return DEFAULT_RATIO;
|
|
305346
|
-
}
|
|
305347
|
-
if (probability < 0 || probability > 1) {
|
|
305348
|
-
api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG=${probability} was given, but it is out of range ([0..1]), defaulting to ${DEFAULT_RATIO}.`);
|
|
305349
|
-
return DEFAULT_RATIO;
|
|
305350
306293
|
}
|
|
305351
|
-
return probability;
|
|
305352
|
-
}
|
|
305353
|
-
});
|
|
305354
|
-
|
|
305355
|
-
// node_modules/@opentelemetry/sdk-trace-base/build/src/utility.js
|
|
305356
|
-
var require_utility = __commonJS((exports) => {
|
|
305357
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305358
|
-
exports.reconfigureLimits = exports.mergeConfig = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = undefined;
|
|
305359
|
-
var config_1 = require_config();
|
|
305360
|
-
var core_1 = require_src5();
|
|
305361
|
-
exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;
|
|
305362
|
-
exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;
|
|
305363
|
-
function mergeConfig3(userConfig) {
|
|
305364
|
-
const perInstanceDefaults = {
|
|
305365
|
-
sampler: (0, config_1.buildSamplerFromEnv)()
|
|
305366
|
-
};
|
|
305367
|
-
const DEFAULT_CONFIG2 = (0, config_1.loadDefaultConfig)();
|
|
305368
|
-
const target = Object.assign({}, DEFAULT_CONFIG2, perInstanceDefaults, userConfig);
|
|
305369
|
-
target.generalLimits = Object.assign({}, DEFAULT_CONFIG2.generalLimits, userConfig.generalLimits || {});
|
|
305370
|
-
target.spanLimits = Object.assign({}, DEFAULT_CONFIG2.spanLimits, userConfig.spanLimits || {});
|
|
305371
|
-
return target;
|
|
305372
|
-
}
|
|
305373
|
-
exports.mergeConfig = mergeConfig3;
|
|
305374
|
-
function reconfigureLimits(userConfig) {
|
|
305375
|
-
const spanLimits = Object.assign({}, userConfig.spanLimits);
|
|
305376
|
-
spanLimits.attributeCountLimit = userConfig.spanLimits?.attributeCountLimit ?? userConfig.generalLimits?.attributeCountLimit ?? (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT") ?? (0, core_1.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT") ?? exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT;
|
|
305377
|
-
spanLimits.attributeValueLengthLimit = userConfig.spanLimits?.attributeValueLengthLimit ?? userConfig.generalLimits?.attributeValueLengthLimit ?? (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT") ?? (0, core_1.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT") ?? exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT;
|
|
305378
|
-
return Object.assign({}, userConfig, { spanLimits });
|
|
305379
306294
|
}
|
|
305380
|
-
exports.
|
|
306295
|
+
exports.SpanProcessorMetrics = SpanProcessorMetrics;
|
|
305381
306296
|
});
|
|
305382
306297
|
|
|
305383
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
306298
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/export/BatchSpanProcessorBase.js
|
|
305384
306299
|
var require_BatchSpanProcessorBase = __commonJS((exports) => {
|
|
305385
306300
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305386
306301
|
exports.BatchSpanProcessorBase = undefined;
|
|
305387
306302
|
var api_1 = require_src2();
|
|
305388
306303
|
var core_1 = require_src5();
|
|
306304
|
+
var SpanProcessorMetrics_1 = require_SpanProcessorMetrics();
|
|
306305
|
+
var semconv_1 = require_semconv5();
|
|
305389
306306
|
|
|
305390
306307
|
class BatchSpanProcessorBase {
|
|
305391
306308
|
_maxExportBatchSize;
|
|
@@ -305393,22 +306310,28 @@ var require_BatchSpanProcessorBase = __commonJS((exports) => {
|
|
|
305393
306310
|
_scheduledDelayMillis;
|
|
305394
306311
|
_exportTimeoutMillis;
|
|
305395
306312
|
_exporter;
|
|
306313
|
+
_metrics;
|
|
305396
306314
|
_isExporting = false;
|
|
305397
306315
|
_finishedSpans = [];
|
|
305398
306316
|
_timer;
|
|
305399
306317
|
_shutdownOnce;
|
|
305400
306318
|
_droppedSpansCount = 0;
|
|
305401
|
-
constructor(
|
|
305402
|
-
this._exporter = exporter;
|
|
305403
|
-
this._maxExportBatchSize =
|
|
305404
|
-
this._maxQueueSize =
|
|
305405
|
-
this._scheduledDelayMillis =
|
|
305406
|
-
this._exportTimeoutMillis =
|
|
306319
|
+
constructor(options) {
|
|
306320
|
+
this._exporter = options.exporter;
|
|
306321
|
+
this._maxExportBatchSize = options.maxExportBatchSize ?? 512;
|
|
306322
|
+
this._maxQueueSize = options.maxQueueSize ?? 2048;
|
|
306323
|
+
this._scheduledDelayMillis = options.scheduledDelayMillis ?? 5000;
|
|
306324
|
+
this._exportTimeoutMillis = options.exportTimeoutMillis ?? 30000;
|
|
305407
306325
|
this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);
|
|
305408
306326
|
if (this._maxExportBatchSize > this._maxQueueSize) {
|
|
305409
306327
|
api_1.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize");
|
|
305410
306328
|
this._maxExportBatchSize = this._maxQueueSize;
|
|
305411
306329
|
}
|
|
306330
|
+
const meter = options.selfObsMeterProvider ? options.selfObsMeterProvider.getMeter("@opentelemetry/sdk-trace") : (0, api_1.createNoopMeter)();
|
|
306331
|
+
this._metrics = new SpanProcessorMetrics_1.SpanProcessorMetrics(semconv_1.OTEL_COMPONENT_TYPE_VALUE_BATCHING_SPAN_PROCESSOR, meter, {
|
|
306332
|
+
capacity: this._maxQueueSize,
|
|
306333
|
+
getQueueSize: () => this._finishedSpans.length
|
|
306334
|
+
});
|
|
305412
306335
|
}
|
|
305413
306336
|
forceFlush() {
|
|
305414
306337
|
if (this._shutdownOnce.isCalled) {
|
|
@@ -305435,6 +306358,7 @@ var require_BatchSpanProcessorBase = __commonJS((exports) => {
|
|
|
305435
306358
|
}).then(() => {
|
|
305436
306359
|
return this._flushAll();
|
|
305437
306360
|
}).then(() => {
|
|
306361
|
+
this._metrics.shutdown();
|
|
305438
306362
|
return this._exporter.shutdown();
|
|
305439
306363
|
});
|
|
305440
306364
|
}
|
|
@@ -305444,6 +306368,7 @@ var require_BatchSpanProcessorBase = __commonJS((exports) => {
|
|
|
305444
306368
|
api_1.diag.debug("maxQueueSize reached, dropping spans");
|
|
305445
306369
|
}
|
|
305446
306370
|
this._droppedSpansCount++;
|
|
306371
|
+
this._metrics.dropSpans(1);
|
|
305447
306372
|
return;
|
|
305448
306373
|
}
|
|
305449
306374
|
if (this._droppedSpansCount > 0) {
|
|
@@ -305484,6 +306409,7 @@ var require_BatchSpanProcessorBase = __commonJS((exports) => {
|
|
|
305484
306409
|
}
|
|
305485
306410
|
const doExport = () => this._exporter.export(spans, (result) => {
|
|
305486
306411
|
clearTimeout(timer);
|
|
306412
|
+
this._metrics.finishSpans(spans.length, result.error);
|
|
305487
306413
|
if (result.code === core_1.ExportResultCode.SUCCESS) {
|
|
305488
306414
|
resolve25();
|
|
305489
306415
|
} else {
|
|
@@ -305545,7 +306471,7 @@ var require_BatchSpanProcessorBase = __commonJS((exports) => {
|
|
|
305545
306471
|
exports.BatchSpanProcessorBase = BatchSpanProcessorBase;
|
|
305546
306472
|
});
|
|
305547
306473
|
|
|
305548
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
306474
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/platform/node/export/BatchSpanProcessor.js
|
|
305549
306475
|
var require_BatchSpanProcessor = __commonJS((exports) => {
|
|
305550
306476
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305551
306477
|
exports.BatchSpanProcessor = undefined;
|
|
@@ -305557,7 +306483,7 @@ var require_BatchSpanProcessor = __commonJS((exports) => {
|
|
|
305557
306483
|
exports.BatchSpanProcessor = BatchSpanProcessor;
|
|
305558
306484
|
});
|
|
305559
306485
|
|
|
305560
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
306486
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/platform/node/RandomIdGenerator.js
|
|
305561
306487
|
var require_RandomIdGenerator = __commonJS((exports) => {
|
|
305562
306488
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305563
306489
|
exports.RandomIdGenerator = undefined;
|
|
@@ -305587,7 +306513,7 @@ var require_RandomIdGenerator = __commonJS((exports) => {
|
|
|
305587
306513
|
}
|
|
305588
306514
|
});
|
|
305589
306515
|
|
|
305590
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
306516
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/platform/node/index.js
|
|
305591
306517
|
var require_node5 = __commonJS((exports) => {
|
|
305592
306518
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305593
306519
|
exports.RandomIdGenerator = exports.BatchSpanProcessor = undefined;
|
|
@@ -305601,7 +306527,7 @@ var require_node5 = __commonJS((exports) => {
|
|
|
305601
306527
|
} });
|
|
305602
306528
|
});
|
|
305603
306529
|
|
|
305604
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
306530
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/platform/index.js
|
|
305605
306531
|
var require_platform4 = __commonJS((exports) => {
|
|
305606
306532
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305607
306533
|
exports.RandomIdGenerator = exports.BatchSpanProcessor = undefined;
|
|
@@ -305614,306 +306540,68 @@ var require_platform4 = __commonJS((exports) => {
|
|
|
305614
306540
|
} });
|
|
305615
306541
|
});
|
|
305616
306542
|
|
|
305617
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
305618
|
-
var
|
|
305619
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305620
|
-
exports.METRIC_OTEL_SDK_SPAN_STARTED = exports.METRIC_OTEL_SDK_SPAN_LIVE = exports.ATTR_OTEL_SPAN_SAMPLING_RESULT = exports.ATTR_OTEL_SPAN_PARENT_ORIGIN = undefined;
|
|
305621
|
-
exports.ATTR_OTEL_SPAN_PARENT_ORIGIN = "otel.span.parent.origin";
|
|
305622
|
-
exports.ATTR_OTEL_SPAN_SAMPLING_RESULT = "otel.span.sampling_result";
|
|
305623
|
-
exports.METRIC_OTEL_SDK_SPAN_LIVE = "otel.sdk.span.live";
|
|
305624
|
-
exports.METRIC_OTEL_SDK_SPAN_STARTED = "otel.sdk.span.started";
|
|
305625
|
-
});
|
|
305626
|
-
|
|
305627
|
-
// node_modules/@opentelemetry/sdk-trace-base/build/src/TracerMetrics.js
|
|
305628
|
-
var require_TracerMetrics = __commonJS((exports) => {
|
|
305629
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305630
|
-
exports.TracerMetrics = undefined;
|
|
305631
|
-
var Sampler_1 = require_Sampler();
|
|
305632
|
-
var semconv_1 = require_semconv3();
|
|
305633
|
-
|
|
305634
|
-
class TracerMetrics {
|
|
305635
|
-
startedSpans;
|
|
305636
|
-
liveSpans;
|
|
305637
|
-
constructor(meter) {
|
|
305638
|
-
this.startedSpans = meter.createCounter(semconv_1.METRIC_OTEL_SDK_SPAN_STARTED, {
|
|
305639
|
-
unit: "{span}",
|
|
305640
|
-
description: "The number of created spans."
|
|
305641
|
-
});
|
|
305642
|
-
this.liveSpans = meter.createUpDownCounter(semconv_1.METRIC_OTEL_SDK_SPAN_LIVE, {
|
|
305643
|
-
unit: "{span}",
|
|
305644
|
-
description: "The number of currently live spans."
|
|
305645
|
-
});
|
|
305646
|
-
}
|
|
305647
|
-
startSpan(parentSpanCtx, samplingDecision) {
|
|
305648
|
-
const samplingDecisionStr = samplingDecisionToString(samplingDecision);
|
|
305649
|
-
this.startedSpans.add(1, {
|
|
305650
|
-
[semconv_1.ATTR_OTEL_SPAN_PARENT_ORIGIN]: parentOrigin(parentSpanCtx),
|
|
305651
|
-
[semconv_1.ATTR_OTEL_SPAN_SAMPLING_RESULT]: samplingDecisionStr
|
|
305652
|
-
});
|
|
305653
|
-
if (samplingDecision === Sampler_1.SamplingDecision.NOT_RECORD) {
|
|
305654
|
-
return () => {};
|
|
305655
|
-
}
|
|
305656
|
-
const liveSpanAttributes = {
|
|
305657
|
-
[semconv_1.ATTR_OTEL_SPAN_SAMPLING_RESULT]: samplingDecisionStr
|
|
305658
|
-
};
|
|
305659
|
-
this.liveSpans.add(1, liveSpanAttributes);
|
|
305660
|
-
return () => {
|
|
305661
|
-
this.liveSpans.add(-1, liveSpanAttributes);
|
|
305662
|
-
};
|
|
305663
|
-
}
|
|
305664
|
-
}
|
|
305665
|
-
exports.TracerMetrics = TracerMetrics;
|
|
305666
|
-
function parentOrigin(parentSpanContext) {
|
|
305667
|
-
if (!parentSpanContext) {
|
|
305668
|
-
return "none";
|
|
305669
|
-
}
|
|
305670
|
-
if (parentSpanContext.isRemote) {
|
|
305671
|
-
return "remote";
|
|
305672
|
-
}
|
|
305673
|
-
return "local";
|
|
305674
|
-
}
|
|
305675
|
-
function samplingDecisionToString(decision) {
|
|
305676
|
-
switch (decision) {
|
|
305677
|
-
case Sampler_1.SamplingDecision.RECORD_AND_SAMPLED:
|
|
305678
|
-
return "RECORD_AND_SAMPLE";
|
|
305679
|
-
case Sampler_1.SamplingDecision.RECORD:
|
|
305680
|
-
return "RECORD_ONLY";
|
|
305681
|
-
case Sampler_1.SamplingDecision.NOT_RECORD:
|
|
305682
|
-
return "DROP";
|
|
305683
|
-
}
|
|
305684
|
-
}
|
|
305685
|
-
});
|
|
305686
|
-
|
|
305687
|
-
// node_modules/@opentelemetry/sdk-trace-base/build/src/version.js
|
|
305688
|
-
var require_version3 = __commonJS((exports) => {
|
|
305689
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305690
|
-
exports.VERSION = undefined;
|
|
305691
|
-
exports.VERSION = "2.6.1";
|
|
305692
|
-
});
|
|
305693
|
-
|
|
305694
|
-
// node_modules/@opentelemetry/sdk-trace-base/build/src/Tracer.js
|
|
305695
|
-
var require_Tracer = __commonJS((exports) => {
|
|
305696
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305697
|
-
exports.Tracer = undefined;
|
|
305698
|
-
var api2 = require_src2();
|
|
305699
|
-
var core_1 = require_src5();
|
|
305700
|
-
var Span_1 = require_Span();
|
|
305701
|
-
var utility_1 = require_utility();
|
|
305702
|
-
var platform_1 = require_platform4();
|
|
305703
|
-
var TracerMetrics_1 = require_TracerMetrics();
|
|
305704
|
-
var version_1 = require_version3();
|
|
305705
|
-
|
|
305706
|
-
class Tracer {
|
|
305707
|
-
_sampler;
|
|
305708
|
-
_generalLimits;
|
|
305709
|
-
_spanLimits;
|
|
305710
|
-
_idGenerator;
|
|
305711
|
-
instrumentationScope;
|
|
305712
|
-
_resource;
|
|
305713
|
-
_spanProcessor;
|
|
305714
|
-
_tracerMetrics;
|
|
305715
|
-
constructor(instrumentationScope, config4, resource, spanProcessor) {
|
|
305716
|
-
const localConfig = (0, utility_1.mergeConfig)(config4);
|
|
305717
|
-
this._sampler = localConfig.sampler;
|
|
305718
|
-
this._generalLimits = localConfig.generalLimits;
|
|
305719
|
-
this._spanLimits = localConfig.spanLimits;
|
|
305720
|
-
this._idGenerator = config4.idGenerator || new platform_1.RandomIdGenerator;
|
|
305721
|
-
this._resource = resource;
|
|
305722
|
-
this._spanProcessor = spanProcessor;
|
|
305723
|
-
this.instrumentationScope = instrumentationScope;
|
|
305724
|
-
const meter = localConfig.meterProvider ? localConfig.meterProvider.getMeter("@opentelemetry/sdk-trace", version_1.VERSION) : api2.createNoopMeter();
|
|
305725
|
-
this._tracerMetrics = new TracerMetrics_1.TracerMetrics(meter);
|
|
305726
|
-
}
|
|
305727
|
-
startSpan(name, options = {}, context = api2.context.active()) {
|
|
305728
|
-
if (options.root) {
|
|
305729
|
-
context = api2.trace.deleteSpan(context);
|
|
305730
|
-
}
|
|
305731
|
-
const parentSpan = api2.trace.getSpan(context);
|
|
305732
|
-
if ((0, core_1.isTracingSuppressed)(context)) {
|
|
305733
|
-
api2.diag.debug("Instrumentation suppressed, returning Noop Span");
|
|
305734
|
-
const nonRecordingSpan = api2.trace.wrapSpanContext(api2.INVALID_SPAN_CONTEXT);
|
|
305735
|
-
return nonRecordingSpan;
|
|
305736
|
-
}
|
|
305737
|
-
const parentSpanContext = parentSpan?.spanContext();
|
|
305738
|
-
const spanId = this._idGenerator.generateSpanId();
|
|
305739
|
-
let validParentSpanContext;
|
|
305740
|
-
let traceId;
|
|
305741
|
-
let traceState;
|
|
305742
|
-
if (!parentSpanContext || !api2.trace.isSpanContextValid(parentSpanContext)) {
|
|
305743
|
-
traceId = this._idGenerator.generateTraceId();
|
|
305744
|
-
} else {
|
|
305745
|
-
traceId = parentSpanContext.traceId;
|
|
305746
|
-
traceState = parentSpanContext.traceState;
|
|
305747
|
-
validParentSpanContext = parentSpanContext;
|
|
305748
|
-
}
|
|
305749
|
-
const spanKind = options.kind ?? api2.SpanKind.INTERNAL;
|
|
305750
|
-
const links = (options.links ?? []).map((link2) => {
|
|
305751
|
-
return {
|
|
305752
|
-
context: link2.context,
|
|
305753
|
-
attributes: (0, core_1.sanitizeAttributes)(link2.attributes)
|
|
305754
|
-
};
|
|
305755
|
-
});
|
|
305756
|
-
const attributes = (0, core_1.sanitizeAttributes)(options.attributes);
|
|
305757
|
-
const samplingResult = this._sampler.shouldSample(context, traceId, name, spanKind, attributes, links);
|
|
305758
|
-
const recordEndMetrics = this._tracerMetrics.startSpan(parentSpanContext, samplingResult.decision);
|
|
305759
|
-
traceState = samplingResult.traceState ?? traceState;
|
|
305760
|
-
const traceFlags = samplingResult.decision === api2.SamplingDecision.RECORD_AND_SAMPLED ? api2.TraceFlags.SAMPLED : api2.TraceFlags.NONE;
|
|
305761
|
-
const spanContext = { traceId, spanId, traceFlags, traceState };
|
|
305762
|
-
if (samplingResult.decision === api2.SamplingDecision.NOT_RECORD) {
|
|
305763
|
-
api2.diag.debug("Recording is off, propagating context in a non-recording span");
|
|
305764
|
-
const nonRecordingSpan = api2.trace.wrapSpanContext(spanContext);
|
|
305765
|
-
return nonRecordingSpan;
|
|
305766
|
-
}
|
|
305767
|
-
const initAttributes = (0, core_1.sanitizeAttributes)(Object.assign(attributes, samplingResult.attributes));
|
|
305768
|
-
const span = new Span_1.SpanImpl({
|
|
305769
|
-
resource: this._resource,
|
|
305770
|
-
scope: this.instrumentationScope,
|
|
305771
|
-
context,
|
|
305772
|
-
spanContext,
|
|
305773
|
-
name,
|
|
305774
|
-
kind: spanKind,
|
|
305775
|
-
links,
|
|
305776
|
-
parentSpanContext: validParentSpanContext,
|
|
305777
|
-
attributes: initAttributes,
|
|
305778
|
-
startTime: options.startTime,
|
|
305779
|
-
spanProcessor: this._spanProcessor,
|
|
305780
|
-
spanLimits: this._spanLimits,
|
|
305781
|
-
recordEndMetrics
|
|
305782
|
-
});
|
|
305783
|
-
return span;
|
|
305784
|
-
}
|
|
305785
|
-
startActiveSpan(name, arg2, arg3, arg4) {
|
|
305786
|
-
let opts;
|
|
305787
|
-
let ctx;
|
|
305788
|
-
let fn;
|
|
305789
|
-
if (arguments.length < 2) {
|
|
305790
|
-
return;
|
|
305791
|
-
} else if (arguments.length === 2) {
|
|
305792
|
-
fn = arg2;
|
|
305793
|
-
} else if (arguments.length === 3) {
|
|
305794
|
-
opts = arg2;
|
|
305795
|
-
fn = arg3;
|
|
305796
|
-
} else {
|
|
305797
|
-
opts = arg2;
|
|
305798
|
-
ctx = arg3;
|
|
305799
|
-
fn = arg4;
|
|
305800
|
-
}
|
|
305801
|
-
const parentContext = ctx ?? api2.context.active();
|
|
305802
|
-
const span = this.startSpan(name, opts, parentContext);
|
|
305803
|
-
const contextWithSpanSet = api2.trace.setSpan(parentContext, span);
|
|
305804
|
-
return api2.context.with(contextWithSpanSet, fn, undefined, span);
|
|
305805
|
-
}
|
|
305806
|
-
getGeneralLimits() {
|
|
305807
|
-
return this._generalLimits;
|
|
305808
|
-
}
|
|
305809
|
-
getSpanLimits() {
|
|
305810
|
-
return this._spanLimits;
|
|
305811
|
-
}
|
|
305812
|
-
}
|
|
305813
|
-
exports.Tracer = Tracer;
|
|
305814
|
-
});
|
|
305815
|
-
|
|
305816
|
-
// node_modules/@opentelemetry/sdk-trace-base/build/src/MultiSpanProcessor.js
|
|
305817
|
-
var require_MultiSpanProcessor = __commonJS((exports) => {
|
|
305818
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305819
|
-
exports.MultiSpanProcessor = undefined;
|
|
305820
|
-
var core_1 = require_src5();
|
|
305821
|
-
|
|
305822
|
-
class MultiSpanProcessor {
|
|
305823
|
-
_spanProcessors;
|
|
305824
|
-
constructor(spanProcessors) {
|
|
305825
|
-
this._spanProcessors = spanProcessors;
|
|
305826
|
-
}
|
|
305827
|
-
forceFlush() {
|
|
305828
|
-
const promises = [];
|
|
305829
|
-
for (const spanProcessor of this._spanProcessors) {
|
|
305830
|
-
promises.push(spanProcessor.forceFlush());
|
|
305831
|
-
}
|
|
305832
|
-
return new Promise((resolve25) => {
|
|
305833
|
-
Promise.all(promises).then(() => {
|
|
305834
|
-
resolve25();
|
|
305835
|
-
}).catch((error49) => {
|
|
305836
|
-
(0, core_1.globalErrorHandler)(error49 || new Error("MultiSpanProcessor: forceFlush failed"));
|
|
305837
|
-
resolve25();
|
|
305838
|
-
});
|
|
305839
|
-
});
|
|
305840
|
-
}
|
|
305841
|
-
onStart(span, context) {
|
|
305842
|
-
for (const spanProcessor of this._spanProcessors) {
|
|
305843
|
-
spanProcessor.onStart(span, context);
|
|
305844
|
-
}
|
|
305845
|
-
}
|
|
305846
|
-
onEnding(span) {
|
|
305847
|
-
for (const spanProcessor of this._spanProcessors) {
|
|
305848
|
-
if (spanProcessor.onEnding) {
|
|
305849
|
-
spanProcessor.onEnding(span);
|
|
305850
|
-
}
|
|
305851
|
-
}
|
|
305852
|
-
}
|
|
305853
|
-
onEnd(span) {
|
|
305854
|
-
for (const spanProcessor of this._spanProcessors) {
|
|
305855
|
-
spanProcessor.onEnd(span);
|
|
305856
|
-
}
|
|
305857
|
-
}
|
|
305858
|
-
shutdown() {
|
|
305859
|
-
const promises = [];
|
|
305860
|
-
for (const spanProcessor of this._spanProcessors) {
|
|
305861
|
-
promises.push(spanProcessor.shutdown());
|
|
305862
|
-
}
|
|
305863
|
-
return new Promise((resolve25, reject2) => {
|
|
305864
|
-
Promise.all(promises).then(() => {
|
|
305865
|
-
resolve25();
|
|
305866
|
-
}, reject2);
|
|
305867
|
-
});
|
|
305868
|
-
}
|
|
305869
|
-
}
|
|
305870
|
-
exports.MultiSpanProcessor = MultiSpanProcessor;
|
|
305871
|
-
});
|
|
305872
|
-
|
|
305873
|
-
// node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.js
|
|
305874
|
-
var require_BasicTracerProvider = __commonJS((exports) => {
|
|
306543
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/TracerProvider.js
|
|
306544
|
+
var require_TracerProvider = __commonJS((exports) => {
|
|
305875
306545
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305876
|
-
exports.
|
|
305877
|
-
var
|
|
306546
|
+
exports.TracerProvider = undefined;
|
|
306547
|
+
var api_1 = require_src2();
|
|
305878
306548
|
var resources_1 = require_src6();
|
|
305879
306549
|
var Tracer_1 = require_Tracer();
|
|
305880
|
-
var config_1 = require_config();
|
|
305881
306550
|
var MultiSpanProcessor_1 = require_MultiSpanProcessor();
|
|
305882
|
-
var
|
|
306551
|
+
var ParentBasedSampler_1 = require_ParentBasedSampler();
|
|
306552
|
+
var AlwaysOnSampler_1 = require_AlwaysOnSampler();
|
|
306553
|
+
var platform_1 = require_platform4();
|
|
306554
|
+
var inspect_1 = require_inspect();
|
|
305883
306555
|
var ForceFlushState;
|
|
305884
306556
|
(function(ForceFlushState2) {
|
|
305885
306557
|
ForceFlushState2[ForceFlushState2["resolved"] = 0] = "resolved";
|
|
305886
306558
|
ForceFlushState2[ForceFlushState2["timeout"] = 1] = "timeout";
|
|
305887
306559
|
ForceFlushState2[ForceFlushState2["error"] = 2] = "error";
|
|
305888
306560
|
ForceFlushState2[ForceFlushState2["unresolved"] = 3] = "unresolved";
|
|
305889
|
-
})(ForceFlushState
|
|
306561
|
+
})(ForceFlushState || (ForceFlushState = {}));
|
|
305890
306562
|
|
|
305891
|
-
class
|
|
305892
|
-
_config;
|
|
305893
|
-
_tracers = new Map;
|
|
306563
|
+
class TracerProvider {
|
|
305894
306564
|
_resource;
|
|
305895
306565
|
_activeSpanProcessor;
|
|
305896
|
-
|
|
305897
|
-
|
|
305898
|
-
|
|
305899
|
-
|
|
305900
|
-
|
|
305901
|
-
|
|
305902
|
-
const spanProcessors = [];
|
|
305903
|
-
if (config4.spanProcessors?.length) {
|
|
305904
|
-
spanProcessors.push(...config4.spanProcessors);
|
|
305905
|
-
}
|
|
306566
|
+
_forceFlushTimeoutMillis;
|
|
306567
|
+
_tracerOptions;
|
|
306568
|
+
_tracers = new Map;
|
|
306569
|
+
constructor(options = {}) {
|
|
306570
|
+
this._forceFlushTimeoutMillis = options.forceFlushTimeoutMillis ?? 30000;
|
|
306571
|
+
this._resource = options.resource ?? (0, resources_1.defaultResource)();
|
|
306572
|
+
const spanProcessors = options.spanProcessors ?? [];
|
|
305906
306573
|
this._activeSpanProcessor = new MultiSpanProcessor_1.MultiSpanProcessor(spanProcessors);
|
|
306574
|
+
this._tracerOptions = {
|
|
306575
|
+
resource: this._resource,
|
|
306576
|
+
sampler: options.sampler ?? new ParentBasedSampler_1.ParentBasedSampler({
|
|
306577
|
+
root: new AlwaysOnSampler_1.AlwaysOnSampler
|
|
306578
|
+
}),
|
|
306579
|
+
spanLimits: {
|
|
306580
|
+
attributeCountLimit: options.spanLimits?.attributeCountLimit ?? 128,
|
|
306581
|
+
attributeValueLengthLimit: options.spanLimits?.attributeValueLengthLimit ?? Infinity,
|
|
306582
|
+
eventCountLimit: options.spanLimits?.eventCountLimit ?? 128,
|
|
306583
|
+
linkCountLimit: options.spanLimits?.linkCountLimit ?? 128,
|
|
306584
|
+
attributePerEventCountLimit: options.spanLimits?.attributePerEventCountLimit ?? 128,
|
|
306585
|
+
attributePerLinkCountLimit: options.spanLimits?.attributePerLinkCountLimit ?? 128
|
|
306586
|
+
},
|
|
306587
|
+
idGenerator: options.idGenerator || new platform_1.RandomIdGenerator,
|
|
306588
|
+
spanProcessor: this._activeSpanProcessor,
|
|
306589
|
+
meterProvider: options.meterProvider ?? {
|
|
306590
|
+
getMeter() {
|
|
306591
|
+
return (0, api_1.createNoopMeter)();
|
|
306592
|
+
}
|
|
306593
|
+
}
|
|
306594
|
+
};
|
|
305907
306595
|
}
|
|
305908
306596
|
getTracer(name, version2, options) {
|
|
305909
306597
|
const key2 = `${name}@${version2 || ""}:${options?.schemaUrl || ""}`;
|
|
305910
306598
|
if (!this._tracers.has(key2)) {
|
|
305911
|
-
this._tracers.set(key2, new Tracer_1.Tracer({ name, version: version2, schemaUrl: options?.schemaUrl }, this.
|
|
306599
|
+
this._tracers.set(key2, new Tracer_1.Tracer({ name, version: version2, schemaUrl: options?.schemaUrl }, this._tracerOptions));
|
|
305912
306600
|
}
|
|
305913
306601
|
return this._tracers.get(key2);
|
|
305914
306602
|
}
|
|
305915
306603
|
forceFlush() {
|
|
305916
|
-
const timeout = this.
|
|
306604
|
+
const timeout = this._forceFlushTimeoutMillis;
|
|
305917
306605
|
const promises = this._activeSpanProcessor["_spanProcessors"].map((spanProcessor) => {
|
|
305918
306606
|
return new Promise((resolve25) => {
|
|
305919
306607
|
let state;
|
|
@@ -305948,11 +306636,20 @@ var require_BasicTracerProvider = __commonJS((exports) => {
|
|
|
305948
306636
|
shutdown() {
|
|
305949
306637
|
return this._activeSpanProcessor.shutdown();
|
|
305950
306638
|
}
|
|
306639
|
+
[inspect_1.inspectCustom](depth, options, inspect3) {
|
|
306640
|
+
const processors = this._activeSpanProcessor["_spanProcessors"];
|
|
306641
|
+
const payload = {
|
|
306642
|
+
resource: { attributes: (0, inspect_1.settledResourceAttributes)(this._resource) },
|
|
306643
|
+
tracers: Array.from(this._tracers.keys()),
|
|
306644
|
+
spanProcessors: processors.map((p) => p.constructor?.name ?? "SpanProcessor")
|
|
306645
|
+
};
|
|
306646
|
+
return (0, inspect_1.formatInspect)("TracerProvider", payload, depth, options, inspect3);
|
|
306647
|
+
}
|
|
305951
306648
|
}
|
|
305952
|
-
exports.
|
|
306649
|
+
exports.TracerProvider = TracerProvider;
|
|
305953
306650
|
});
|
|
305954
306651
|
|
|
305955
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
306652
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/export/ConsoleSpanExporter.js
|
|
305956
306653
|
var require_ConsoleSpanExporter = __commonJS((exports) => {
|
|
305957
306654
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
305958
306655
|
exports.ConsoleSpanExporter = undefined;
|
|
@@ -306001,7 +306698,7 @@ var require_ConsoleSpanExporter = __commonJS((exports) => {
|
|
|
306001
306698
|
exports.ConsoleSpanExporter = ConsoleSpanExporter;
|
|
306002
306699
|
});
|
|
306003
306700
|
|
|
306004
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
306701
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/export/InMemorySpanExporter.js
|
|
306005
306702
|
var require_InMemorySpanExporter = __commonJS((exports) => {
|
|
306006
306703
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
306007
306704
|
exports.InMemorySpanExporter = undefined;
|
|
@@ -306037,21 +306734,26 @@ var require_InMemorySpanExporter = __commonJS((exports) => {
|
|
|
306037
306734
|
exports.InMemorySpanExporter = InMemorySpanExporter;
|
|
306038
306735
|
});
|
|
306039
306736
|
|
|
306040
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
306737
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/export/SimpleSpanProcessor.js
|
|
306041
306738
|
var require_SimpleSpanProcessor = __commonJS((exports) => {
|
|
306042
306739
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
306043
306740
|
exports.SimpleSpanProcessor = undefined;
|
|
306044
306741
|
var api_1 = require_src2();
|
|
306045
306742
|
var core_1 = require_src5();
|
|
306743
|
+
var SpanProcessorMetrics_1 = require_SpanProcessorMetrics();
|
|
306744
|
+
var semconv_1 = require_semconv5();
|
|
306046
306745
|
|
|
306047
306746
|
class SimpleSpanProcessor {
|
|
306048
306747
|
_exporter;
|
|
306748
|
+
_metrics;
|
|
306049
306749
|
_shutdownOnce;
|
|
306050
306750
|
_pendingExports;
|
|
306051
|
-
constructor(
|
|
306052
|
-
this._exporter = exporter;
|
|
306751
|
+
constructor(options) {
|
|
306752
|
+
this._exporter = options.exporter;
|
|
306053
306753
|
this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);
|
|
306054
306754
|
this._pendingExports = new Set;
|
|
306755
|
+
const meter = options.selfObsMeterProvider ? options.selfObsMeterProvider.getMeter("@opentelemetry/sdk-trace") : (0, api_1.createNoopMeter)();
|
|
306756
|
+
this._metrics = new SpanProcessorMetrics_1.SpanProcessorMetrics(semconv_1.OTEL_COMPONENT_TYPE_VALUE_SIMPLE_SPAN_PROCESSOR, meter);
|
|
306055
306757
|
}
|
|
306056
306758
|
async forceFlush() {
|
|
306057
306759
|
await Promise.all(Array.from(this._pendingExports));
|
|
@@ -306076,6 +306778,7 @@ var require_SimpleSpanProcessor = __commonJS((exports) => {
|
|
|
306076
306778
|
await span.resource.waitForAsyncAttributes?.();
|
|
306077
306779
|
}
|
|
306078
306780
|
const result = await core_1.internal._export(this._exporter, [span]);
|
|
306781
|
+
this._metrics.finishSpans(1, result.error);
|
|
306079
306782
|
if (result.code !== core_1.ExportResultCode.SUCCESS) {
|
|
306080
306783
|
throw result.error ?? new Error(`SimpleSpanProcessor: span export failed (status ${result})`);
|
|
306081
306784
|
}
|
|
@@ -306084,13 +306787,14 @@ var require_SimpleSpanProcessor = __commonJS((exports) => {
|
|
|
306084
306787
|
return this._shutdownOnce.call();
|
|
306085
306788
|
}
|
|
306086
306789
|
_shutdown() {
|
|
306790
|
+
this._metrics.shutdown();
|
|
306087
306791
|
return this._exporter.shutdown();
|
|
306088
306792
|
}
|
|
306089
306793
|
}
|
|
306090
306794
|
exports.SimpleSpanProcessor = SimpleSpanProcessor;
|
|
306091
306795
|
});
|
|
306092
306796
|
|
|
306093
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
306797
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/export/NoopSpanProcessor.js
|
|
306094
306798
|
var require_NoopSpanProcessor = __commonJS((exports) => {
|
|
306095
306799
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
306096
306800
|
exports.NoopSpanProcessor = undefined;
|
|
@@ -306108,13 +306812,86 @@ var require_NoopSpanProcessor = __commonJS((exports) => {
|
|
|
306108
306812
|
exports.NoopSpanProcessor = NoopSpanProcessor;
|
|
306109
306813
|
});
|
|
306110
306814
|
|
|
306111
|
-
// node_modules/@opentelemetry/sdk-trace
|
|
306815
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/sampler/AlwaysRecordSampler.js
|
|
306816
|
+
var require_AlwaysRecordSampler = __commonJS((exports) => {
|
|
306817
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
306818
|
+
exports.createAlwaysRecordSampler = undefined;
|
|
306819
|
+
var Sampler_1 = require_Sampler();
|
|
306820
|
+
function createAlwaysRecordSampler(delegate) {
|
|
306821
|
+
if (!delegate) {
|
|
306822
|
+
throw new Error("createAlwaysRecordSampler requires a delegate sampler");
|
|
306823
|
+
}
|
|
306824
|
+
return {
|
|
306825
|
+
shouldSample(context, traceId, spanName, spanKind, attributes, links) {
|
|
306826
|
+
const result = delegate.shouldSample(context, traceId, spanName, spanKind, attributes, links);
|
|
306827
|
+
if (result.decision === Sampler_1.SamplingDecision.NOT_RECORD) {
|
|
306828
|
+
return {
|
|
306829
|
+
decision: Sampler_1.SamplingDecision.RECORD,
|
|
306830
|
+
attributes: result.attributes,
|
|
306831
|
+
traceState: result.traceState
|
|
306832
|
+
};
|
|
306833
|
+
}
|
|
306834
|
+
return result;
|
|
306835
|
+
},
|
|
306836
|
+
toString() {
|
|
306837
|
+
return `AlwaysRecordSampler{${delegate.toString()}}`;
|
|
306838
|
+
}
|
|
306839
|
+
};
|
|
306840
|
+
}
|
|
306841
|
+
exports.createAlwaysRecordSampler = createAlwaysRecordSampler;
|
|
306842
|
+
});
|
|
306843
|
+
|
|
306844
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/sampler/TraceIdRatioBasedSampler.js
|
|
306845
|
+
var require_TraceIdRatioBasedSampler = __commonJS((exports) => {
|
|
306846
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
306847
|
+
exports.TraceIdRatioBasedSampler = undefined;
|
|
306848
|
+
var api_1 = require_src2();
|
|
306849
|
+
var Sampler_1 = require_Sampler();
|
|
306850
|
+
|
|
306851
|
+
class TraceIdRatioBasedSampler {
|
|
306852
|
+
_ratio;
|
|
306853
|
+
_upperBound;
|
|
306854
|
+
constructor(ratio = 0) {
|
|
306855
|
+
this._ratio = this._normalize(ratio);
|
|
306856
|
+
this._upperBound = Math.floor(this._ratio * 4294967295);
|
|
306857
|
+
}
|
|
306858
|
+
shouldSample(context, traceId) {
|
|
306859
|
+
return {
|
|
306860
|
+
decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound ? Sampler_1.SamplingDecision.RECORD_AND_SAMPLED : Sampler_1.SamplingDecision.NOT_RECORD
|
|
306861
|
+
};
|
|
306862
|
+
}
|
|
306863
|
+
toString() {
|
|
306864
|
+
return `TraceIdRatioBased{${this._ratio}}`;
|
|
306865
|
+
}
|
|
306866
|
+
_normalize(ratio) {
|
|
306867
|
+
if (typeof ratio !== "number" || isNaN(ratio))
|
|
306868
|
+
return 0;
|
|
306869
|
+
return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;
|
|
306870
|
+
}
|
|
306871
|
+
_accumulate(traceId) {
|
|
306872
|
+
let accumulation = 0;
|
|
306873
|
+
for (let i3 = 0;i3 < 32; i3 += 8) {
|
|
306874
|
+
let part = 0;
|
|
306875
|
+
for (let j2 = 0;j2 < 8; j2++) {
|
|
306876
|
+
const c6 = traceId.charCodeAt(i3 + j2);
|
|
306877
|
+
const v2 = c6 < 58 ? c6 - 48 : c6 < 71 ? c6 - 55 : c6 - 87;
|
|
306878
|
+
part = part << 4 | v2;
|
|
306879
|
+
}
|
|
306880
|
+
accumulation = (accumulation ^ part) >>> 0;
|
|
306881
|
+
}
|
|
306882
|
+
return accumulation;
|
|
306883
|
+
}
|
|
306884
|
+
}
|
|
306885
|
+
exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler;
|
|
306886
|
+
});
|
|
306887
|
+
|
|
306888
|
+
// node_modules/@opentelemetry/sdk-trace/build/src/index.js
|
|
306112
306889
|
var require_src9 = __commonJS((exports) => {
|
|
306113
306890
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
306114
|
-
exports.SamplingDecision = exports.TraceIdRatioBasedSampler = exports.ParentBasedSampler = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.NoopSpanProcessor = exports.SimpleSpanProcessor = exports.InMemorySpanExporter = exports.ConsoleSpanExporter = exports.RandomIdGenerator = exports.BatchSpanProcessor = exports.
|
|
306115
|
-
var
|
|
306116
|
-
Object.defineProperty(exports, "
|
|
306117
|
-
return
|
|
306891
|
+
exports.SamplingDecision = exports.TraceIdRatioBasedSampler = exports.ParentBasedSampler = exports.createAlwaysRecordSampler = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.NoopSpanProcessor = exports.SimpleSpanProcessor = exports.InMemorySpanExporter = exports.ConsoleSpanExporter = exports.RandomIdGenerator = exports.BatchSpanProcessor = exports.TracerProvider = undefined;
|
|
306892
|
+
var TracerProvider_1 = require_TracerProvider();
|
|
306893
|
+
Object.defineProperty(exports, "TracerProvider", { enumerable: true, get: function() {
|
|
306894
|
+
return TracerProvider_1.TracerProvider;
|
|
306118
306895
|
} });
|
|
306119
306896
|
var platform_1 = require_platform4();
|
|
306120
306897
|
Object.defineProperty(exports, "BatchSpanProcessor", { enumerable: true, get: function() {
|
|
@@ -306147,6 +306924,10 @@ var require_src9 = __commonJS((exports) => {
|
|
|
306147
306924
|
Object.defineProperty(exports, "AlwaysOnSampler", { enumerable: true, get: function() {
|
|
306148
306925
|
return AlwaysOnSampler_1.AlwaysOnSampler;
|
|
306149
306926
|
} });
|
|
306927
|
+
var AlwaysRecordSampler_1 = require_AlwaysRecordSampler();
|
|
306928
|
+
Object.defineProperty(exports, "createAlwaysRecordSampler", { enumerable: true, get: function() {
|
|
306929
|
+
return AlwaysRecordSampler_1.createAlwaysRecordSampler;
|
|
306930
|
+
} });
|
|
306150
306931
|
var ParentBasedSampler_1 = require_ParentBasedSampler();
|
|
306151
306932
|
Object.defineProperty(exports, "ParentBasedSampler", { enumerable: true, get: function() {
|
|
306152
306933
|
return ParentBasedSampler_1.ParentBasedSampler;
|
|
@@ -306161,6 +306942,212 @@ var require_src9 = __commonJS((exports) => {
|
|
|
306161
306942
|
} });
|
|
306162
306943
|
});
|
|
306163
306944
|
|
|
306945
|
+
// node_modules/@opentelemetry/sdk-trace-base/build/src/config.js
|
|
306946
|
+
var require_config = __commonJS((exports) => {
|
|
306947
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
306948
|
+
exports.buildSamplerFromEnv = exports.loadDefaultConfig = undefined;
|
|
306949
|
+
var api_1 = require_src2();
|
|
306950
|
+
var core_1 = require_src5();
|
|
306951
|
+
var sdk_trace_1 = require_src9();
|
|
306952
|
+
var TracesSamplerValues;
|
|
306953
|
+
(function(TracesSamplerValues2) {
|
|
306954
|
+
TracesSamplerValues2["AlwaysOff"] = "always_off";
|
|
306955
|
+
TracesSamplerValues2["AlwaysOn"] = "always_on";
|
|
306956
|
+
TracesSamplerValues2["ParentBasedAlwaysOff"] = "parentbased_always_off";
|
|
306957
|
+
TracesSamplerValues2["ParentBasedAlwaysOn"] = "parentbased_always_on";
|
|
306958
|
+
TracesSamplerValues2["ParentBasedTraceIdRatio"] = "parentbased_traceidratio";
|
|
306959
|
+
TracesSamplerValues2["TraceIdRatio"] = "traceidratio";
|
|
306960
|
+
})(TracesSamplerValues || (TracesSamplerValues = {}));
|
|
306961
|
+
var DEFAULT_RATIO = 1;
|
|
306962
|
+
function loadDefaultConfig() {
|
|
306963
|
+
return {
|
|
306964
|
+
sampler: buildSamplerFromEnv(),
|
|
306965
|
+
forceFlushTimeoutMillis: 30000,
|
|
306966
|
+
generalLimits: {
|
|
306967
|
+
attributeValueLengthLimit: (0, core_1.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT") ?? Infinity,
|
|
306968
|
+
attributeCountLimit: (0, core_1.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT") ?? 128
|
|
306969
|
+
},
|
|
306970
|
+
spanLimits: {
|
|
306971
|
+
attributeValueLengthLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT") ?? Infinity,
|
|
306972
|
+
attributeCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT") ?? 128,
|
|
306973
|
+
linkCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_LINK_COUNT_LIMIT") ?? 128,
|
|
306974
|
+
eventCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_EVENT_COUNT_LIMIT") ?? 128,
|
|
306975
|
+
attributePerEventCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT") ?? 128,
|
|
306976
|
+
attributePerLinkCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT") ?? 128
|
|
306977
|
+
}
|
|
306978
|
+
};
|
|
306979
|
+
}
|
|
306980
|
+
exports.loadDefaultConfig = loadDefaultConfig;
|
|
306981
|
+
function buildSamplerFromEnv() {
|
|
306982
|
+
const sampler = (0, core_1.getStringFromEnv)("OTEL_TRACES_SAMPLER") ?? TracesSamplerValues.ParentBasedAlwaysOn;
|
|
306983
|
+
switch (sampler) {
|
|
306984
|
+
case TracesSamplerValues.AlwaysOn:
|
|
306985
|
+
return new sdk_trace_1.AlwaysOnSampler;
|
|
306986
|
+
case TracesSamplerValues.AlwaysOff:
|
|
306987
|
+
return new sdk_trace_1.AlwaysOffSampler;
|
|
306988
|
+
case TracesSamplerValues.ParentBasedAlwaysOn:
|
|
306989
|
+
return new sdk_trace_1.ParentBasedSampler({
|
|
306990
|
+
root: new sdk_trace_1.AlwaysOnSampler
|
|
306991
|
+
});
|
|
306992
|
+
case TracesSamplerValues.ParentBasedAlwaysOff:
|
|
306993
|
+
return new sdk_trace_1.ParentBasedSampler({
|
|
306994
|
+
root: new sdk_trace_1.AlwaysOffSampler
|
|
306995
|
+
});
|
|
306996
|
+
case TracesSamplerValues.TraceIdRatio:
|
|
306997
|
+
return new sdk_trace_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv());
|
|
306998
|
+
case TracesSamplerValues.ParentBasedTraceIdRatio:
|
|
306999
|
+
return new sdk_trace_1.ParentBasedSampler({
|
|
307000
|
+
root: new sdk_trace_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv())
|
|
307001
|
+
});
|
|
307002
|
+
default:
|
|
307003
|
+
api_1.diag.error(`OTEL_TRACES_SAMPLER value "${sampler}" invalid, defaulting to "${TracesSamplerValues.ParentBasedAlwaysOn}".`);
|
|
307004
|
+
return new sdk_trace_1.ParentBasedSampler({
|
|
307005
|
+
root: new sdk_trace_1.AlwaysOnSampler
|
|
307006
|
+
});
|
|
307007
|
+
}
|
|
307008
|
+
}
|
|
307009
|
+
exports.buildSamplerFromEnv = buildSamplerFromEnv;
|
|
307010
|
+
function getSamplerProbabilityFromEnv() {
|
|
307011
|
+
const probability = (0, core_1.getNumberFromEnv)("OTEL_TRACES_SAMPLER_ARG");
|
|
307012
|
+
if (probability == null) {
|
|
307013
|
+
api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${DEFAULT_RATIO}.`);
|
|
307014
|
+
return DEFAULT_RATIO;
|
|
307015
|
+
}
|
|
307016
|
+
if (probability < 0 || probability > 1) {
|
|
307017
|
+
api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG=${probability} was given, but it is out of range ([0..1]), defaulting to ${DEFAULT_RATIO}.`);
|
|
307018
|
+
return DEFAULT_RATIO;
|
|
307019
|
+
}
|
|
307020
|
+
return probability;
|
|
307021
|
+
}
|
|
307022
|
+
});
|
|
307023
|
+
|
|
307024
|
+
// node_modules/@opentelemetry/sdk-trace-base/build/src/utility.js
|
|
307025
|
+
var require_utility = __commonJS((exports) => {
|
|
307026
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
307027
|
+
exports.reconfigureLimits = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = undefined;
|
|
307028
|
+
var core_1 = require_src5();
|
|
307029
|
+
exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;
|
|
307030
|
+
exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;
|
|
307031
|
+
function reconfigureLimits(userConfig) {
|
|
307032
|
+
const spanLimits = Object.assign({}, userConfig.spanLimits);
|
|
307033
|
+
spanLimits.attributeCountLimit = userConfig.spanLimits?.attributeCountLimit ?? userConfig.generalLimits?.attributeCountLimit ?? (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT") ?? (0, core_1.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT") ?? exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT;
|
|
307034
|
+
spanLimits.attributeValueLengthLimit = userConfig.spanLimits?.attributeValueLengthLimit ?? userConfig.generalLimits?.attributeValueLengthLimit ?? (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT") ?? (0, core_1.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT") ?? exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT;
|
|
307035
|
+
return Object.assign({}, userConfig, { spanLimits });
|
|
307036
|
+
}
|
|
307037
|
+
exports.reconfigureLimits = reconfigureLimits;
|
|
307038
|
+
});
|
|
307039
|
+
|
|
307040
|
+
// node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider-shim.js
|
|
307041
|
+
var require_BasicTracerProvider_shim = __commonJS((exports) => {
|
|
307042
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
307043
|
+
exports.BasicTracerProvider = undefined;
|
|
307044
|
+
var core_1 = require_src5();
|
|
307045
|
+
var config_1 = require_config();
|
|
307046
|
+
var utility_1 = require_utility();
|
|
307047
|
+
var sdk_trace_1 = require_src9();
|
|
307048
|
+
|
|
307049
|
+
class BasicTracerProvider extends sdk_trace_1.TracerProvider {
|
|
307050
|
+
constructor(config4 = {}) {
|
|
307051
|
+
const mergedConfig = (0, core_1.merge)({}, (0, config_1.loadDefaultConfig)(), (0, utility_1.reconfigureLimits)(config4));
|
|
307052
|
+
delete mergedConfig.generalLimits;
|
|
307053
|
+
super(mergedConfig);
|
|
307054
|
+
}
|
|
307055
|
+
}
|
|
307056
|
+
exports.BasicTracerProvider = BasicTracerProvider;
|
|
307057
|
+
});
|
|
307058
|
+
|
|
307059
|
+
// node_modules/@opentelemetry/sdk-trace-base/build/src/BatchSpanProcessor-shim.js
|
|
307060
|
+
var require_BatchSpanProcessor_shim = __commonJS((exports) => {
|
|
307061
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
307062
|
+
exports.BatchSpanProcessor = undefined;
|
|
307063
|
+
var core_1 = require_src5();
|
|
307064
|
+
var sdk_trace_1 = require_src9();
|
|
307065
|
+
|
|
307066
|
+
class BatchSpanProcessor extends sdk_trace_1.BatchSpanProcessor {
|
|
307067
|
+
constructor(exporter, config4) {
|
|
307068
|
+
if (!config4) {
|
|
307069
|
+
config4 = {};
|
|
307070
|
+
}
|
|
307071
|
+
const envFallbacks = [
|
|
307072
|
+
["maxExportBatchSize", "OTEL_BSP_MAX_EXPORT_BATCH_SIZE"],
|
|
307073
|
+
["maxQueueSize", "OTEL_BSP_MAX_QUEUE_SIZE"],
|
|
307074
|
+
["scheduledDelayMillis", "OTEL_BSP_SCHEDULE_DELAY"],
|
|
307075
|
+
["exportTimeoutMillis", "OTEL_BSP_EXPORT_TIMEOUT"]
|
|
307076
|
+
];
|
|
307077
|
+
for (const [configName, envName] of envFallbacks) {
|
|
307078
|
+
if (config4[configName] === undefined) {
|
|
307079
|
+
const envFallback = (0, core_1.getNumberFromEnv)(envName);
|
|
307080
|
+
if (envFallback !== undefined) {
|
|
307081
|
+
config4[configName] = envFallback;
|
|
307082
|
+
}
|
|
307083
|
+
}
|
|
307084
|
+
}
|
|
307085
|
+
super({ exporter, ...config4 });
|
|
307086
|
+
}
|
|
307087
|
+
}
|
|
307088
|
+
exports.BatchSpanProcessor = BatchSpanProcessor;
|
|
307089
|
+
});
|
|
307090
|
+
|
|
307091
|
+
// node_modules/@opentelemetry/sdk-trace-base/build/src/SimpleSpanProcessor-shim.js
|
|
307092
|
+
var require_SimpleSpanProcessor_shim = __commonJS((exports) => {
|
|
307093
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
307094
|
+
exports.SimpleSpanProcessor = undefined;
|
|
307095
|
+
var sdk_trace_1 = require_src9();
|
|
307096
|
+
|
|
307097
|
+
class SimpleSpanProcessor extends sdk_trace_1.SimpleSpanProcessor {
|
|
307098
|
+
constructor(exporter) {
|
|
307099
|
+
super({ exporter });
|
|
307100
|
+
}
|
|
307101
|
+
}
|
|
307102
|
+
exports.SimpleSpanProcessor = SimpleSpanProcessor;
|
|
307103
|
+
});
|
|
307104
|
+
|
|
307105
|
+
// node_modules/@opentelemetry/sdk-trace-base/build/src/index-shim.js
|
|
307106
|
+
var require_index_shim = __commonJS((exports) => {
|
|
307107
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
307108
|
+
exports.SamplingDecision = exports.TraceIdRatioBasedSampler = exports.ParentBasedSampler = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.NoopSpanProcessor = exports.InMemorySpanExporter = exports.RandomIdGenerator = exports.ConsoleSpanExporter = exports.SimpleSpanProcessor = exports.BatchSpanProcessor = exports.BasicTracerProvider = undefined;
|
|
307109
|
+
var BasicTracerProvider_shim_1 = require_BasicTracerProvider_shim();
|
|
307110
|
+
Object.defineProperty(exports, "BasicTracerProvider", { enumerable: true, get: function() {
|
|
307111
|
+
return BasicTracerProvider_shim_1.BasicTracerProvider;
|
|
307112
|
+
} });
|
|
307113
|
+
var BatchSpanProcessor_shim_1 = require_BatchSpanProcessor_shim();
|
|
307114
|
+
Object.defineProperty(exports, "BatchSpanProcessor", { enumerable: true, get: function() {
|
|
307115
|
+
return BatchSpanProcessor_shim_1.BatchSpanProcessor;
|
|
307116
|
+
} });
|
|
307117
|
+
var SimpleSpanProcessor_shim_1 = require_SimpleSpanProcessor_shim();
|
|
307118
|
+
Object.defineProperty(exports, "SimpleSpanProcessor", { enumerable: true, get: function() {
|
|
307119
|
+
return SimpleSpanProcessor_shim_1.SimpleSpanProcessor;
|
|
307120
|
+
} });
|
|
307121
|
+
var sdk_trace_1 = require_src9();
|
|
307122
|
+
Object.defineProperty(exports, "ConsoleSpanExporter", { enumerable: true, get: function() {
|
|
307123
|
+
return sdk_trace_1.ConsoleSpanExporter;
|
|
307124
|
+
} });
|
|
307125
|
+
Object.defineProperty(exports, "RandomIdGenerator", { enumerable: true, get: function() {
|
|
307126
|
+
return sdk_trace_1.RandomIdGenerator;
|
|
307127
|
+
} });
|
|
307128
|
+
Object.defineProperty(exports, "InMemorySpanExporter", { enumerable: true, get: function() {
|
|
307129
|
+
return sdk_trace_1.InMemorySpanExporter;
|
|
307130
|
+
} });
|
|
307131
|
+
Object.defineProperty(exports, "NoopSpanProcessor", { enumerable: true, get: function() {
|
|
307132
|
+
return sdk_trace_1.NoopSpanProcessor;
|
|
307133
|
+
} });
|
|
307134
|
+
Object.defineProperty(exports, "AlwaysOffSampler", { enumerable: true, get: function() {
|
|
307135
|
+
return sdk_trace_1.AlwaysOffSampler;
|
|
307136
|
+
} });
|
|
307137
|
+
Object.defineProperty(exports, "AlwaysOnSampler", { enumerable: true, get: function() {
|
|
307138
|
+
return sdk_trace_1.AlwaysOnSampler;
|
|
307139
|
+
} });
|
|
307140
|
+
Object.defineProperty(exports, "ParentBasedSampler", { enumerable: true, get: function() {
|
|
307141
|
+
return sdk_trace_1.ParentBasedSampler;
|
|
307142
|
+
} });
|
|
307143
|
+
Object.defineProperty(exports, "TraceIdRatioBasedSampler", { enumerable: true, get: function() {
|
|
307144
|
+
return sdk_trace_1.TraceIdRatioBasedSampler;
|
|
307145
|
+
} });
|
|
307146
|
+
Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
|
|
307147
|
+
return sdk_trace_1.SamplingDecision;
|
|
307148
|
+
} });
|
|
307149
|
+
});
|
|
307150
|
+
|
|
306164
307151
|
// src/utils/telemetry/betaSessionTracing.ts
|
|
306165
307152
|
import { createHash as createHash9 } from "crypto";
|
|
306166
307153
|
function clearBetaTracingState() {
|
|
@@ -307706,7 +308693,7 @@ var init_instrumentation = __esm(() => {
|
|
|
307706
308693
|
import_resources = __toESM(require_src6(), 1);
|
|
307707
308694
|
import_sdk_logs = __toESM(require_src7(), 1);
|
|
307708
308695
|
import_sdk_metrics2 = __toESM(require_src8(), 1);
|
|
307709
|
-
import_sdk_trace_base = __toESM(
|
|
308696
|
+
import_sdk_trace_base = __toESM(require_index_shim(), 1);
|
|
307710
308697
|
import_semantic_conventions = __toESM(require_src4(), 1);
|
|
307711
308698
|
TelemetryTimeoutError = class TelemetryTimeoutError extends Error {
|
|
307712
308699
|
};
|
|
@@ -357715,7 +358702,7 @@ var init_color_diff = __esm(() => {
|
|
|
357715
358702
|
};
|
|
357716
358703
|
});
|
|
357717
358704
|
|
|
357718
|
-
//
|
|
358705
|
+
// shims/color-diff-napi/index.ts
|
|
357719
358706
|
var init_color_diff_napi = __esm(() => {
|
|
357720
358707
|
init_color_diff();
|
|
357721
358708
|
});
|
|
@@ -403563,7 +404550,7 @@ function prewarm() {
|
|
|
403563
404550
|
var cachedModule = null;
|
|
403564
404551
|
var init_modifiers_napi_src = () => {};
|
|
403565
404552
|
|
|
403566
|
-
//
|
|
404553
|
+
// shims/modifiers-napi/index.ts
|
|
403567
404554
|
var exports_modifiers_napi = {};
|
|
403568
404555
|
__export(exports_modifiers_napi, {
|
|
403569
404556
|
prewarm: () => prewarm,
|
|
@@ -442265,7 +443252,7 @@ var require_mode2 = __commonJS((exports) => {
|
|
|
442265
443252
|
});
|
|
442266
443253
|
|
|
442267
443254
|
// node_modules/qrcode/lib/core/version.js
|
|
442268
|
-
var
|
|
443255
|
+
var require_version6 = __commonJS((exports) => {
|
|
442269
443256
|
var Utils = require_utils14();
|
|
442270
443257
|
var ECCode = require_error_correction_code();
|
|
442271
443258
|
var ECLevel = require_error_correction_level();
|
|
@@ -442829,7 +443816,7 @@ var require_qrcode = __commonJS((exports) => {
|
|
|
442829
443816
|
var MaskPattern = require_mask_pattern();
|
|
442830
443817
|
var ECCode = require_error_correction_code();
|
|
442831
443818
|
var ReedSolomonEncoder = require_reed_solomon_encoder();
|
|
442832
|
-
var Version =
|
|
443819
|
+
var Version = require_version6();
|
|
442833
443820
|
var FormatInfo = require_format_info();
|
|
442834
443821
|
var Mode = require_mode2();
|
|
442835
443822
|
var Segments = require_segments();
|
|
@@ -478216,7 +479203,7 @@ async function isChromeExtensionInstalled() {
|
|
|
478216
479203
|
}
|
|
478217
479204
|
var CHROME_EXTENSION_RECONNECT_URL = "https://clau.de/chrome/reconnect", NATIVE_HOST_IDENTIFIER = "com.anthropic.claude_code_browser_extension", NATIVE_HOST_MANIFEST_NAME, shouldAutoEnable = undefined;
|
|
478218
479205
|
var init_setup2 = __esm(() => {
|
|
478219
|
-
|
|
479206
|
+
init_ant_claude_for_chrome_mcp();
|
|
478220
479207
|
init_state();
|
|
478221
479208
|
init_growthbook();
|
|
478222
479209
|
init_config();
|
|
@@ -500273,7 +501260,7 @@ class DebugLogger {
|
|
|
500273
501260
|
}
|
|
500274
501261
|
var EXTENSION_DOWNLOAD_URL = "https://claude.ai/chrome", BUG_REPORT_URL = "https://github.com/anthropics/claude-code/issues/new?labels=bug,claude-in-chrome", SAFE_BRIDGE_STRING_KEYS, PERMISSION_MODES4;
|
|
500275
501262
|
var init_mcpServer = __esm(() => {
|
|
500276
|
-
|
|
501263
|
+
init_ant_claude_for_chrome_mcp();
|
|
500277
501264
|
init_stdio2();
|
|
500278
501265
|
init_datadog();
|
|
500279
501266
|
init_firstPartyEventLogger();
|
|
@@ -500715,7 +501702,7 @@ var require_argument = __commonJS((exports) => {
|
|
|
500715
501702
|
this._name = name;
|
|
500716
501703
|
break;
|
|
500717
501704
|
}
|
|
500718
|
-
if (this._name.
|
|
501705
|
+
if (this._name.endsWith("...")) {
|
|
500719
501706
|
this.variadic = true;
|
|
500720
501707
|
this._name = this._name.slice(0, -3);
|
|
500721
501708
|
}
|
|
@@ -500723,11 +501710,12 @@ var require_argument = __commonJS((exports) => {
|
|
|
500723
501710
|
name() {
|
|
500724
501711
|
return this._name;
|
|
500725
501712
|
}
|
|
500726
|
-
|
|
501713
|
+
_collectValue(value, previous) {
|
|
500727
501714
|
if (previous === this.defaultValue || !Array.isArray(previous)) {
|
|
500728
501715
|
return [value];
|
|
500729
501716
|
}
|
|
500730
|
-
|
|
501717
|
+
previous.push(value);
|
|
501718
|
+
return previous;
|
|
500731
501719
|
}
|
|
500732
501720
|
default(value, description) {
|
|
500733
501721
|
this.defaultValue = value;
|
|
@@ -500745,7 +501733,7 @@ var require_argument = __commonJS((exports) => {
|
|
|
500745
501733
|
throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
|
|
500746
501734
|
}
|
|
500747
501735
|
if (this.variadic) {
|
|
500748
|
-
return this.
|
|
501736
|
+
return this._collectValue(arg, previous);
|
|
500749
501737
|
}
|
|
500750
501738
|
return arg;
|
|
500751
501739
|
};
|
|
@@ -500910,7 +501898,11 @@ var require_help = __commonJS((exports) => {
|
|
|
500910
501898
|
extraInfo.push(`env: ${option.envVar}`);
|
|
500911
501899
|
}
|
|
500912
501900
|
if (extraInfo.length > 0) {
|
|
500913
|
-
|
|
501901
|
+
const extraDescription = `(${extraInfo.join(", ")})`;
|
|
501902
|
+
if (option.description) {
|
|
501903
|
+
return `${option.description} ${extraDescription}`;
|
|
501904
|
+
}
|
|
501905
|
+
return extraDescription;
|
|
500914
501906
|
}
|
|
500915
501907
|
return option.description;
|
|
500916
501908
|
}
|
|
@@ -500931,6 +501923,27 @@ var require_help = __commonJS((exports) => {
|
|
|
500931
501923
|
}
|
|
500932
501924
|
return argument.description;
|
|
500933
501925
|
}
|
|
501926
|
+
formatItemList(heading, items, helper) {
|
|
501927
|
+
if (items.length === 0)
|
|
501928
|
+
return [];
|
|
501929
|
+
return [helper.styleTitle(heading), ...items, ""];
|
|
501930
|
+
}
|
|
501931
|
+
groupItems(unsortedItems, visibleItems, getGroup) {
|
|
501932
|
+
const result = new Map;
|
|
501933
|
+
unsortedItems.forEach((item) => {
|
|
501934
|
+
const group = getGroup(item);
|
|
501935
|
+
if (!result.has(group))
|
|
501936
|
+
result.set(group, []);
|
|
501937
|
+
});
|
|
501938
|
+
visibleItems.forEach((item) => {
|
|
501939
|
+
const group = getGroup(item);
|
|
501940
|
+
if (!result.has(group)) {
|
|
501941
|
+
result.set(group, []);
|
|
501942
|
+
}
|
|
501943
|
+
result.get(group).push(item);
|
|
501944
|
+
});
|
|
501945
|
+
return result;
|
|
501946
|
+
}
|
|
500934
501947
|
formatHelp(cmd, helper) {
|
|
500935
501948
|
const termWidth = helper.padWidth(cmd, helper);
|
|
500936
501949
|
const helpWidth = helper.helpWidth ?? 80;
|
|
@@ -500951,45 +501964,27 @@ var require_help = __commonJS((exports) => {
|
|
|
500951
501964
|
const argumentList = helper.visibleArguments(cmd).map((argument) => {
|
|
500952
501965
|
return callFormatItem(helper.styleArgumentTerm(helper.argumentTerm(argument)), helper.styleArgumentDescription(helper.argumentDescription(argument)));
|
|
500953
501966
|
});
|
|
500954
|
-
|
|
500955
|
-
|
|
500956
|
-
|
|
500957
|
-
|
|
500958
|
-
|
|
500959
|
-
|
|
500960
|
-
|
|
500961
|
-
const optionList = helper.visibleOptions(cmd).map((option) => {
|
|
500962
|
-
return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
|
|
501967
|
+
output = output.concat(this.formatItemList("Arguments:", argumentList, helper));
|
|
501968
|
+
const optionGroups = this.groupItems(cmd.options, helper.visibleOptions(cmd), (option) => option.helpGroupHeading ?? "Options:");
|
|
501969
|
+
optionGroups.forEach((options, group) => {
|
|
501970
|
+
const optionList = options.map((option) => {
|
|
501971
|
+
return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
|
|
501972
|
+
});
|
|
501973
|
+
output = output.concat(this.formatItemList(group, optionList, helper));
|
|
500963
501974
|
});
|
|
500964
|
-
if (optionList.length > 0) {
|
|
500965
|
-
output = output.concat([
|
|
500966
|
-
helper.styleTitle("Options:"),
|
|
500967
|
-
...optionList,
|
|
500968
|
-
""
|
|
500969
|
-
]);
|
|
500970
|
-
}
|
|
500971
501975
|
if (helper.showGlobalOptions) {
|
|
500972
501976
|
const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
|
|
500973
501977
|
return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
|
|
500974
501978
|
});
|
|
500975
|
-
|
|
500976
|
-
output = output.concat([
|
|
500977
|
-
helper.styleTitle("Global Options:"),
|
|
500978
|
-
...globalOptionList,
|
|
500979
|
-
""
|
|
500980
|
-
]);
|
|
500981
|
-
}
|
|
501979
|
+
output = output.concat(this.formatItemList("Global Options:", globalOptionList, helper));
|
|
500982
501980
|
}
|
|
500983
|
-
const
|
|
500984
|
-
|
|
501981
|
+
const commandGroups = this.groupItems(cmd.commands, helper.visibleCommands(cmd), (sub) => sub.helpGroup() || "Commands:");
|
|
501982
|
+
commandGroups.forEach((commands, group) => {
|
|
501983
|
+
const commandList = commands.map((sub) => {
|
|
501984
|
+
return callFormatItem(helper.styleSubcommandTerm(helper.subcommandTerm(sub)), helper.styleSubcommandDescription(helper.subcommandDescription(sub)));
|
|
501985
|
+
});
|
|
501986
|
+
output = output.concat(this.formatItemList(group, commandList, helper));
|
|
500985
501987
|
});
|
|
500986
|
-
if (commandList.length > 0) {
|
|
500987
|
-
output = output.concat([
|
|
500988
|
-
helper.styleTitle("Commands:"),
|
|
500989
|
-
...commandList,
|
|
500990
|
-
""
|
|
500991
|
-
]);
|
|
500992
|
-
}
|
|
500993
501988
|
return output.join(`
|
|
500994
501989
|
`);
|
|
500995
501990
|
}
|
|
@@ -501146,6 +502141,7 @@ var require_option = __commonJS((exports) => {
|
|
|
501146
502141
|
this.argChoices = undefined;
|
|
501147
502142
|
this.conflictsWith = [];
|
|
501148
502143
|
this.implied = undefined;
|
|
502144
|
+
this.helpGroupHeading = undefined;
|
|
501149
502145
|
}
|
|
501150
502146
|
default(value, description) {
|
|
501151
502147
|
this.defaultValue = value;
|
|
@@ -501184,11 +502180,12 @@ var require_option = __commonJS((exports) => {
|
|
|
501184
502180
|
this.hidden = !!hide;
|
|
501185
502181
|
return this;
|
|
501186
502182
|
}
|
|
501187
|
-
|
|
502183
|
+
_collectValue(value, previous) {
|
|
501188
502184
|
if (previous === this.defaultValue || !Array.isArray(previous)) {
|
|
501189
502185
|
return [value];
|
|
501190
502186
|
}
|
|
501191
|
-
|
|
502187
|
+
previous.push(value);
|
|
502188
|
+
return previous;
|
|
501192
502189
|
}
|
|
501193
502190
|
choices(values2) {
|
|
501194
502191
|
this.argChoices = values2.slice();
|
|
@@ -501197,7 +502194,7 @@ var require_option = __commonJS((exports) => {
|
|
|
501197
502194
|
throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
|
|
501198
502195
|
}
|
|
501199
502196
|
if (this.variadic) {
|
|
501200
|
-
return this.
|
|
502197
|
+
return this._collectValue(arg, previous);
|
|
501201
502198
|
}
|
|
501202
502199
|
return arg;
|
|
501203
502200
|
};
|
|
@@ -501215,6 +502212,10 @@ var require_option = __commonJS((exports) => {
|
|
|
501215
502212
|
}
|
|
501216
502213
|
return camelcase(this.name());
|
|
501217
502214
|
}
|
|
502215
|
+
helpGroup(heading) {
|
|
502216
|
+
this.helpGroupHeading = heading;
|
|
502217
|
+
return this;
|
|
502218
|
+
}
|
|
501218
502219
|
is(arg) {
|
|
501219
502220
|
return this.short === arg || this.long === arg;
|
|
501220
502221
|
}
|
|
@@ -501432,6 +502433,9 @@ var require_command = __commonJS((exports) => {
|
|
|
501432
502433
|
this._addImplicitHelpCommand = undefined;
|
|
501433
502434
|
this._helpCommand = undefined;
|
|
501434
502435
|
this._helpConfiguration = {};
|
|
502436
|
+
this._helpGroupHeading = undefined;
|
|
502437
|
+
this._defaultCommandGroup = undefined;
|
|
502438
|
+
this._defaultOptionGroup = undefined;
|
|
501435
502439
|
}
|
|
501436
502440
|
copyInheritedSettings(sourceCommand) {
|
|
501437
502441
|
this._outputConfiguration = sourceCommand._outputConfiguration;
|
|
@@ -501496,7 +502500,10 @@ var require_command = __commonJS((exports) => {
|
|
|
501496
502500
|
configureOutput(configuration) {
|
|
501497
502501
|
if (configuration === undefined)
|
|
501498
502502
|
return this._outputConfiguration;
|
|
501499
|
-
|
|
502503
|
+
this._outputConfiguration = {
|
|
502504
|
+
...this._outputConfiguration,
|
|
502505
|
+
...configuration
|
|
502506
|
+
};
|
|
501500
502507
|
return this;
|
|
501501
502508
|
}
|
|
501502
502509
|
showHelpAfterError(displayHelp = true) {
|
|
@@ -501527,12 +502534,12 @@ var require_command = __commonJS((exports) => {
|
|
|
501527
502534
|
createArgument(name, description) {
|
|
501528
502535
|
return new Argument(name, description);
|
|
501529
502536
|
}
|
|
501530
|
-
argument(name, description,
|
|
502537
|
+
argument(name, description, parseArg, defaultValue) {
|
|
501531
502538
|
const argument = this.createArgument(name, description);
|
|
501532
|
-
if (typeof
|
|
501533
|
-
argument.default(defaultValue).argParser(
|
|
502539
|
+
if (typeof parseArg === "function") {
|
|
502540
|
+
argument.default(defaultValue).argParser(parseArg);
|
|
501534
502541
|
} else {
|
|
501535
|
-
argument.default(
|
|
502542
|
+
argument.default(parseArg);
|
|
501536
502543
|
}
|
|
501537
502544
|
this.addArgument(argument);
|
|
501538
502545
|
return this;
|
|
@@ -501545,7 +502552,7 @@ var require_command = __commonJS((exports) => {
|
|
|
501545
502552
|
}
|
|
501546
502553
|
addArgument(argument) {
|
|
501547
502554
|
const previousArgument = this.registeredArguments.slice(-1)[0];
|
|
501548
|
-
if (previousArgument
|
|
502555
|
+
if (previousArgument?.variadic) {
|
|
501549
502556
|
throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);
|
|
501550
502557
|
}
|
|
501551
502558
|
if (argument.required && argument.defaultValue !== undefined && argument.parseArg === undefined) {
|
|
@@ -501557,10 +502564,13 @@ var require_command = __commonJS((exports) => {
|
|
|
501557
502564
|
helpCommand(enableOrNameAndArgs, description) {
|
|
501558
502565
|
if (typeof enableOrNameAndArgs === "boolean") {
|
|
501559
502566
|
this._addImplicitHelpCommand = enableOrNameAndArgs;
|
|
502567
|
+
if (enableOrNameAndArgs && this._defaultCommandGroup) {
|
|
502568
|
+
this._initCommandGroup(this._getHelpCommand());
|
|
502569
|
+
}
|
|
501560
502570
|
return this;
|
|
501561
502571
|
}
|
|
501562
|
-
|
|
501563
|
-
const [, helpName, helpArgs] =
|
|
502572
|
+
const nameAndArgs = enableOrNameAndArgs ?? "help [command]";
|
|
502573
|
+
const [, helpName, helpArgs] = nameAndArgs.match(/([^ ]+) *(.*)/);
|
|
501564
502574
|
const helpDescription = description ?? "display help for command";
|
|
501565
502575
|
const helpCommand = this.createCommand(helpName);
|
|
501566
502576
|
helpCommand.helpOption(false);
|
|
@@ -501570,6 +502580,8 @@ var require_command = __commonJS((exports) => {
|
|
|
501570
502580
|
helpCommand.description(helpDescription);
|
|
501571
502581
|
this._addImplicitHelpCommand = true;
|
|
501572
502582
|
this._helpCommand = helpCommand;
|
|
502583
|
+
if (enableOrNameAndArgs || description)
|
|
502584
|
+
this._initCommandGroup(helpCommand);
|
|
501573
502585
|
return this;
|
|
501574
502586
|
}
|
|
501575
502587
|
addHelpCommand(helpCommand, deprecatedDescription) {
|
|
@@ -501579,6 +502591,7 @@ var require_command = __commonJS((exports) => {
|
|
|
501579
502591
|
}
|
|
501580
502592
|
this._addImplicitHelpCommand = true;
|
|
501581
502593
|
this._helpCommand = helpCommand;
|
|
502594
|
+
this._initCommandGroup(helpCommand);
|
|
501582
502595
|
return this;
|
|
501583
502596
|
}
|
|
501584
502597
|
_getHelpCommand() {
|
|
@@ -501658,6 +502671,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
501658
502671
|
throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'
|
|
501659
502672
|
- already used by option '${matchingOption.flags}'`);
|
|
501660
502673
|
}
|
|
502674
|
+
this._initOptionGroup(option);
|
|
501661
502675
|
this.options.push(option);
|
|
501662
502676
|
}
|
|
501663
502677
|
_registerCommand(command8) {
|
|
@@ -501670,6 +502684,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
501670
502684
|
const newCmd = knownBy(command8).join("|");
|
|
501671
502685
|
throw new Error(`cannot add command '${newCmd}' as already have command '${existingCmd}'`);
|
|
501672
502686
|
}
|
|
502687
|
+
this._initCommandGroup(command8);
|
|
501673
502688
|
this.commands.push(command8);
|
|
501674
502689
|
}
|
|
501675
502690
|
addOption(option) {
|
|
@@ -501692,7 +502707,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
501692
502707
|
if (val !== null && option.parseArg) {
|
|
501693
502708
|
val = this._callParseArg(option, val, oldValue, invalidValueMessage);
|
|
501694
502709
|
} else if (val !== null && option.variadic) {
|
|
501695
|
-
val = option.
|
|
502710
|
+
val = option._collectValue(val, oldValue);
|
|
501696
502711
|
}
|
|
501697
502712
|
if (val == null) {
|
|
501698
502713
|
if (option.negate) {
|
|
@@ -502067,7 +503082,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
502067
503082
|
this.processedArgs = processedArgs;
|
|
502068
503083
|
}
|
|
502069
503084
|
_chainOrCall(promise3, fn) {
|
|
502070
|
-
if (promise3
|
|
503085
|
+
if (promise3?.then && typeof promise3.then === "function") {
|
|
502071
503086
|
return promise3.then(() => fn());
|
|
502072
503087
|
}
|
|
502073
503088
|
return fn();
|
|
@@ -502144,7 +503159,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
502144
503159
|
promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
|
|
502145
503160
|
return promiseChain;
|
|
502146
503161
|
}
|
|
502147
|
-
if (this.parent
|
|
503162
|
+
if (this.parent?.listenerCount(commandEvent)) {
|
|
502148
503163
|
checkForUnknownOptions();
|
|
502149
503164
|
this._processArguments();
|
|
502150
503165
|
this.parent.emit(commandEvent, operands, unknown3);
|
|
@@ -502206,24 +503221,31 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
502206
503221
|
cmd._checkForConflictingLocalOptions();
|
|
502207
503222
|
});
|
|
502208
503223
|
}
|
|
502209
|
-
parseOptions(
|
|
503224
|
+
parseOptions(args) {
|
|
502210
503225
|
const operands = [];
|
|
502211
503226
|
const unknown3 = [];
|
|
502212
503227
|
let dest = operands;
|
|
502213
|
-
const args = argv.slice();
|
|
502214
503228
|
function maybeOption(arg) {
|
|
502215
503229
|
return arg.length > 1 && arg[0] === "-";
|
|
502216
503230
|
}
|
|
503231
|
+
const negativeNumberArg = (arg) => {
|
|
503232
|
+
if (!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(arg))
|
|
503233
|
+
return false;
|
|
503234
|
+
return !this._getCommandAndAncestors().some((cmd) => cmd.options.map((opt) => opt.short).some((short) => /^-\d$/.test(short)));
|
|
503235
|
+
};
|
|
502217
503236
|
let activeVariadicOption = null;
|
|
502218
|
-
|
|
502219
|
-
|
|
503237
|
+
let activeGroup = null;
|
|
503238
|
+
let i3 = 0;
|
|
503239
|
+
while (i3 < args.length || activeGroup) {
|
|
503240
|
+
const arg = activeGroup ?? args[i3++];
|
|
503241
|
+
activeGroup = null;
|
|
502220
503242
|
if (arg === "--") {
|
|
502221
503243
|
if (dest === unknown3)
|
|
502222
503244
|
dest.push(arg);
|
|
502223
|
-
dest.push(...args);
|
|
503245
|
+
dest.push(...args.slice(i3));
|
|
502224
503246
|
break;
|
|
502225
503247
|
}
|
|
502226
|
-
if (activeVariadicOption && !maybeOption(arg)) {
|
|
503248
|
+
if (activeVariadicOption && (!maybeOption(arg) || negativeNumberArg(arg))) {
|
|
502227
503249
|
this.emit(`option:${activeVariadicOption.name()}`, arg);
|
|
502228
503250
|
continue;
|
|
502229
503251
|
}
|
|
@@ -502232,14 +503254,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
502232
503254
|
const option = this._findOption(arg);
|
|
502233
503255
|
if (option) {
|
|
502234
503256
|
if (option.required) {
|
|
502235
|
-
const value = args
|
|
503257
|
+
const value = args[i3++];
|
|
502236
503258
|
if (value === undefined)
|
|
502237
503259
|
this.optionMissingArgument(option);
|
|
502238
503260
|
this.emit(`option:${option.name()}`, value);
|
|
502239
503261
|
} else if (option.optional) {
|
|
502240
503262
|
let value = null;
|
|
502241
|
-
if (args.length
|
|
502242
|
-
value = args
|
|
503263
|
+
if (i3 < args.length && (!maybeOption(args[i3]) || negativeNumberArg(args[i3]))) {
|
|
503264
|
+
value = args[i3++];
|
|
502243
503265
|
}
|
|
502244
503266
|
this.emit(`option:${option.name()}`, value);
|
|
502245
503267
|
} else {
|
|
@@ -502256,7 +503278,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
502256
503278
|
this.emit(`option:${option.name()}`, arg.slice(2));
|
|
502257
503279
|
} else {
|
|
502258
503280
|
this.emit(`option:${option.name()}`);
|
|
502259
|
-
|
|
503281
|
+
activeGroup = `-${arg.slice(2)}`;
|
|
502260
503282
|
}
|
|
502261
503283
|
continue;
|
|
502262
503284
|
}
|
|
@@ -502269,31 +503291,24 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
502269
503291
|
continue;
|
|
502270
503292
|
}
|
|
502271
503293
|
}
|
|
502272
|
-
if (maybeOption(arg)) {
|
|
503294
|
+
if (dest === operands && maybeOption(arg) && !(this.commands.length === 0 && negativeNumberArg(arg))) {
|
|
502273
503295
|
dest = unknown3;
|
|
502274
503296
|
}
|
|
502275
503297
|
if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown3.length === 0) {
|
|
502276
503298
|
if (this._findCommand(arg)) {
|
|
502277
503299
|
operands.push(arg);
|
|
502278
|
-
|
|
502279
|
-
unknown3.push(...args);
|
|
503300
|
+
unknown3.push(...args.slice(i3));
|
|
502280
503301
|
break;
|
|
502281
503302
|
} else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {
|
|
502282
|
-
operands.push(arg);
|
|
502283
|
-
if (args.length > 0)
|
|
502284
|
-
operands.push(...args);
|
|
503303
|
+
operands.push(arg, ...args.slice(i3));
|
|
502285
503304
|
break;
|
|
502286
503305
|
} else if (this._defaultCommandName) {
|
|
502287
|
-
unknown3.push(arg);
|
|
502288
|
-
if (args.length > 0)
|
|
502289
|
-
unknown3.push(...args);
|
|
503306
|
+
unknown3.push(arg, ...args.slice(i3));
|
|
502290
503307
|
break;
|
|
502291
503308
|
}
|
|
502292
503309
|
}
|
|
502293
503310
|
if (this._passThroughOptions) {
|
|
502294
|
-
dest.push(arg);
|
|
502295
|
-
if (args.length > 0)
|
|
502296
|
-
dest.push(...args);
|
|
503311
|
+
dest.push(arg, ...args.slice(i3));
|
|
502297
503312
|
break;
|
|
502298
503313
|
}
|
|
502299
503314
|
dest.push(arg);
|
|
@@ -502504,6 +503519,32 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
502504
503519
|
this._name = str2;
|
|
502505
503520
|
return this;
|
|
502506
503521
|
}
|
|
503522
|
+
helpGroup(heading) {
|
|
503523
|
+
if (heading === undefined)
|
|
503524
|
+
return this._helpGroupHeading ?? "";
|
|
503525
|
+
this._helpGroupHeading = heading;
|
|
503526
|
+
return this;
|
|
503527
|
+
}
|
|
503528
|
+
commandsGroup(heading) {
|
|
503529
|
+
if (heading === undefined)
|
|
503530
|
+
return this._defaultCommandGroup ?? "";
|
|
503531
|
+
this._defaultCommandGroup = heading;
|
|
503532
|
+
return this;
|
|
503533
|
+
}
|
|
503534
|
+
optionsGroup(heading) {
|
|
503535
|
+
if (heading === undefined)
|
|
503536
|
+
return this._defaultOptionGroup ?? "";
|
|
503537
|
+
this._defaultOptionGroup = heading;
|
|
503538
|
+
return this;
|
|
503539
|
+
}
|
|
503540
|
+
_initOptionGroup(option) {
|
|
503541
|
+
if (this._defaultOptionGroup && !option.helpGroupHeading)
|
|
503542
|
+
option.helpGroup(this._defaultOptionGroup);
|
|
503543
|
+
}
|
|
503544
|
+
_initCommandGroup(cmd) {
|
|
503545
|
+
if (this._defaultCommandGroup && !cmd.helpGroup())
|
|
503546
|
+
cmd.helpGroup(this._defaultCommandGroup);
|
|
503547
|
+
}
|
|
502507
503548
|
nameFromFilename(filename) {
|
|
502508
503549
|
this._name = path22.basename(filename, path22.extname(filename));
|
|
502509
503550
|
return this;
|
|
@@ -502580,15 +503621,19 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
502580
503621
|
helpOption(flags, description) {
|
|
502581
503622
|
if (typeof flags === "boolean") {
|
|
502582
503623
|
if (flags) {
|
|
502583
|
-
|
|
503624
|
+
if (this._helpOption === null)
|
|
503625
|
+
this._helpOption = undefined;
|
|
503626
|
+
if (this._defaultOptionGroup) {
|
|
503627
|
+
this._initOptionGroup(this._getHelpOption());
|
|
503628
|
+
}
|
|
502584
503629
|
} else {
|
|
502585
503630
|
this._helpOption = null;
|
|
502586
503631
|
}
|
|
502587
503632
|
return this;
|
|
502588
503633
|
}
|
|
502589
|
-
|
|
502590
|
-
|
|
502591
|
-
|
|
503634
|
+
this._helpOption = this.createOption(flags ?? "-h, --help", description ?? "display help for command");
|
|
503635
|
+
if (flags || description)
|
|
503636
|
+
this._initOptionGroup(this._helpOption);
|
|
502592
503637
|
return this;
|
|
502593
503638
|
}
|
|
502594
503639
|
_getHelpOption() {
|
|
@@ -502599,6 +503644,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
502599
503644
|
}
|
|
502600
503645
|
addHelpOption(option) {
|
|
502601
503646
|
this._helpOption = option;
|
|
503647
|
+
this._initOptionGroup(option);
|
|
502602
503648
|
return this;
|
|
502603
503649
|
}
|
|
502604
503650
|
help(contextOptions) {
|
|
@@ -555547,7 +556593,7 @@ Now that this skill is invoked, you have access to Chrome browser automation too
|
|
|
555547
556593
|
IMPORTANT: Start by calling mcp__claude-in-chrome__tabs_context_mcp to get information about the user's current browser tabs.
|
|
555548
556594
|
`;
|
|
555549
556595
|
var init_claudeInChrome = __esm(() => {
|
|
555550
|
-
|
|
556596
|
+
init_ant_claude_for_chrome_mcp();
|
|
555551
556597
|
init_setup2();
|
|
555552
556598
|
init_bundledSkills();
|
|
555553
556599
|
CLAUDE_IN_CHROME_MCP_TOOLS = BROWSER_TOOLS.map((tool) => `mcp__claude-in-chrome__${tool.name}`);
|