@databricks/sql 1.12.0 → 1.14.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.
- package/dist/DBSQLClient.d.ts +13 -0
- package/dist/DBSQLClient.js +58 -1
- package/dist/DBSQLClient.js.map +1 -1
- package/dist/DBSQLOperation.d.ts +1 -0
- package/dist/DBSQLOperation.js +23 -2
- package/dist/DBSQLOperation.js.map +1 -1
- package/dist/DBSQLSession.js +5 -1
- package/dist/DBSQLSession.js.map +1 -1
- package/dist/connection/auth/tokenProvider/CachedTokenProvider.d.ts +37 -0
- package/dist/connection/auth/tokenProvider/CachedTokenProvider.js +79 -0
- package/dist/connection/auth/tokenProvider/CachedTokenProvider.js.map +1 -0
- package/dist/connection/auth/tokenProvider/ExternalTokenProvider.d.ts +28 -0
- package/dist/connection/auth/tokenProvider/ExternalTokenProvider.js +37 -0
- package/dist/connection/auth/tokenProvider/ExternalTokenProvider.js.map +1 -0
- package/dist/connection/auth/tokenProvider/FederationProvider.d.ts +57 -0
- package/dist/connection/auth/tokenProvider/FederationProvider.js +218 -0
- package/dist/connection/auth/tokenProvider/FederationProvider.js.map +1 -0
- package/dist/connection/auth/tokenProvider/ITokenProvider.d.ts +17 -0
- package/dist/connection/auth/tokenProvider/ITokenProvider.js +3 -0
- package/dist/connection/auth/tokenProvider/ITokenProvider.js.map +1 -0
- package/dist/connection/auth/tokenProvider/StaticTokenProvider.d.ts +24 -0
- package/dist/connection/auth/tokenProvider/StaticTokenProvider.js +43 -0
- package/dist/connection/auth/tokenProvider/StaticTokenProvider.js.map +1 -0
- package/dist/connection/auth/tokenProvider/Token.d.ts +75 -0
- package/dist/connection/auth/tokenProvider/Token.js +120 -0
- package/dist/connection/auth/tokenProvider/Token.js.map +1 -0
- package/dist/connection/auth/tokenProvider/TokenProviderAuthenticator.d.ts +21 -0
- package/dist/connection/auth/tokenProvider/TokenProviderAuthenticator.js +38 -0
- package/dist/connection/auth/tokenProvider/TokenProviderAuthenticator.js.map +1 -0
- package/dist/connection/auth/tokenProvider/index.d.ts +8 -0
- package/dist/connection/auth/tokenProvider/index.js +23 -0
- package/dist/connection/auth/tokenProvider/index.js.map +1 -0
- package/dist/connection/auth/tokenProvider/utils.d.ts +24 -0
- package/dist/connection/auth/tokenProvider/utils.js +83 -0
- package/dist/connection/auth/tokenProvider/utils.js.map +1 -0
- package/dist/contracts/IClientContext.d.ts +15 -0
- package/dist/contracts/IDBSQLClient.d.ts +24 -0
- package/dist/contracts/IDBSQLSession.d.ts +6 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/result/ArrowResultHandler.js +2 -2
- package/dist/result/ArrowResultHandler.js.map +1 -1
- package/dist/result/CloudFetchResultHandler.js +2 -2
- package/dist/result/CloudFetchResultHandler.js.map +1 -1
- package/dist/telemetry/CircuitBreaker.d.ts +73 -0
- package/dist/telemetry/CircuitBreaker.js +176 -0
- package/dist/telemetry/CircuitBreaker.js.map +1 -0
- package/dist/telemetry/DatabricksTelemetryExporter.d.ts +76 -0
- package/dist/telemetry/DatabricksTelemetryExporter.js +324 -0
- package/dist/telemetry/DatabricksTelemetryExporter.js.map +1 -0
- package/dist/telemetry/ExceptionClassifier.d.ts +48 -0
- package/dist/telemetry/ExceptionClassifier.js +112 -0
- package/dist/telemetry/ExceptionClassifier.js.map +1 -0
- package/dist/telemetry/FeatureFlagCache.d.ts +61 -0
- package/dist/telemetry/FeatureFlagCache.js +208 -0
- package/dist/telemetry/FeatureFlagCache.js.map +1 -0
- package/dist/telemetry/MetricsAggregator.d.ts +72 -0
- package/dist/telemetry/MetricsAggregator.js +375 -0
- package/dist/telemetry/MetricsAggregator.js.map +1 -0
- package/dist/telemetry/TelemetryClient.d.ts +41 -0
- package/dist/telemetry/TelemetryClient.js +64 -0
- package/dist/telemetry/TelemetryClient.js.map +1 -0
- package/dist/telemetry/TelemetryClientProvider.d.ts +67 -0
- package/dist/telemetry/TelemetryClientProvider.js +148 -0
- package/dist/telemetry/TelemetryClientProvider.js.map +1 -0
- package/dist/telemetry/TelemetryEventEmitter.d.ts +93 -0
- package/dist/telemetry/TelemetryEventEmitter.js +172 -0
- package/dist/telemetry/TelemetryEventEmitter.js.map +1 -0
- package/dist/telemetry/telemetryUtils.d.ts +56 -0
- package/dist/telemetry/telemetryUtils.js +222 -0
- package/dist/telemetry/telemetryUtils.js.map +1 -0
- package/dist/telemetry/types.d.ts +209 -0
- package/dist/telemetry/types.js +52 -0
- package/dist/telemetry/types.js.map +1 -0
- package/dist/telemetry/urlUtils.d.ts +22 -0
- package/dist/telemetry/urlUtils.js +35 -0
- package/dist/telemetry/urlUtils.js.map +1 -0
- package/dist/utils/agentDetector.d.ts +20 -0
- package/dist/utils/agentDetector.js +39 -0
- package/dist/utils/agentDetector.js.map +1 -0
- package/dist/utils/buildUserAgentString.js +7 -1
- package/dist/utils/buildUserAgentString.js.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/lz4.d.ts +2 -2
- package/dist/utils/lz4.js +13 -1
- package/dist/utils/lz4.js.map +1 -1
- package/dist/utils/queryTags.d.ts +12 -0
- package/dist/utils/queryTags.js +35 -0
- package/dist/utils/queryTags.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricsAggregator.js","sourceRoot":"","sources":["../../lib/telemetry/MetricsAggregator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAGH,4DAAqD;AACrD,mCAAwG;AAkBxG;;;;;;;GAOG;AACH,MAAqB,iBAAiB;IAqBpC,YAAoB,OAAuB,EAAU,QAAqC;;QAAtE,YAAO,GAAP,OAAO,CAAgB;QAAU,aAAQ,GAAR,QAAQ,CAA6B;QApBlF,qBAAgB,GAA2C,IAAI,GAAG,EAAE,CAA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AAC,CAAC,CAAC;YACL,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;YAEzB,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;SACzB;QAAC,OAAO,KAAU,EAAE;YACnB,MAAM,CAAC,GAAG,CAAC,uBAAQ,CAAC,KAAK,EAAE,4CAA4C,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;SACzF;IACH,CAAC;IAED,KAAK,CAAC,KAAK;QACT,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QAExC,IAAI;YACF,yEAAyE;YACzE,6DAA6D;YAC7D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YAEpB,IAAI,IAAI,CAAC,UAAU,EAAE;gBACnB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC/B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;aACxB;YAED,qFAAqF;YACrF,MAAM,mBAAmB,GAAG,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC;YAC9D,KAAK,MAAM,WAAW,IAAI,mBAAmB,EAAE;gBAC7C,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;aACrC;YAED,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACzB;QAAC,OAAO,KAAU,EAAE;YACnB,MAAM,CAAC,GAAG,CAAC,uBAAQ,CAAC,KAAK,EAAE,kCAAkC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;SAC/E;IACH,CAAC;CACF;AArYD,oCAqYC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Databricks Contributors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import IClientContext from '../contracts/IClientContext';
|
|
17
|
+
/**
|
|
18
|
+
* Telemetry client for a specific host.
|
|
19
|
+
* Managed by TelemetryClientProvider with reference counting.
|
|
20
|
+
* One client instance is shared across all connections to the same host.
|
|
21
|
+
*/
|
|
22
|
+
declare class TelemetryClient {
|
|
23
|
+
private context;
|
|
24
|
+
private host;
|
|
25
|
+
private closed;
|
|
26
|
+
constructor(context: IClientContext, host: string);
|
|
27
|
+
/**
|
|
28
|
+
* Gets the host associated with this client.
|
|
29
|
+
*/
|
|
30
|
+
getHost(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Checks if the client has been closed.
|
|
33
|
+
*/
|
|
34
|
+
isClosed(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Closes the telemetry client and releases resources.
|
|
37
|
+
* Should only be called by TelemetryClientProvider when reference count reaches zero.
|
|
38
|
+
*/
|
|
39
|
+
close(): void;
|
|
40
|
+
}
|
|
41
|
+
export default TelemetryClient;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2025 Databricks Contributors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const IDBSQLLogger_1 = require("../contracts/IDBSQLLogger");
|
|
19
|
+
/**
|
|
20
|
+
* Telemetry client for a specific host.
|
|
21
|
+
* Managed by TelemetryClientProvider with reference counting.
|
|
22
|
+
* One client instance is shared across all connections to the same host.
|
|
23
|
+
*/
|
|
24
|
+
class TelemetryClient {
|
|
25
|
+
constructor(context, host) {
|
|
26
|
+
this.context = context;
|
|
27
|
+
this.host = host;
|
|
28
|
+
this.closed = false;
|
|
29
|
+
const logger = context.getLogger();
|
|
30
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, `Created TelemetryClient for host: ${host}`);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Gets the host associated with this client.
|
|
34
|
+
*/
|
|
35
|
+
getHost() {
|
|
36
|
+
return this.host;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Checks if the client has been closed.
|
|
40
|
+
*/
|
|
41
|
+
isClosed() {
|
|
42
|
+
return this.closed;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Closes the telemetry client and releases resources.
|
|
46
|
+
* Should only be called by TelemetryClientProvider when reference count reaches zero.
|
|
47
|
+
*/
|
|
48
|
+
close() {
|
|
49
|
+
if (this.closed) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
this.context.getLogger().log(IDBSQLLogger_1.LogLevel.debug, `Closing TelemetryClient for host: ${this.host}`);
|
|
54
|
+
}
|
|
55
|
+
catch (_a) {
|
|
56
|
+
// swallow
|
|
57
|
+
}
|
|
58
|
+
finally {
|
|
59
|
+
this.closed = true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.default = TelemetryClient;
|
|
64
|
+
//# sourceMappingURL=TelemetryClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryClient.js","sourceRoot":"","sources":["../../lib/telemetry/TelemetryClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAGH,4DAAqD;AAErD;;;;GAIG;AACH,MAAM,eAAe;IAGnB,YAAoB,OAAuB,EAAU,IAAY;QAA7C,YAAO,GAAP,OAAO,CAAgB;QAAU,SAAI,GAAJ,IAAI,CAAQ;QAFzD,WAAM,GAAY,KAAK,CAAC;QAG9B,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;QACnC,MAAM,CAAC,GAAG,CAAC,uBAAQ,CAAC,KAAK,EAAE,qCAAqC,IAAI,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;OAGG;IACH,KAAK;QACH,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO;SACR;QACD,IAAI;YACF,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,uBAAQ,CAAC,KAAK,EAAE,qCAAqC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;SAChG;QAAC,WAAM;YACN,UAAU;SACX;gBAAS;YACR,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;SACpB;IACH,CAAC;CACF;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Databricks Contributors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import IClientContext from '../contracts/IClientContext';
|
|
17
|
+
import TelemetryClient from './TelemetryClient';
|
|
18
|
+
/**
|
|
19
|
+
* Manages one telemetry client per host.
|
|
20
|
+
* Prevents rate limiting by sharing clients across connections to the same host.
|
|
21
|
+
* Instance-based (not singleton), stored in DBSQLClient.
|
|
22
|
+
*
|
|
23
|
+
* Reference counts are incremented and decremented synchronously, and
|
|
24
|
+
* `close()` is sync today, so there is no await between map mutation and
|
|
25
|
+
* client teardown. The map entry is removed before `close()` runs so a
|
|
26
|
+
* concurrent `getOrCreateClient` call for the same host gets a fresh
|
|
27
|
+
* instance rather than receiving this closing one. When `close()` becomes
|
|
28
|
+
* async (e.g. HTTP flush in [5/7]) the flow will need to `await` after the
|
|
29
|
+
* delete to preserve the same invariant.
|
|
30
|
+
*/
|
|
31
|
+
declare class TelemetryClientProvider {
|
|
32
|
+
private context;
|
|
33
|
+
private clients;
|
|
34
|
+
private softLimitWarned;
|
|
35
|
+
constructor(context: IClientContext);
|
|
36
|
+
/**
|
|
37
|
+
* Canonicalize host so aliases (scheme, default port, trailing slash, case,
|
|
38
|
+
* trailing dot, surrounding whitespace) map to the same entry. Kept to a
|
|
39
|
+
* lightweight lexical normalization — `buildTelemetryUrl` still performs
|
|
40
|
+
* the strict security validation when a request is actually built.
|
|
41
|
+
*/
|
|
42
|
+
private static normalizeHostKey;
|
|
43
|
+
/**
|
|
44
|
+
* Gets or creates a telemetry client for the specified host.
|
|
45
|
+
* Increments the reference count for the client.
|
|
46
|
+
*
|
|
47
|
+
* @param host The host identifier (e.g., "workspace.cloud.databricks.com")
|
|
48
|
+
* @returns The telemetry client for the host
|
|
49
|
+
*/
|
|
50
|
+
getOrCreateClient(host: string): TelemetryClient;
|
|
51
|
+
/**
|
|
52
|
+
* Releases a telemetry client for the specified host.
|
|
53
|
+
* Decrements the reference count and closes the client when it reaches zero.
|
|
54
|
+
*
|
|
55
|
+
* @param host The host identifier
|
|
56
|
+
*/
|
|
57
|
+
releaseClient(host: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* @internal Exposed for testing only.
|
|
60
|
+
*/
|
|
61
|
+
getRefCount(host: string): number;
|
|
62
|
+
/**
|
|
63
|
+
* @internal Exposed for testing only.
|
|
64
|
+
*/
|
|
65
|
+
getActiveClients(): Map<string, TelemetryClient>;
|
|
66
|
+
}
|
|
67
|
+
export default TelemetryClientProvider;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2025 Databricks Contributors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
const IDBSQLLogger_1 = require("../contracts/IDBSQLLogger");
|
|
22
|
+
const TelemetryClient_1 = __importDefault(require("./TelemetryClient"));
|
|
23
|
+
// Soft cap on distinct host entries. Above this the provider warns once so a
|
|
24
|
+
// misconfigured caller (per-request hosts, unnormalized aliases) is visible in
|
|
25
|
+
// logs rather than silently growing the map.
|
|
26
|
+
const MAX_CLIENTS_SOFT_LIMIT = 128;
|
|
27
|
+
/**
|
|
28
|
+
* Manages one telemetry client per host.
|
|
29
|
+
* Prevents rate limiting by sharing clients across connections to the same host.
|
|
30
|
+
* Instance-based (not singleton), stored in DBSQLClient.
|
|
31
|
+
*
|
|
32
|
+
* Reference counts are incremented and decremented synchronously, and
|
|
33
|
+
* `close()` is sync today, so there is no await between map mutation and
|
|
34
|
+
* client teardown. The map entry is removed before `close()` runs so a
|
|
35
|
+
* concurrent `getOrCreateClient` call for the same host gets a fresh
|
|
36
|
+
* instance rather than receiving this closing one. When `close()` becomes
|
|
37
|
+
* async (e.g. HTTP flush in [5/7]) the flow will need to `await` after the
|
|
38
|
+
* delete to preserve the same invariant.
|
|
39
|
+
*/
|
|
40
|
+
class TelemetryClientProvider {
|
|
41
|
+
constructor(context) {
|
|
42
|
+
this.context = context;
|
|
43
|
+
this.softLimitWarned = false;
|
|
44
|
+
this.clients = new Map();
|
|
45
|
+
const logger = context.getLogger();
|
|
46
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, 'Created TelemetryClientProvider');
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Canonicalize host so aliases (scheme, default port, trailing slash, case,
|
|
50
|
+
* trailing dot, surrounding whitespace) map to the same entry. Kept to a
|
|
51
|
+
* lightweight lexical normalization — `buildTelemetryUrl` still performs
|
|
52
|
+
* the strict security validation when a request is actually built.
|
|
53
|
+
*/
|
|
54
|
+
static normalizeHostKey(host) {
|
|
55
|
+
return host
|
|
56
|
+
.trim()
|
|
57
|
+
.toLowerCase()
|
|
58
|
+
.replace(/^https?:\/\//, '')
|
|
59
|
+
.replace(/\/+$/, '')
|
|
60
|
+
.replace(/\.$/, '')
|
|
61
|
+
.replace(/:443$/, '');
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Gets or creates a telemetry client for the specified host.
|
|
65
|
+
* Increments the reference count for the client.
|
|
66
|
+
*
|
|
67
|
+
* @param host The host identifier (e.g., "workspace.cloud.databricks.com")
|
|
68
|
+
* @returns The telemetry client for the host
|
|
69
|
+
*/
|
|
70
|
+
getOrCreateClient(host) {
|
|
71
|
+
const logger = this.context.getLogger();
|
|
72
|
+
const key = TelemetryClientProvider.normalizeHostKey(host);
|
|
73
|
+
let holder = this.clients.get(key);
|
|
74
|
+
if (!holder) {
|
|
75
|
+
const client = new TelemetryClient_1.default(this.context, key);
|
|
76
|
+
holder = {
|
|
77
|
+
client,
|
|
78
|
+
refCount: 0,
|
|
79
|
+
};
|
|
80
|
+
this.clients.set(key, holder);
|
|
81
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, `Created new TelemetryClient for host: ${host}`);
|
|
82
|
+
if (!this.softLimitWarned && this.clients.size > MAX_CLIENTS_SOFT_LIMIT) {
|
|
83
|
+
this.softLimitWarned = true;
|
|
84
|
+
logger.log(IDBSQLLogger_1.LogLevel.warn, `TelemetryClientProvider has ${this.clients.size} distinct hosts — possible alias or leak`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
holder.refCount += 1;
|
|
88
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, `TelemetryClient reference count for ${host}: ${holder.refCount}`);
|
|
89
|
+
return holder.client;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Releases a telemetry client for the specified host.
|
|
93
|
+
* Decrements the reference count and closes the client when it reaches zero.
|
|
94
|
+
*
|
|
95
|
+
* @param host The host identifier
|
|
96
|
+
*/
|
|
97
|
+
releaseClient(host) {
|
|
98
|
+
const logger = this.context.getLogger();
|
|
99
|
+
const key = TelemetryClientProvider.normalizeHostKey(host);
|
|
100
|
+
const holder = this.clients.get(key);
|
|
101
|
+
if (!holder) {
|
|
102
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, `No TelemetryClient found for host: ${host}`);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
// Guard against double-release: a caller releasing more times than it got
|
|
106
|
+
// would otherwise drive refCount negative and close a client another
|
|
107
|
+
// caller is still holding. Warn loudly and refuse to decrement further.
|
|
108
|
+
if (holder.refCount <= 0) {
|
|
109
|
+
logger.log(IDBSQLLogger_1.LogLevel.warn, `Unbalanced release for TelemetryClient host: ${host}`);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
holder.refCount -= 1;
|
|
113
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, `TelemetryClient reference count for ${host}: ${holder.refCount}`);
|
|
114
|
+
// Close and remove client when reference count reaches zero.
|
|
115
|
+
// Remove from map before calling close so a concurrent getOrCreateClient
|
|
116
|
+
// creates a fresh client rather than receiving this closing one.
|
|
117
|
+
if (holder.refCount <= 0) {
|
|
118
|
+
this.clients.delete(key);
|
|
119
|
+
try {
|
|
120
|
+
holder.client.close();
|
|
121
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, `Closed and removed TelemetryClient for host: ${host}`);
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
125
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, `Error releasing TelemetryClient: ${msg}`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* @internal Exposed for testing only.
|
|
131
|
+
*/
|
|
132
|
+
getRefCount(host) {
|
|
133
|
+
const holder = this.clients.get(TelemetryClientProvider.normalizeHostKey(host));
|
|
134
|
+
return holder ? holder.refCount : 0;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @internal Exposed for testing only.
|
|
138
|
+
*/
|
|
139
|
+
getActiveClients() {
|
|
140
|
+
const result = new Map();
|
|
141
|
+
for (const [host, holder] of this.clients.entries()) {
|
|
142
|
+
result.set(host, holder.client);
|
|
143
|
+
}
|
|
144
|
+
return result;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
exports.default = TelemetryClientProvider;
|
|
148
|
+
//# sourceMappingURL=TelemetryClientProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryClientProvider.js","sourceRoot":"","sources":["../../lib/telemetry/TelemetryClientProvider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;AAGH,4DAAqD;AACrD,wEAAgD;AAWhD,6EAA6E;AAC7E,+EAA+E;AAC/E,6CAA6C;AAC7C,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAEnC;;;;;;;;;;;;GAYG;AACH,MAAM,uBAAuB;IAK3B,YAAoB,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;QAFnC,oBAAe,GAAG,KAAK,CAAC;QAG9B,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;QACnC,MAAM,CAAC,GAAG,CAAC,uBAAQ,CAAC,KAAK,EAAE,iCAAiC,CAAC,CAAC;IAChE,CAAC;IAED;;;;;OAKG;IACK,MAAM,CAAC,gBAAgB,CAAC,IAAY;QAC1C,OAAO,IAAI;aACR,IAAI,EAAE;aACN,WAAW,EAAE;aACb,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;aAC3B,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;aACnB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;aAClB,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC1B,CAAC;IAED;;;;;;OAMG;IACH,iBAAiB,CAAC,IAAY;QAC5B,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QACxC,MAAM,GAAG,GAAG,uBAAuB,CAAC,gBAAgB,CA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C;IACtC,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,MAAM,MAAM,GAAG,IAAI,GAAG,EAA2B,CAAC;QAClD,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YACnD,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;SACjC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAED,kBAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Databricks Contributors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/// <reference types="node" />
|
|
17
|
+
import { EventEmitter } from 'events';
|
|
18
|
+
import IClientContext from '../contracts/IClientContext';
|
|
19
|
+
import { DriverConfiguration } from './types';
|
|
20
|
+
/**
|
|
21
|
+
* EventEmitter for driver telemetry.
|
|
22
|
+
* Emits events at key driver operations.
|
|
23
|
+
*
|
|
24
|
+
* CRITICAL REQUIREMENT: ALL exceptions must be caught and logged at LogLevel.debug ONLY
|
|
25
|
+
* (never warn/error) to avoid customer anxiety. NO console logging allowed - only IDBSQLLogger.
|
|
26
|
+
*
|
|
27
|
+
* All emit methods are wrapped in try-catch blocks that swallow exceptions completely.
|
|
28
|
+
* Event emission respects the telemetryEnabled flag from context config.
|
|
29
|
+
*/
|
|
30
|
+
export default class TelemetryEventEmitter extends EventEmitter {
|
|
31
|
+
private context;
|
|
32
|
+
private enabled;
|
|
33
|
+
constructor(context: IClientContext);
|
|
34
|
+
/**
|
|
35
|
+
* Emit a connection open event.
|
|
36
|
+
*
|
|
37
|
+
* @param data Connection event data including sessionId, workspaceId, and driverConfig
|
|
38
|
+
*/
|
|
39
|
+
emitConnectionOpen(data: {
|
|
40
|
+
sessionId: string;
|
|
41
|
+
workspaceId: string;
|
|
42
|
+
driverConfig: DriverConfiguration;
|
|
43
|
+
}): void;
|
|
44
|
+
/**
|
|
45
|
+
* Emit a statement start event.
|
|
46
|
+
*
|
|
47
|
+
* @param data Statement start data including statementId, sessionId, and operationType
|
|
48
|
+
*/
|
|
49
|
+
emitStatementStart(data: {
|
|
50
|
+
statementId: string;
|
|
51
|
+
sessionId: string;
|
|
52
|
+
operationType?: string;
|
|
53
|
+
}): void;
|
|
54
|
+
/**
|
|
55
|
+
* Emit a statement complete event.
|
|
56
|
+
*
|
|
57
|
+
* @param data Statement completion data including latency, result format, and metrics
|
|
58
|
+
*/
|
|
59
|
+
emitStatementComplete(data: {
|
|
60
|
+
statementId: string;
|
|
61
|
+
sessionId: string;
|
|
62
|
+
latencyMs?: number;
|
|
63
|
+
resultFormat?: string;
|
|
64
|
+
chunkCount?: number;
|
|
65
|
+
bytesDownloaded?: number;
|
|
66
|
+
pollCount?: number;
|
|
67
|
+
}): void;
|
|
68
|
+
/**
|
|
69
|
+
* Emit a CloudFetch chunk download event.
|
|
70
|
+
*
|
|
71
|
+
* @param data CloudFetch chunk data including chunk index, latency, bytes, and compression
|
|
72
|
+
*/
|
|
73
|
+
emitCloudFetchChunk(data: {
|
|
74
|
+
statementId: string;
|
|
75
|
+
chunkIndex: number;
|
|
76
|
+
latencyMs?: number;
|
|
77
|
+
bytes: number;
|
|
78
|
+
compressed?: boolean;
|
|
79
|
+
}): void;
|
|
80
|
+
/**
|
|
81
|
+
* Emit an error event.
|
|
82
|
+
*
|
|
83
|
+
* @param data Error event data including error details and terminal status
|
|
84
|
+
*/
|
|
85
|
+
emitError(data: {
|
|
86
|
+
statementId?: string;
|
|
87
|
+
sessionId?: string;
|
|
88
|
+
errorName: string;
|
|
89
|
+
errorMessage: string;
|
|
90
|
+
errorStack?: string;
|
|
91
|
+
isTerminal: boolean;
|
|
92
|
+
}): void;
|
|
93
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2025 Databricks Contributors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const events_1 = require("events");
|
|
19
|
+
const IDBSQLLogger_1 = require("../contracts/IDBSQLLogger");
|
|
20
|
+
const types_1 = require("./types");
|
|
21
|
+
/**
|
|
22
|
+
* EventEmitter for driver telemetry.
|
|
23
|
+
* Emits events at key driver operations.
|
|
24
|
+
*
|
|
25
|
+
* CRITICAL REQUIREMENT: ALL exceptions must be caught and logged at LogLevel.debug ONLY
|
|
26
|
+
* (never warn/error) to avoid customer anxiety. NO console logging allowed - only IDBSQLLogger.
|
|
27
|
+
*
|
|
28
|
+
* All emit methods are wrapped in try-catch blocks that swallow exceptions completely.
|
|
29
|
+
* Event emission respects the telemetryEnabled flag from context config.
|
|
30
|
+
*/
|
|
31
|
+
class TelemetryEventEmitter extends events_1.EventEmitter {
|
|
32
|
+
constructor(context) {
|
|
33
|
+
var _a;
|
|
34
|
+
super();
|
|
35
|
+
this.context = context;
|
|
36
|
+
// Check if telemetry is enabled from config
|
|
37
|
+
// Default to false for safe rollout
|
|
38
|
+
const config = context.getConfig();
|
|
39
|
+
this.enabled = (_a = config.telemetryEnabled) !== null && _a !== void 0 ? _a : false;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Emit a connection open event.
|
|
43
|
+
*
|
|
44
|
+
* @param data Connection event data including sessionId, workspaceId, and driverConfig
|
|
45
|
+
*/
|
|
46
|
+
emitConnectionOpen(data) {
|
|
47
|
+
if (!this.enabled)
|
|
48
|
+
return;
|
|
49
|
+
const logger = this.context.getLogger();
|
|
50
|
+
try {
|
|
51
|
+
const event = {
|
|
52
|
+
eventType: types_1.TelemetryEventType.CONNECTION_OPEN,
|
|
53
|
+
timestamp: Date.now(),
|
|
54
|
+
sessionId: data.sessionId,
|
|
55
|
+
workspaceId: data.workspaceId,
|
|
56
|
+
driverConfig: data.driverConfig,
|
|
57
|
+
};
|
|
58
|
+
this.emit(types_1.TelemetryEventType.CONNECTION_OPEN, event);
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
// Swallow all exceptions - log at debug level only
|
|
62
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, `Error emitting connection event: ${error.message}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Emit a statement start event.
|
|
67
|
+
*
|
|
68
|
+
* @param data Statement start data including statementId, sessionId, and operationType
|
|
69
|
+
*/
|
|
70
|
+
emitStatementStart(data) {
|
|
71
|
+
if (!this.enabled)
|
|
72
|
+
return;
|
|
73
|
+
const logger = this.context.getLogger();
|
|
74
|
+
try {
|
|
75
|
+
const event = {
|
|
76
|
+
eventType: types_1.TelemetryEventType.STATEMENT_START,
|
|
77
|
+
timestamp: Date.now(),
|
|
78
|
+
statementId: data.statementId,
|
|
79
|
+
sessionId: data.sessionId,
|
|
80
|
+
operationType: data.operationType,
|
|
81
|
+
};
|
|
82
|
+
this.emit(types_1.TelemetryEventType.STATEMENT_START, event);
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
// Swallow all exceptions - log at debug level only
|
|
86
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, `Error emitting statement start: ${error.message}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Emit a statement complete event.
|
|
91
|
+
*
|
|
92
|
+
* @param data Statement completion data including latency, result format, and metrics
|
|
93
|
+
*/
|
|
94
|
+
emitStatementComplete(data) {
|
|
95
|
+
if (!this.enabled)
|
|
96
|
+
return;
|
|
97
|
+
const logger = this.context.getLogger();
|
|
98
|
+
try {
|
|
99
|
+
const event = {
|
|
100
|
+
eventType: types_1.TelemetryEventType.STATEMENT_COMPLETE,
|
|
101
|
+
timestamp: Date.now(),
|
|
102
|
+
statementId: data.statementId,
|
|
103
|
+
sessionId: data.sessionId,
|
|
104
|
+
latencyMs: data.latencyMs,
|
|
105
|
+
resultFormat: data.resultFormat,
|
|
106
|
+
chunkCount: data.chunkCount,
|
|
107
|
+
bytesDownloaded: data.bytesDownloaded,
|
|
108
|
+
pollCount: data.pollCount,
|
|
109
|
+
};
|
|
110
|
+
this.emit(types_1.TelemetryEventType.STATEMENT_COMPLETE, event);
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
// Swallow all exceptions - log at debug level only
|
|
114
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, `Error emitting statement complete: ${error.message}`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Emit a CloudFetch chunk download event.
|
|
119
|
+
*
|
|
120
|
+
* @param data CloudFetch chunk data including chunk index, latency, bytes, and compression
|
|
121
|
+
*/
|
|
122
|
+
emitCloudFetchChunk(data) {
|
|
123
|
+
if (!this.enabled)
|
|
124
|
+
return;
|
|
125
|
+
const logger = this.context.getLogger();
|
|
126
|
+
try {
|
|
127
|
+
const event = {
|
|
128
|
+
eventType: types_1.TelemetryEventType.CLOUDFETCH_CHUNK,
|
|
129
|
+
timestamp: Date.now(),
|
|
130
|
+
statementId: data.statementId,
|
|
131
|
+
chunkIndex: data.chunkIndex,
|
|
132
|
+
latencyMs: data.latencyMs,
|
|
133
|
+
bytes: data.bytes,
|
|
134
|
+
compressed: data.compressed,
|
|
135
|
+
};
|
|
136
|
+
this.emit(types_1.TelemetryEventType.CLOUDFETCH_CHUNK, event);
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
// Swallow all exceptions - log at debug level only
|
|
140
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, `Error emitting cloudfetch chunk: ${error.message}`);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Emit an error event.
|
|
145
|
+
*
|
|
146
|
+
* @param data Error event data including error details and terminal status
|
|
147
|
+
*/
|
|
148
|
+
emitError(data) {
|
|
149
|
+
if (!this.enabled)
|
|
150
|
+
return;
|
|
151
|
+
const logger = this.context.getLogger();
|
|
152
|
+
try {
|
|
153
|
+
const event = {
|
|
154
|
+
eventType: types_1.TelemetryEventType.ERROR,
|
|
155
|
+
timestamp: Date.now(),
|
|
156
|
+
statementId: data.statementId,
|
|
157
|
+
sessionId: data.sessionId,
|
|
158
|
+
errorName: data.errorName,
|
|
159
|
+
errorMessage: data.errorMessage,
|
|
160
|
+
errorStack: data.errorStack,
|
|
161
|
+
isTerminal: data.isTerminal,
|
|
162
|
+
};
|
|
163
|
+
this.emit(types_1.TelemetryEventType.ERROR, event);
|
|
164
|
+
}
|
|
165
|
+
catch (error) {
|
|
166
|
+
// Swallow all exceptions - log at debug level only
|
|
167
|
+
logger.log(IDBSQLLogger_1.LogLevel.debug, `Error emitting error event: ${error.message}`);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
exports.default = TelemetryEventEmitter;
|
|
172
|
+
//# sourceMappingURL=TelemetryEventEmitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryEventEmitter.js","sourceRoot":"","sources":["../../lib/telemetry/TelemetryEventEmitter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,mCAAsC;AAEtC,4DAAqD;AACrD,mCAAkF;AAElF;;;;;;;;;GASG;AACH,MAAqB,qBAAsB,SAAQ,qBAAY;IAG7D,YAAoB,OAAuB;;QACzC,KAAK,EAAE,CAAC;QADU,YAAO,GAAP,OAAO,CAAgB;QAEzC,4CAA4C;QAC5C,oCAAoC;QACpC,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,MAAA,MAAM,CAAC,gBAAgB,mCAAI,KAAK,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACH,kBAAkB,CAAC,IAAmF;QACpG,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO;QAE1B,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QACxC,IAAI;YACF,MAAM,KAAK,GAAmB;gBAC5B,SAAS,EAAE,0BAAkB,CAAC,eAAe;gBAC7C,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;gBACrB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;aAChC,CAAC;YACF,IAAI,CAAC,IAAI,CAAC,0BAAkB,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;SACtD;QAAC,OAAO,KAAU,EAAE;YACnB,mDAAmD;YACnD,MAAM,CAAC,GAAG,CAAC,uBAAQ,CAAC,KAAK,EAAE,oCAAoC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;SACjF;IACH,CA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