@salesforce/lds-runtime-aura 1.124.2 → 1.124.3
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/ldsEngineCreator.js +644 -644
- package/dist/{__mocks__ → types/__mocks__}/@salesforce/gate/lds.useNewTrackedFieldBehavior.d.ts +4 -4
- package/dist/{__mocks__ → types/__mocks__}/@salesforce/lds-ads-bridge.d.ts +2 -2
- package/dist/{__mocks__ → types/__mocks__}/@salesforce/lds-aura-storage.d.ts +1 -1
- package/dist/{__mocks__ → types/__mocks__}/@salesforce/lds-instrumentation.d.ts +9 -9
- package/dist/{__mocks__ → types/__mocks__}/@salesforce/lds-network-aura.d.ts +2 -2
- package/dist/{__mocks__ → types/__mocks__}/force/ldsGraphqlParser.d.ts +3 -3
- package/dist/{__mocks__ → types/__mocks__}/instrumentation/service.d.ts +33 -33
- package/dist/{aura-instrumentation → types/aura-instrumentation}/main.d.ts +178 -178
- package/dist/{aura-instrumentation → types/aura-instrumentation}/utils/language.d.ts +13 -13
- package/dist/{aura-instrumentation → types/aura-instrumentation}/utils/observability.d.ts +36 -36
- package/dist/{aura-instrumentation → types/aura-instrumentation}/utils/utils.d.ts +13 -13
- package/dist/{main.d.ts → types/main.d.ts} +5 -5
- package/dist/{metadata.d.ts → types/metadata.d.ts} +5 -5
- package/package.json +3 -3
package/dist/{__mocks__ → types/__mocks__}/@salesforce/gate/lds.useNewTrackedFieldBehavior.d.ts
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
isOpen: () => boolean;
|
|
3
|
-
};
|
|
4
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
isOpen: () => boolean;
|
|
3
|
+
};
|
|
4
|
+
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function (): void;
|
|
2
|
-
export declare function instrument(): void;
|
|
1
|
+
export default function (): void;
|
|
2
|
+
export declare function instrument(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function clearStorages(): Promise<void>;
|
|
1
|
+
export declare function clearStorages(): Promise<void>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare function setupInstrumentation(): void;
|
|
2
|
-
export declare function LRUCache(): Map<any, any>;
|
|
3
|
-
export declare function incrementCounterMetric(): void;
|
|
4
|
-
export declare function updatePercentileHistogramMetric(): void;
|
|
5
|
-
export declare function instrumentAdapter<_C, _D>(adapter: any, _metadata: any): any;
|
|
6
|
-
export declare function instrumentLuvio(): void;
|
|
7
|
-
export declare function instrumentStoreMethods(): void;
|
|
8
|
-
export declare function setLdsAdaptersUiapiInstrumentation(): void;
|
|
9
|
-
export declare function setLdsNetworkAdapterInstrumentation(): void;
|
|
1
|
+
export declare function setupInstrumentation(): void;
|
|
2
|
+
export declare function LRUCache(): Map<any, any>;
|
|
3
|
+
export declare function incrementCounterMetric(): void;
|
|
4
|
+
export declare function updatePercentileHistogramMetric(): void;
|
|
5
|
+
export declare function instrumentAdapter<_C, _D>(adapter: any, _metadata: any): any;
|
|
6
|
+
export declare function instrumentLuvio(): void;
|
|
7
|
+
export declare function instrumentStoreMethods(): void;
|
|
8
|
+
export declare function setLdsAdaptersUiapiInstrumentation(): void;
|
|
9
|
+
export declare function setLdsNetworkAdapterInstrumentation(): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function (): void;
|
|
2
|
-
export declare function instrument(): void;
|
|
1
|
+
export default function (): void;
|
|
2
|
+
export declare function instrument(): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
declare const astResolver: jest.Mock<any, any>;
|
|
3
|
-
export { astResolver };
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
declare const astResolver: jest.Mock<any, any>;
|
|
3
|
+
export { astResolver };
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
export declare function counter(): {
|
|
2
|
-
increment(): void;
|
|
3
|
-
decrement(): void;
|
|
4
|
-
getValue(): void;
|
|
5
|
-
reset(): void;
|
|
6
|
-
};
|
|
7
|
-
export declare function gauge(): {
|
|
8
|
-
setValue(): void;
|
|
9
|
-
getValue(): void;
|
|
10
|
-
reset(): void;
|
|
11
|
-
};
|
|
12
|
-
export declare function mark(): void;
|
|
13
|
-
export declare function markStart(): void;
|
|
14
|
-
export declare function markEnd(): void;
|
|
15
|
-
export declare function perfStart(): void;
|
|
16
|
-
export declare function perfEnd(): void;
|
|
17
|
-
export declare function percentileHistogram(): {
|
|
18
|
-
update(): void;
|
|
19
|
-
getValue(): void;
|
|
20
|
-
reset(): void;
|
|
21
|
-
};
|
|
22
|
-
export declare function time(): void;
|
|
23
|
-
export declare function timer(): {
|
|
24
|
-
addDuration(): void;
|
|
25
|
-
getValue(): void;
|
|
26
|
-
time(): void;
|
|
27
|
-
};
|
|
28
|
-
export declare function registerCacheStats(): {
|
|
29
|
-
logHits(): void;
|
|
30
|
-
logMisses(): void;
|
|
31
|
-
};
|
|
32
|
-
export declare function registerPlugin(): void;
|
|
33
|
-
export declare function registerPeriodicLogger(): void;
|
|
1
|
+
export declare function counter(): {
|
|
2
|
+
increment(): void;
|
|
3
|
+
decrement(): void;
|
|
4
|
+
getValue(): void;
|
|
5
|
+
reset(): void;
|
|
6
|
+
};
|
|
7
|
+
export declare function gauge(): {
|
|
8
|
+
setValue(): void;
|
|
9
|
+
getValue(): void;
|
|
10
|
+
reset(): void;
|
|
11
|
+
};
|
|
12
|
+
export declare function mark(): void;
|
|
13
|
+
export declare function markStart(): void;
|
|
14
|
+
export declare function markEnd(): void;
|
|
15
|
+
export declare function perfStart(): void;
|
|
16
|
+
export declare function perfEnd(): void;
|
|
17
|
+
export declare function percentileHistogram(): {
|
|
18
|
+
update(): void;
|
|
19
|
+
getValue(): void;
|
|
20
|
+
reset(): void;
|
|
21
|
+
};
|
|
22
|
+
export declare function time(): void;
|
|
23
|
+
export declare function timer(): {
|
|
24
|
+
addDuration(): void;
|
|
25
|
+
getValue(): void;
|
|
26
|
+
time(): void;
|
|
27
|
+
};
|
|
28
|
+
export declare function registerCacheStats(): {
|
|
29
|
+
logHits(): void;
|
|
30
|
+
logMisses(): void;
|
|
31
|
+
};
|
|
32
|
+
export declare function registerPlugin(): void;
|
|
33
|
+
export declare function registerPeriodicLogger(): void;
|
|
@@ -1,178 +1,178 @@
|
|
|
1
|
-
import type { FetchResponse, Luvio, InMemoryStore, Adapter, UnfulfilledSnapshot } from '@luvio/engine';
|
|
2
|
-
import type { AdapterMetadata } from '@salesforce/lds-bindings';
|
|
3
|
-
import { ADAPTER_UNFULFILLED_ERROR } from '@salesforce/lds-bindings';
|
|
4
|
-
import type { CacheStatsLogger, Timer } from 'instrumentation/service';
|
|
5
|
-
export interface AdapterUnfulfilledError {
|
|
6
|
-
[ADAPTER_UNFULFILLED_ERROR]: boolean;
|
|
7
|
-
adapterName: string;
|
|
8
|
-
missingPaths: UnfulfilledSnapshot<any, any>['missingPaths'];
|
|
9
|
-
missingLinks: UnfulfilledSnapshot<any, any>['missingLinks'];
|
|
10
|
-
}
|
|
11
|
-
export declare const APEX_ADAPTER_NAME = "getApex";
|
|
12
|
-
export declare const NORMALIZED_APEX_ADAPTER_NAME: string;
|
|
13
|
-
export declare const REFRESH_APEX_KEY = "refreshApex";
|
|
14
|
-
export declare const REFRESH_UIAPI_KEY = "refreshUiApi";
|
|
15
|
-
export declare const SUPPORTED_KEY = "refreshSupported";
|
|
16
|
-
export declare const UNSUPPORTED_KEY = "refreshUnsupported";
|
|
17
|
-
type refreshApiNames = {
|
|
18
|
-
refreshApex: string;
|
|
19
|
-
refreshUiApi: string;
|
|
20
|
-
};
|
|
21
|
-
export interface LightningInteractionSchema {
|
|
22
|
-
target: string;
|
|
23
|
-
scope: string;
|
|
24
|
-
context: unknown;
|
|
25
|
-
eventSource: string;
|
|
26
|
-
eventType: string;
|
|
27
|
-
attributes: unknown;
|
|
28
|
-
}
|
|
29
|
-
export declare class Instrumentation {
|
|
30
|
-
private adapterUnfulfilledErrorCounters;
|
|
31
|
-
private recordApiNameChangeCounters;
|
|
32
|
-
private refreshAdapterEvents;
|
|
33
|
-
private refreshApiCallEventStats;
|
|
34
|
-
private lastRefreshApiCall;
|
|
35
|
-
private weakEtagZeroEvents;
|
|
36
|
-
private adapterCacheMisses;
|
|
37
|
-
constructor();
|
|
38
|
-
/**
|
|
39
|
-
* Instruments an existing adapter to log argus metrics and cache stats.
|
|
40
|
-
* @param adapter The adapter function.
|
|
41
|
-
* @param metadata The adapter metadata.
|
|
42
|
-
* @param wireConfigKeyFn Optional function to transform wire configs to a unique key.
|
|
43
|
-
* @returns The wrapped adapter.
|
|
44
|
-
*/
|
|
45
|
-
instrumentAdapter<C, D>(adapter: Adapter<C, D>, metadata: AdapterMetadata): Adapter<C, D>;
|
|
46
|
-
/**
|
|
47
|
-
* Logs when adapter requests come in. If we have subsequent cache misses on a given config, beyond its TTL then log the duration to metrics.
|
|
48
|
-
* Backed by an LRU Cache implementation to prevent too many record entries from being stored in-memory.
|
|
49
|
-
* @param name The wire adapter name.
|
|
50
|
-
* @param config The config passed into wire adapter.
|
|
51
|
-
* @param ttlMissStats CacheStatsLogger to log misses out of TTL.
|
|
52
|
-
* @param currentCacheMissTimestamp Timestamp for when the request was made.
|
|
53
|
-
* @param ttl TTL for the wire adapter.
|
|
54
|
-
*/
|
|
55
|
-
private logAdapterCacheMissOutOfTtlDuration;
|
|
56
|
-
/**
|
|
57
|
-
* Injected to LDS for Luvio specific instrumentation.
|
|
58
|
-
*
|
|
59
|
-
* @param context The transaction context.
|
|
60
|
-
*/
|
|
61
|
-
instrumentLuvio(context: unknown): void;
|
|
62
|
-
/**
|
|
63
|
-
* Returns whether or not this is a RefreshAdapterEvent.
|
|
64
|
-
* @param context The transaction context.
|
|
65
|
-
* @returns Whether or not this is a RefreshAdapterEvent.
|
|
66
|
-
*/
|
|
67
|
-
private isRefreshAdapterEvent;
|
|
68
|
-
/**
|
|
69
|
-
* Returns whether or not this is an AdapterUnfulfilledError.
|
|
70
|
-
* @param context The transaction context.
|
|
71
|
-
* @returns Whether or not this is an AdapterUnfulfilledError.
|
|
72
|
-
*/
|
|
73
|
-
private isAdapterUnfulfilledError;
|
|
74
|
-
/**
|
|
75
|
-
* Specific instrumentation for getRecordNotifyChange.
|
|
76
|
-
* temporary implementation to match existing aura call for now
|
|
77
|
-
*
|
|
78
|
-
* @param uniqueWeakEtags whether weakEtags match or not
|
|
79
|
-
* @param error if dispatchResourceRequest fails for any reason
|
|
80
|
-
*/
|
|
81
|
-
notifyChangeNetwork(uniqueWeakEtags: boolean | null, error?: boolean): void;
|
|
82
|
-
/**
|
|
83
|
-
* Parses and aggregates weakETagZero events to be sent in summarized log line.
|
|
84
|
-
* @param context The transaction context.
|
|
85
|
-
*/
|
|
86
|
-
aggregateWeakETagEvents(incomingWeakEtagZero: boolean, existingWeakEtagZero: boolean, apiName: string): void;
|
|
87
|
-
/**
|
|
88
|
-
* Aggregates refresh adapter events to be sent in summarized log line.
|
|
89
|
-
* - how many times refreshApex is called
|
|
90
|
-
* - how many times refresh from lightning/uiRecordApi is called
|
|
91
|
-
* - number of supported calls: refreshApex called on apex adapter
|
|
92
|
-
* - number of unsupported calls: refreshApex on non-apex adapter
|
|
93
|
-
* + any use of refresh from uiRecordApi module
|
|
94
|
-
* - count of refresh calls per adapter
|
|
95
|
-
* @param context The refresh adapter event.
|
|
96
|
-
*/
|
|
97
|
-
private aggregateRefreshAdapterEvents;
|
|
98
|
-
/**
|
|
99
|
-
* Increments call stat for incoming refresh api call, and sets the name
|
|
100
|
-
* to be used in {@link aggregateRefreshCalls}
|
|
101
|
-
* @param from The name of the refresh function called.
|
|
102
|
-
*/
|
|
103
|
-
handleRefreshApiCall(apiName: keyof refreshApiNames): void;
|
|
104
|
-
/**
|
|
105
|
-
* W-7302241
|
|
106
|
-
* Logs refresh call summary stats as a LightningInteraction.
|
|
107
|
-
*/
|
|
108
|
-
logRefreshStats(): void;
|
|
109
|
-
/**
|
|
110
|
-
* Resets the stat trackers for refresh call events.
|
|
111
|
-
*/
|
|
112
|
-
private resetRefreshStats;
|
|
113
|
-
/**
|
|
114
|
-
* W-7801618
|
|
115
|
-
* Counter for occurrences where the incoming record to be merged has a different apiName.
|
|
116
|
-
* Dynamically generated metric, stored in an {@link RecordApiNameChangeCounters} object.
|
|
117
|
-
*
|
|
118
|
-
* @param context The transaction context.
|
|
119
|
-
*
|
|
120
|
-
* Note: Short-lived metric candidate, remove at the end of 230
|
|
121
|
-
*/
|
|
122
|
-
incrementRecordApiNameChangeCount(_incomingApiName: string, existingApiName: string): void;
|
|
123
|
-
/**
|
|
124
|
-
* W-8620679
|
|
125
|
-
* Increment the counter for an UnfulfilledSnapshotError coming from luvio
|
|
126
|
-
*
|
|
127
|
-
* @param context The transaction context.
|
|
128
|
-
*/
|
|
129
|
-
private incrementAdapterRequestErrorCount;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Calls instrumentation/service interaction API. Function name and parameters mapped to `o11y`
|
|
133
|
-
* implementation for Log Lines.
|
|
134
|
-
* @param schema Expected shape of the payload (Currently unused)
|
|
135
|
-
* @param payload Content to be logged, shape matches schema
|
|
136
|
-
*/
|
|
137
|
-
export declare function log(_schema: any, payload: LightningInteractionSchema): void;
|
|
138
|
-
/**
|
|
139
|
-
* Calls instrumentation/service telemetry timer
|
|
140
|
-
* @param name Name of the metric
|
|
141
|
-
* @param duration number to update backing percentile histogram, negative numbers ignored
|
|
142
|
-
*/
|
|
143
|
-
export declare function updateTimerMetric(name: string, duration: number): void;
|
|
144
|
-
export declare function timerMetricAddDuration(timer: Timer, duration: number): void;
|
|
145
|
-
export declare function incrementRequestResponseCount(cb: () => FetchResponse<unknown>): void;
|
|
146
|
-
/**
|
|
147
|
-
* Add a mark to the metrics service.
|
|
148
|
-
*
|
|
149
|
-
* @param name The mark name.
|
|
150
|
-
* @param content The mark content.
|
|
151
|
-
*/
|
|
152
|
-
export declare function mark(name: string, content?: any): void;
|
|
153
|
-
/**
|
|
154
|
-
* Create a new instrumentation cache stats and return it.
|
|
155
|
-
*
|
|
156
|
-
* @param name The cache logger name.
|
|
157
|
-
*/
|
|
158
|
-
export declare function registerLdsCacheStats(name: string): CacheStatsLogger;
|
|
159
|
-
/**
|
|
160
|
-
* Add or overwrite hooks that require aura implementations
|
|
161
|
-
*/
|
|
162
|
-
export declare function setAuraInstrumentationHooks(): void;
|
|
163
|
-
/**
|
|
164
|
-
* Initialize the instrumentation and instrument the LDS instance and the InMemoryStore.
|
|
165
|
-
*
|
|
166
|
-
* @param luvio The Luvio instance to instrument.
|
|
167
|
-
* @param store The InMemoryStore to instrument.
|
|
168
|
-
*/
|
|
169
|
-
export declare function setupInstrumentation(luvio: Luvio, store: InMemoryStore): void;
|
|
170
|
-
/**
|
|
171
|
-
* Note: locator.scope is set to 'force_record' in order for the instrumentation gate to work, which will
|
|
172
|
-
* disable all crud operations if it is on.
|
|
173
|
-
* @param eventSource - Source of the logging event.
|
|
174
|
-
* @param attributes - Free form object of attributes to log.
|
|
175
|
-
*/
|
|
176
|
-
export declare function logCRUDLightningInteraction(eventSource: string, attributes: object): void;
|
|
177
|
-
export declare const instrumentation: Instrumentation;
|
|
178
|
-
export {};
|
|
1
|
+
import type { FetchResponse, Luvio, InMemoryStore, Adapter, UnfulfilledSnapshot } from '@luvio/engine';
|
|
2
|
+
import type { AdapterMetadata } from '@salesforce/lds-bindings';
|
|
3
|
+
import { ADAPTER_UNFULFILLED_ERROR } from '@salesforce/lds-bindings';
|
|
4
|
+
import type { CacheStatsLogger, Timer } from 'instrumentation/service';
|
|
5
|
+
export interface AdapterUnfulfilledError {
|
|
6
|
+
[ADAPTER_UNFULFILLED_ERROR]: boolean;
|
|
7
|
+
adapterName: string;
|
|
8
|
+
missingPaths: UnfulfilledSnapshot<any, any>['missingPaths'];
|
|
9
|
+
missingLinks: UnfulfilledSnapshot<any, any>['missingLinks'];
|
|
10
|
+
}
|
|
11
|
+
export declare const APEX_ADAPTER_NAME = "getApex";
|
|
12
|
+
export declare const NORMALIZED_APEX_ADAPTER_NAME: string;
|
|
13
|
+
export declare const REFRESH_APEX_KEY = "refreshApex";
|
|
14
|
+
export declare const REFRESH_UIAPI_KEY = "refreshUiApi";
|
|
15
|
+
export declare const SUPPORTED_KEY = "refreshSupported";
|
|
16
|
+
export declare const UNSUPPORTED_KEY = "refreshUnsupported";
|
|
17
|
+
type refreshApiNames = {
|
|
18
|
+
refreshApex: string;
|
|
19
|
+
refreshUiApi: string;
|
|
20
|
+
};
|
|
21
|
+
export interface LightningInteractionSchema {
|
|
22
|
+
target: string;
|
|
23
|
+
scope: string;
|
|
24
|
+
context: unknown;
|
|
25
|
+
eventSource: string;
|
|
26
|
+
eventType: string;
|
|
27
|
+
attributes: unknown;
|
|
28
|
+
}
|
|
29
|
+
export declare class Instrumentation {
|
|
30
|
+
private adapterUnfulfilledErrorCounters;
|
|
31
|
+
private recordApiNameChangeCounters;
|
|
32
|
+
private refreshAdapterEvents;
|
|
33
|
+
private refreshApiCallEventStats;
|
|
34
|
+
private lastRefreshApiCall;
|
|
35
|
+
private weakEtagZeroEvents;
|
|
36
|
+
private adapterCacheMisses;
|
|
37
|
+
constructor();
|
|
38
|
+
/**
|
|
39
|
+
* Instruments an existing adapter to log argus metrics and cache stats.
|
|
40
|
+
* @param adapter The adapter function.
|
|
41
|
+
* @param metadata The adapter metadata.
|
|
42
|
+
* @param wireConfigKeyFn Optional function to transform wire configs to a unique key.
|
|
43
|
+
* @returns The wrapped adapter.
|
|
44
|
+
*/
|
|
45
|
+
instrumentAdapter<C, D>(adapter: Adapter<C, D>, metadata: AdapterMetadata): Adapter<C, D>;
|
|
46
|
+
/**
|
|
47
|
+
* Logs when adapter requests come in. If we have subsequent cache misses on a given config, beyond its TTL then log the duration to metrics.
|
|
48
|
+
* Backed by an LRU Cache implementation to prevent too many record entries from being stored in-memory.
|
|
49
|
+
* @param name The wire adapter name.
|
|
50
|
+
* @param config The config passed into wire adapter.
|
|
51
|
+
* @param ttlMissStats CacheStatsLogger to log misses out of TTL.
|
|
52
|
+
* @param currentCacheMissTimestamp Timestamp for when the request was made.
|
|
53
|
+
* @param ttl TTL for the wire adapter.
|
|
54
|
+
*/
|
|
55
|
+
private logAdapterCacheMissOutOfTtlDuration;
|
|
56
|
+
/**
|
|
57
|
+
* Injected to LDS for Luvio specific instrumentation.
|
|
58
|
+
*
|
|
59
|
+
* @param context The transaction context.
|
|
60
|
+
*/
|
|
61
|
+
instrumentLuvio(context: unknown): void;
|
|
62
|
+
/**
|
|
63
|
+
* Returns whether or not this is a RefreshAdapterEvent.
|
|
64
|
+
* @param context The transaction context.
|
|
65
|
+
* @returns Whether or not this is a RefreshAdapterEvent.
|
|
66
|
+
*/
|
|
67
|
+
private isRefreshAdapterEvent;
|
|
68
|
+
/**
|
|
69
|
+
* Returns whether or not this is an AdapterUnfulfilledError.
|
|
70
|
+
* @param context The transaction context.
|
|
71
|
+
* @returns Whether or not this is an AdapterUnfulfilledError.
|
|
72
|
+
*/
|
|
73
|
+
private isAdapterUnfulfilledError;
|
|
74
|
+
/**
|
|
75
|
+
* Specific instrumentation for getRecordNotifyChange.
|
|
76
|
+
* temporary implementation to match existing aura call for now
|
|
77
|
+
*
|
|
78
|
+
* @param uniqueWeakEtags whether weakEtags match or not
|
|
79
|
+
* @param error if dispatchResourceRequest fails for any reason
|
|
80
|
+
*/
|
|
81
|
+
notifyChangeNetwork(uniqueWeakEtags: boolean | null, error?: boolean): void;
|
|
82
|
+
/**
|
|
83
|
+
* Parses and aggregates weakETagZero events to be sent in summarized log line.
|
|
84
|
+
* @param context The transaction context.
|
|
85
|
+
*/
|
|
86
|
+
aggregateWeakETagEvents(incomingWeakEtagZero: boolean, existingWeakEtagZero: boolean, apiName: string): void;
|
|
87
|
+
/**
|
|
88
|
+
* Aggregates refresh adapter events to be sent in summarized log line.
|
|
89
|
+
* - how many times refreshApex is called
|
|
90
|
+
* - how many times refresh from lightning/uiRecordApi is called
|
|
91
|
+
* - number of supported calls: refreshApex called on apex adapter
|
|
92
|
+
* - number of unsupported calls: refreshApex on non-apex adapter
|
|
93
|
+
* + any use of refresh from uiRecordApi module
|
|
94
|
+
* - count of refresh calls per adapter
|
|
95
|
+
* @param context The refresh adapter event.
|
|
96
|
+
*/
|
|
97
|
+
private aggregateRefreshAdapterEvents;
|
|
98
|
+
/**
|
|
99
|
+
* Increments call stat for incoming refresh api call, and sets the name
|
|
100
|
+
* to be used in {@link aggregateRefreshCalls}
|
|
101
|
+
* @param from The name of the refresh function called.
|
|
102
|
+
*/
|
|
103
|
+
handleRefreshApiCall(apiName: keyof refreshApiNames): void;
|
|
104
|
+
/**
|
|
105
|
+
* W-7302241
|
|
106
|
+
* Logs refresh call summary stats as a LightningInteraction.
|
|
107
|
+
*/
|
|
108
|
+
logRefreshStats(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Resets the stat trackers for refresh call events.
|
|
111
|
+
*/
|
|
112
|
+
private resetRefreshStats;
|
|
113
|
+
/**
|
|
114
|
+
* W-7801618
|
|
115
|
+
* Counter for occurrences where the incoming record to be merged has a different apiName.
|
|
116
|
+
* Dynamically generated metric, stored in an {@link RecordApiNameChangeCounters} object.
|
|
117
|
+
*
|
|
118
|
+
* @param context The transaction context.
|
|
119
|
+
*
|
|
120
|
+
* Note: Short-lived metric candidate, remove at the end of 230
|
|
121
|
+
*/
|
|
122
|
+
incrementRecordApiNameChangeCount(_incomingApiName: string, existingApiName: string): void;
|
|
123
|
+
/**
|
|
124
|
+
* W-8620679
|
|
125
|
+
* Increment the counter for an UnfulfilledSnapshotError coming from luvio
|
|
126
|
+
*
|
|
127
|
+
* @param context The transaction context.
|
|
128
|
+
*/
|
|
129
|
+
private incrementAdapterRequestErrorCount;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Calls instrumentation/service interaction API. Function name and parameters mapped to `o11y`
|
|
133
|
+
* implementation for Log Lines.
|
|
134
|
+
* @param schema Expected shape of the payload (Currently unused)
|
|
135
|
+
* @param payload Content to be logged, shape matches schema
|
|
136
|
+
*/
|
|
137
|
+
export declare function log(_schema: any, payload: LightningInteractionSchema): void;
|
|
138
|
+
/**
|
|
139
|
+
* Calls instrumentation/service telemetry timer
|
|
140
|
+
* @param name Name of the metric
|
|
141
|
+
* @param duration number to update backing percentile histogram, negative numbers ignored
|
|
142
|
+
*/
|
|
143
|
+
export declare function updateTimerMetric(name: string, duration: number): void;
|
|
144
|
+
export declare function timerMetricAddDuration(timer: Timer, duration: number): void;
|
|
145
|
+
export declare function incrementRequestResponseCount(cb: () => FetchResponse<unknown>): void;
|
|
146
|
+
/**
|
|
147
|
+
* Add a mark to the metrics service.
|
|
148
|
+
*
|
|
149
|
+
* @param name The mark name.
|
|
150
|
+
* @param content The mark content.
|
|
151
|
+
*/
|
|
152
|
+
export declare function mark(name: string, content?: any): void;
|
|
153
|
+
/**
|
|
154
|
+
* Create a new instrumentation cache stats and return it.
|
|
155
|
+
*
|
|
156
|
+
* @param name The cache logger name.
|
|
157
|
+
*/
|
|
158
|
+
export declare function registerLdsCacheStats(name: string): CacheStatsLogger;
|
|
159
|
+
/**
|
|
160
|
+
* Add or overwrite hooks that require aura implementations
|
|
161
|
+
*/
|
|
162
|
+
export declare function setAuraInstrumentationHooks(): void;
|
|
163
|
+
/**
|
|
164
|
+
* Initialize the instrumentation and instrument the LDS instance and the InMemoryStore.
|
|
165
|
+
*
|
|
166
|
+
* @param luvio The Luvio instance to instrument.
|
|
167
|
+
* @param store The InMemoryStore to instrument.
|
|
168
|
+
*/
|
|
169
|
+
export declare function setupInstrumentation(luvio: Luvio, store: InMemoryStore): void;
|
|
170
|
+
/**
|
|
171
|
+
* Note: locator.scope is set to 'force_record' in order for the instrumentation gate to work, which will
|
|
172
|
+
* disable all crud operations if it is on.
|
|
173
|
+
* @param eventSource - Source of the logging event.
|
|
174
|
+
* @param attributes - Free form object of attributes to log.
|
|
175
|
+
*/
|
|
176
|
+
export declare function logCRUDLightningInteraction(eventSource: string, attributes: object): void;
|
|
177
|
+
export declare const instrumentation: Instrumentation;
|
|
178
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare const create: {
|
|
2
|
-
(o: object | null): any;
|
|
3
|
-
(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
|
|
4
|
-
}, keys: {
|
|
5
|
-
(o: object): string[];
|
|
6
|
-
(o: {}): string[];
|
|
7
|
-
};
|
|
8
|
-
declare const isArray: (arg: any) => arg is any[];
|
|
9
|
-
declare const stringify: {
|
|
10
|
-
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
|
|
11
|
-
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
|
|
12
|
-
};
|
|
13
|
-
export { create as ObjectCreate, keys as ObjectKeys, isArray as ArrayIsArray, stringify as JSONStringify, };
|
|
1
|
+
declare const create: {
|
|
2
|
+
(o: object | null): any;
|
|
3
|
+
(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
|
|
4
|
+
}, keys: {
|
|
5
|
+
(o: object): string[];
|
|
6
|
+
(o: {}): string[];
|
|
7
|
+
};
|
|
8
|
+
declare const isArray: (arg: any) => arg is any[];
|
|
9
|
+
declare const stringify: {
|
|
10
|
+
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
|
|
11
|
+
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
|
|
12
|
+
};
|
|
13
|
+
export { create as ObjectCreate, keys as ObjectKeys, isArray as ArrayIsArray, stringify as JSONStringify, };
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Observability / Critical Availability Program (230+)
|
|
3
|
-
*
|
|
4
|
-
* This file is intended to be used as a consolidated place for all definitions, functions,
|
|
5
|
-
* and helpers related to "M1"[1].
|
|
6
|
-
*
|
|
7
|
-
* Below are the R.E.A.D.S. metrics for the Lightning Data Service, defined here[2].
|
|
8
|
-
*
|
|
9
|
-
* [1] https://salesforce.quip.com/NfW9AsbGEaTY
|
|
10
|
-
* [2] https://salesforce.quip.com/1dFvAba1b0eq
|
|
11
|
-
*/
|
|
12
|
-
import type { MetricsKey } from 'instrumentation/service';
|
|
13
|
-
export declare const OBSERVABILITY_NAMESPACE = "LIGHTNING.lds.service";
|
|
14
|
-
export declare const ADAPTER_INVOCATION_COUNT_METRIC_NAME = "request";
|
|
15
|
-
export declare const ADAPTER_ERROR_COUNT_METRIC_NAME = "error";
|
|
16
|
-
export declare const NETWORK_ADAPTER_RESPONSE_METRIC_NAME = "network-response";
|
|
17
|
-
/**
|
|
18
|
-
* W-8379680
|
|
19
|
-
* Counter for number of getApex requests.
|
|
20
|
-
*/
|
|
21
|
-
export declare const GET_APEX_REQUEST_COUNT: MetricsKey;
|
|
22
|
-
/**
|
|
23
|
-
* W-8379680
|
|
24
|
-
* Counter for number of getApex errors.
|
|
25
|
-
*/
|
|
26
|
-
export declare const GET_APEX_ERROR_COUNT: MetricsKey;
|
|
27
|
-
/**
|
|
28
|
-
* W-8828410
|
|
29
|
-
* Counter for the number of UnfulfilledSnapshotErrors the luvio engine has.
|
|
30
|
-
*/
|
|
31
|
-
export declare const TOTAL_ADAPTER_ERROR_COUNT: MetricsKey;
|
|
32
|
-
/**
|
|
33
|
-
* W-8828410
|
|
34
|
-
* Counter for the number of invocations made into LDS by a wire adapter.
|
|
35
|
-
*/
|
|
36
|
-
export declare const TOTAL_ADAPTER_REQUEST_SUCCESS_COUNT: MetricsKey;
|
|
1
|
+
/**
|
|
2
|
+
* Observability / Critical Availability Program (230+)
|
|
3
|
+
*
|
|
4
|
+
* This file is intended to be used as a consolidated place for all definitions, functions,
|
|
5
|
+
* and helpers related to "M1"[1].
|
|
6
|
+
*
|
|
7
|
+
* Below are the R.E.A.D.S. metrics for the Lightning Data Service, defined here[2].
|
|
8
|
+
*
|
|
9
|
+
* [1] https://salesforce.quip.com/NfW9AsbGEaTY
|
|
10
|
+
* [2] https://salesforce.quip.com/1dFvAba1b0eq
|
|
11
|
+
*/
|
|
12
|
+
import type { MetricsKey } from 'instrumentation/service';
|
|
13
|
+
export declare const OBSERVABILITY_NAMESPACE = "LIGHTNING.lds.service";
|
|
14
|
+
export declare const ADAPTER_INVOCATION_COUNT_METRIC_NAME = "request";
|
|
15
|
+
export declare const ADAPTER_ERROR_COUNT_METRIC_NAME = "error";
|
|
16
|
+
export declare const NETWORK_ADAPTER_RESPONSE_METRIC_NAME = "network-response";
|
|
17
|
+
/**
|
|
18
|
+
* W-8379680
|
|
19
|
+
* Counter for number of getApex requests.
|
|
20
|
+
*/
|
|
21
|
+
export declare const GET_APEX_REQUEST_COUNT: MetricsKey;
|
|
22
|
+
/**
|
|
23
|
+
* W-8379680
|
|
24
|
+
* Counter for number of getApex errors.
|
|
25
|
+
*/
|
|
26
|
+
export declare const GET_APEX_ERROR_COUNT: MetricsKey;
|
|
27
|
+
/**
|
|
28
|
+
* W-8828410
|
|
29
|
+
* Counter for the number of UnfulfilledSnapshotErrors the luvio engine has.
|
|
30
|
+
*/
|
|
31
|
+
export declare const TOTAL_ADAPTER_ERROR_COUNT: MetricsKey;
|
|
32
|
+
/**
|
|
33
|
+
* W-8828410
|
|
34
|
+
* Counter for the number of invocations made into LDS by a wire adapter.
|
|
35
|
+
*/
|
|
36
|
+
export declare const TOTAL_ADAPTER_REQUEST_SUCCESS_COUNT: MetricsKey;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
|
|
3
|
-
* This is needed because insertion order for JSON.stringify(object) affects output:
|
|
4
|
-
* JSON.stringify({a: 1, b: 2})
|
|
5
|
-
* "{"a":1,"b":2}"
|
|
6
|
-
* JSON.stringify({b: 2, a: 1})
|
|
7
|
-
* "{"b":2,"a":1}"
|
|
8
|
-
* Modified from the apex implementation to sort arrays non-destructively.
|
|
9
|
-
* @param data Data to be JSON-stringified.
|
|
10
|
-
* @returns JSON.stringified value with consistent ordering of keys.
|
|
11
|
-
*/
|
|
12
|
-
export declare function stableJSONStringify(node: any): string | undefined;
|
|
13
|
-
export declare function isPromise<D>(value: D | Promise<D> | null): value is Promise<D>;
|
|
1
|
+
/**
|
|
2
|
+
* A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
|
|
3
|
+
* This is needed because insertion order for JSON.stringify(object) affects output:
|
|
4
|
+
* JSON.stringify({a: 1, b: 2})
|
|
5
|
+
* "{"a":1,"b":2}"
|
|
6
|
+
* JSON.stringify({b: 2, a: 1})
|
|
7
|
+
* "{"b":2,"a":1}"
|
|
8
|
+
* Modified from the apex implementation to sort arrays non-destructively.
|
|
9
|
+
* @param data Data to be JSON-stringified.
|
|
10
|
+
* @returns JSON.stringified value with consistent ordering of keys.
|
|
11
|
+
*/
|
|
12
|
+
export declare function stableJSONStringify(node: any): string | undefined;
|
|
13
|
+
export declare function isPromise<D>(value: D | Promise<D> | null): value is Promise<D>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare function initializeLDS(): void;
|
|
2
|
-
declare function ldsEngineCreator(): {
|
|
3
|
-
name: string;
|
|
4
|
-
};
|
|
5
|
-
export default ldsEngineCreator;
|
|
1
|
+
export declare function initializeLDS(): void;
|
|
2
|
+
declare function ldsEngineCreator(): {
|
|
3
|
+
name: string;
|
|
4
|
+
};
|
|
5
|
+
export default ldsEngineCreator;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Luvio } from '@luvio/engine';
|
|
2
|
-
/**
|
|
3
|
-
* Watch a Luvio instance for metadata changes.
|
|
4
|
-
*/
|
|
5
|
-
export declare function setupMetadataWatcher(luvio: Luvio): void;
|
|
1
|
+
import type { Luvio } from '@luvio/engine';
|
|
2
|
+
/**
|
|
3
|
+
* Watch a Luvio instance for metadata changes.
|
|
4
|
+
*/
|
|
5
|
+
export declare function setupMetadataWatcher(luvio: Luvio): void;
|