@salesforce/telemetry 6.4.2 → 6.4.5

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/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  Apache License Version 2.0
2
2
 
3
- Copyright (c) 2025 Salesforce, Inc.
3
+ Copyright (c) 2026 Salesforce, Inc.
4
4
  All rights reserved.
5
5
 
6
6
  Apache License
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.AppInsights = exports.TelemetryClient = void 0;
37
37
  /*
38
- * Copyright 2025, Salesforce, Inc.
38
+ * Copyright 2026, Salesforce, Inc.
39
39
  *
40
40
  * Licensed under the Apache License, Version 2.0 (the "License");
41
41
  * you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.BaseReporter = void 0;
37
37
  /*
38
- * Copyright 2025, Salesforce, Inc.
38
+ * Copyright 2026, Salesforce, Inc.
39
39
  *
40
40
  * Licensed under the Apache License, Version 2.0 (the "License");
41
41
  * you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright 2025, Salesforce, Inc.
3
+ * Copyright 2026, Salesforce, Inc.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
package/lib/exported.js CHANGED
@@ -16,7 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.isEnabled = void 0;
18
18
  /*
19
- * Copyright 2025, Salesforce, Inc.
19
+ * Copyright 2026, Salesforce, Inc.
20
20
  *
21
21
  * Licensed under the Apache License, Version 2.0 (the "License");
22
22
  * you may not use this file except in compliance with the License.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.O11yReporter = void 0;
4
4
  /*
5
- * Copyright 2025, Salesforce, Inc.
5
+ * Copyright 2026, Salesforce, Inc.
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
8
8
  * you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.TelemetryReporter = void 0;
40
40
  /*
41
- * Copyright 2025, Salesforce, Inc.
41
+ * Copyright 2026, Salesforce, Inc.
42
42
  *
43
43
  * Licensed under the Apache License, Version 2.0 (the "License");
44
44
  * you may not use this file except in compliance with the License.
@@ -114,6 +114,8 @@ class TelemetryReporter extends kit_1.AsyncCreatable {
114
114
  // Enable auto-batching with provided options or defaults
115
115
  const batchingOptions = {
116
116
  flushInterval: batchingConfig?.flushInterval ?? 30_000, // 30 seconds default
117
+ thresholdBytes: batchingConfig?.thresholdBytes,
118
+ checkInterval: batchingConfig?.checkInterval,
117
119
  enableShutdownHook: batchingConfig?.enableShutdownHook ?? true,
118
120
  enableBeforeExitHook: batchingConfig?.enableBeforeExitHook,
119
121
  };
package/lib/types.d.ts CHANGED
@@ -32,6 +32,14 @@ export type O11yBatchingConfig = {
32
32
  * Periodic flush interval in milliseconds (default: 30000)
33
33
  */
34
34
  flushInterval?: number;
35
+ /**
36
+ * Buffer size threshold in bytes before triggering upload (default: 50000 = 50KB)
37
+ */
38
+ thresholdBytes?: number;
39
+ /**
40
+ * Threshold check interval in milliseconds (default: 2000 = 2s). Lower values catch threshold violations faster but use more CPU
41
+ */
42
+ checkInterval?: number;
35
43
  /**
36
44
  * Enable shutdown hooks (default: true)
37
45
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/telemetry",
3
- "version": "6.4.2",
3
+ "version": "6.4.5",
4
4
  "description": "Library for telemetry reporting to Application Insights and O11y",
5
5
  "main": "lib/exported",
6
6
  "exports": {
@@ -41,9 +41,9 @@
41
41
  "!lib/**/*.map"
42
42
  ],
43
43
  "dependencies": {
44
- "@salesforce/core": "^8.23.4",
44
+ "@salesforce/core": "^8.24.0",
45
45
  "@salesforce/kit": "^3.2.4",
46
- "@salesforce/o11y-reporter": "1.6.0",
46
+ "@salesforce/o11y-reporter": "1.7.0",
47
47
  "applicationinsights": "^2.9.8",
48
48
  "got": "^11",
49
49
  "proxy-agent": "^6.5.0"