Skip to content

Commit a45f578

Browse files
committed
Refactor OpenTelemetry imports and streamline index exports
Signed-off-by: Avi Fenesh <aviarchi1994@gmail.com>
1 parent 102a504 commit a45f578

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

node/src/BaseClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import {
1616
DEFAULT_REQUEST_TIMEOUT_IN_MILLISECONDS,
1717
Script,
1818
StartSocketConnection,
19+
createLeakedOtelSpan,
20+
dropOtelSpan,
1921
getStatistics,
2022
valueFromSplitPointer,
2123
} from "../build-ts/native";
@@ -261,7 +263,6 @@ import {
261263
Routes,
262264
} from "./GlideClusterClient";
263265
import { Logger } from "./Logger";
264-
import { createLeakedOtelSpan, dropOtelSpan } from "./native";
265266
import { OpenTelemetry } from "./OpenTelemetry";
266267

267268
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */

node/src/OpenTelemetry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* - Invalid configuration will throw an error synchronously when calling `OpenTelemetry.init()`.
3535
*/
3636

37-
import { InitOpenTelemetry, OpenTelemetryConfig } from "glide-rs";
37+
import { InitOpenTelemetry, OpenTelemetryConfig } from "../build-ts/native";
3838
import { ConfigurationError } from "./Errors";
3939
import { Logger } from "./Logger";
4040

node/src/index.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,8 @@
66
* - All TypeScript client-side APIs from ./src/
77
*/
88

9-
import * as Native from "../build-ts/native";
109

11-
export const {
12-
Level,
13-
MAX_REQUEST_ARGS_LEN,
14-
DEFAULT_REQUEST_TIMEOUT_IN_MILLISECONDS,
15-
DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS,
16-
DEFAULT_INFLIGHT_REQUESTS_LIMIT,
17-
AsyncClient,
18-
StartSocketConnection,
19-
log,
20-
InitInternalLogger,
21-
valueFromSplitPointer,
22-
createLeakedStringVec,
23-
Script,
24-
ClusterScanCursor,
25-
getStatistics,
26-
} = Native;
10+
export * from "../build-ts/native";
2711

2812
// Export TypeScript APIs
2913
export * from "./BaseClient.js";

0 commit comments

Comments
 (0)