@salesforce/lds-instrumentation 1.245.0 → 1.247.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@
12
12
  * *******************************************************************************************
13
13
  */
14
14
  /* proxy-compat-disable */
15
- import { getInstrumentation } from 'o11y/client';
15
+ import { getInstrumentation, idleDetector } from 'o11y/client';
16
16
  import { adapterUnfulfilledErrorSchema } from 'o11y_schema/sf_lds';
17
17
  import { ADAPTER_UNFULFILLED_ERROR, instrument } from 'force/ldsBindings';
18
18
 
@@ -107,7 +107,7 @@ var TypeCheckShapes;
107
107
  TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
108
108
  TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
109
109
  })(TypeCheckShapes || (TypeCheckShapes = {}));
110
- // engine version: 0.150.5-275045c5
110
+ // engine version: 0.151.0-f29c1c57
111
111
 
112
112
  const DurableEnvironmentEventDiscriminator = 'durable';
113
113
  function isDurableEnvironmentEvent(event) {
@@ -679,8 +679,8 @@ var metricKeys = /*#__PURE__*/Object.freeze({
679
679
  *
680
680
  * Below are the R.E.A.D.S. metrics for the Lightning Data Service, defined here[2].
681
681
  *
682
- * [1] https://salesforce.quip.com/NfW9AsbGEaTY
683
- * [2] https://salesforce.quip.com/1dFvAba1b0eq
682
+ * [1] Search "[M1] Lightning Data Service Design Spike" in Quip
683
+ * [2] Search "Lightning Data Service R.E.A.D.S. Metrics" in Quip
684
684
  */
685
685
  const OBSERVABILITY_NAMESPACE = 'LIGHTNING.lds.service';
686
686
  const ADAPTER_INVOCATION_COUNT_METRIC_NAME = 'request';
@@ -1494,7 +1494,12 @@ function setStoreEventObservers(store) {
1494
1494
  store.addStoreEventObserver(cacheMissOutOfTtlEventObserver);
1495
1495
  store.addStoreEventObserver(cacheMissOutOfTtlDurationUpdateEventObserver);
1496
1496
  }
1497
+ function onIdleDetected(callback) {
1498
+ idleDetector.requestIdleDetectedCallback((timestamp) => {
1499
+ callback(timestamp);
1500
+ });
1501
+ }
1497
1502
  const instrumentation = new Instrumentation();
1498
1503
 
1499
- export { Instrumentation, LRUCache, metricKeys as METRIC_KEYS, handleIngestedNewData, handleOnDataOutOfTtlDurationUpdate, incrementCounterMetric, incrementGetRecordNormalInvokeCount, incrementGetRecordNotifyChangeAllowCount, incrementGetRecordNotifyChangeDropCount, incrementNotifyRecordUpdateAvailableAllowCount, incrementNotifyRecordUpdateAvailableDropCount, instrumentAdapter, instrumentLuvio, instrumentMethods, instrumentStoreMethods, instrumentation, logObjectInfoChanged, setInstrumentationHooks, setLdsAdaptersUiapiInstrumentation, setLdsNetworkAdapterInstrumentation, setStoreEventObservers, setupInstrumentation, startAdapterActivity, updatePercentileHistogramMetric };
1500
- // version: 1.245.0-0ea124370
1504
+ export { Instrumentation, LRUCache, metricKeys as METRIC_KEYS, handleIngestedNewData, handleOnDataOutOfTtlDurationUpdate, incrementCounterMetric, incrementGetRecordNormalInvokeCount, incrementGetRecordNotifyChangeAllowCount, incrementGetRecordNotifyChangeDropCount, incrementNotifyRecordUpdateAvailableAllowCount, incrementNotifyRecordUpdateAvailableDropCount, instrumentAdapter, instrumentLuvio, instrumentMethods, instrumentStoreMethods, instrumentation, logObjectInfoChanged, onIdleDetected, setInstrumentationHooks, setLdsAdaptersUiapiInstrumentation, setLdsNetworkAdapterInstrumentation, setStoreEventObservers, setupInstrumentation, startAdapterActivity, updatePercentileHistogramMetric };
1505
+ // version: 1.247.0-4fe38c091
@@ -95,4 +95,5 @@ export declare function instrumentStoreMethods(luvio: Luvio, _store: InMemorySto
95
95
  export declare function handleIngestedNewData(event: CacheMissOutOfTtlEvent): void;
96
96
  export declare function handleOnDataOutOfTtlDurationUpdate(event: DataOutOfTtlDurationUpdateEvent): void;
97
97
  export declare function setStoreEventObservers(store: InMemoryStore): void;
98
+ export declare function onIdleDetected(callback: (timestamp: number) => void): void;
98
99
  export declare const instrumentation: Instrumentation;
@@ -6,8 +6,8 @@
6
6
  *
7
7
  * Below are the R.E.A.D.S. metrics for the Lightning Data Service, defined here[2].
8
8
  *
9
- * [1] https://salesforce.quip.com/NfW9AsbGEaTY
10
- * [2] https://salesforce.quip.com/1dFvAba1b0eq
9
+ * [1] Search "[M1] Lightning Data Service Design Spike" in Quip
10
+ * [2] Search "Lightning Data Service R.E.A.D.S. Metrics" in Quip
11
11
  */
12
12
  export declare const OBSERVABILITY_NAMESPACE = "LIGHTNING.lds.service";
13
13
  export declare const ADAPTER_INVOCATION_COUNT_METRIC_NAME = "request";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-instrumentation",
3
- "version": "1.245.0",
3
+ "version": "1.247.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Instrumentation utils for Lightning Data Service",
6
6
  "main": "dist/ldsInstrumentation.js",
@@ -47,10 +47,13 @@
47
47
  {
48
48
  "path": "./dist/ldsInstrumentation.js",
49
49
  "maxSize": {
50
- "none": "60 kB",
50
+ "none": "61 kB",
51
51
  "min": "26 kB",
52
52
  "compressed": "11 kB"
53
53
  }
54
54
  }
55
- ]
55
+ ],
56
+ "volta": {
57
+ "extends": "../../package.json"
58
+ }
56
59
  }