@replit/river 0.19.3 → 0.20.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/{chunk-2Z2NE47H.js → chunk-5WFL722S.js} +15 -2
- package/dist/chunk-5WFL722S.js.map +1 -0
- package/dist/{chunk-LDCCELCJ.js → chunk-HGBAUTIW.js} +2 -2
- package/dist/{chunk-QZD2UTDJ.js → chunk-NYOK5VKK.js} +383 -245
- package/dist/chunk-NYOK5VKK.js.map +1 -0
- package/dist/{chunk-SLYSDRLE.js → chunk-YB5LRYL6.js} +517 -260
- package/dist/chunk-YB5LRYL6.js.map +1 -0
- package/dist/{chunk-YHKIWQOC.js → chunk-ZIWOHAQM.js} +2 -2
- package/dist/{connection-cfec12e6.d.ts → connection-d49d5d56.d.ts} +1 -1
- package/dist/{connection-aa0ea000.d.ts → connection-dba95bc8.d.ts} +1 -1
- package/dist/{index-e2513701.d.ts → index-3ac92295.d.ts} +12 -0
- package/dist/logging/index.d.cts +1 -1
- package/dist/logging/index.d.ts +1 -1
- package/dist/router/index.cjs +514 -257
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +4 -4
- package/dist/router/index.d.ts +4 -4
- package/dist/router/index.js +2 -2
- package/dist/{services-5fc5712d.d.ts → services-8496d6e8.d.ts} +1 -1
- package/dist/{services-4bba42d8.d.ts → services-abc077db.d.ts} +1 -1
- package/dist/transport/impls/uds/client.cjs +150 -74
- package/dist/transport/impls/uds/client.cjs.map +1 -1
- package/dist/transport/impls/uds/client.d.cts +2 -2
- package/dist/transport/impls/uds/client.d.ts +2 -2
- package/dist/transport/impls/uds/client.js +3 -3
- package/dist/transport/impls/uds/server.cjs +249 -169
- package/dist/transport/impls/uds/server.cjs.map +1 -1
- package/dist/transport/impls/uds/server.d.cts +2 -2
- package/dist/transport/impls/uds/server.d.ts +2 -2
- package/dist/transport/impls/uds/server.js +3 -3
- package/dist/transport/impls/ws/client.cjs +150 -74
- package/dist/transport/impls/ws/client.cjs.map +1 -1
- package/dist/transport/impls/ws/client.d.cts +2 -2
- package/dist/transport/impls/ws/client.d.ts +2 -2
- package/dist/transport/impls/ws/client.js +3 -3
- package/dist/transport/impls/ws/server.cjs +249 -169
- package/dist/transport/impls/ws/server.cjs.map +1 -1
- package/dist/transport/impls/ws/server.d.cts +2 -2
- package/dist/transport/impls/ws/server.d.ts +2 -2
- package/dist/transport/impls/ws/server.js +3 -3
- package/dist/transport/index.cjs +387 -243
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.d.cts +3 -2
- package/dist/transport/index.d.ts +3 -2
- package/dist/transport/index.js +2 -2
- package/dist/util/testHelpers.cjs +1 -0
- package/dist/util/testHelpers.cjs.map +1 -1
- package/dist/util/testHelpers.d.cts +2 -2
- package/dist/util/testHelpers.d.ts +2 -2
- package/dist/util/testHelpers.js +3 -3
- package/package.json +2 -1
- package/dist/chunk-2Z2NE47H.js.map +0 -1
- package/dist/chunk-QZD2UTDJ.js.map +0 -1
- package/dist/chunk-SLYSDRLE.js.map +0 -1
- /package/dist/{chunk-LDCCELCJ.js.map → chunk-HGBAUTIW.js.map} +0 -0
- /package/dist/{chunk-YHKIWQOC.js.map → chunk-ZIWOHAQM.js.map} +0 -0
package/dist/router/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError, S as ServiceContext } from '../services-
|
|
2
|
-
export { C as Client, E as Err, O as Ok, B as Output, k as ProcErrors, g as ProcHandler, h as ProcInit, i as ProcInput, j as ProcOutput, l as ProcType, a as Procedure, o as ProcedureMap, d as ProcedureResult, p as RPCProcedure, z as ResultUnwrapErr, y as ResultUnwrapOk, x as RiverErrorSchema, c as RiverUncaughtSchema, n as SerializedServerSchema, e as Service, f as ServiceConfiguration, u as ServiceContextWithState, v as ServiceContextWithTransportInfo, m as ServiceSchema, r as StreamProcedure, q as SubscriptionProcedure, w as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, t as createClient, s as serializeSchema } from '../services-
|
|
1
|
+
import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError, S as ServiceContext } from '../services-abc077db.js';
|
|
2
|
+
export { C as Client, E as Err, O as Ok, B as Output, k as ProcErrors, g as ProcHandler, h as ProcInit, i as ProcInput, j as ProcOutput, l as ProcType, a as Procedure, o as ProcedureMap, d as ProcedureResult, p as RPCProcedure, z as ResultUnwrapErr, y as ResultUnwrapOk, x as RiverErrorSchema, c as RiverUncaughtSchema, n as SerializedServerSchema, e as Service, f as ServiceConfiguration, u as ServiceContextWithState, v as ServiceContextWithTransportInfo, m as ServiceSchema, r as StreamProcedure, q as SubscriptionProcedure, w as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, t as createClient, s as serializeSchema } from '../services-abc077db.js';
|
|
3
3
|
import { Static } from '@sinclair/typebox';
|
|
4
4
|
import { ServerTransport } from '../transport/index.cjs';
|
|
5
5
|
import { Pushable } from 'it-pushable';
|
|
6
|
-
import { C as Connection } from '../index-
|
|
6
|
+
import { C as Connection } from '../index-3ac92295.js';
|
|
7
7
|
import '../types-3e5768ec.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -36,6 +36,6 @@ interface ProcStream {
|
|
|
36
36
|
*/
|
|
37
37
|
declare function createServer<Services extends AnyServiceSchemaMap>(transport: ServerTransport<Connection>, services: Services, extendedContext?: Omit<ServiceContext, 'state'>): Server<Services>;
|
|
38
38
|
|
|
39
|
-
var version = "0.
|
|
39
|
+
var version = "0.20.0";
|
|
40
40
|
|
|
41
41
|
export { PayloadType, version as RIVER_VERSION, Result, RiverError, Server, ServiceContext, createServer };
|
package/dist/router/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError, S as ServiceContext } from '../services-
|
|
2
|
-
export { C as Client, E as Err, O as Ok, B as Output, k as ProcErrors, g as ProcHandler, h as ProcInit, i as ProcInput, j as ProcOutput, l as ProcType, a as Procedure, o as ProcedureMap, d as ProcedureResult, p as RPCProcedure, z as ResultUnwrapErr, y as ResultUnwrapOk, x as RiverErrorSchema, c as RiverUncaughtSchema, n as SerializedServerSchema, e as Service, f as ServiceConfiguration, u as ServiceContextWithState, v as ServiceContextWithTransportInfo, m as ServiceSchema, r as StreamProcedure, q as SubscriptionProcedure, w as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, t as createClient, s as serializeSchema } from '../services-
|
|
1
|
+
import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError, S as ServiceContext } from '../services-8496d6e8.js';
|
|
2
|
+
export { C as Client, E as Err, O as Ok, B as Output, k as ProcErrors, g as ProcHandler, h as ProcInit, i as ProcInput, j as ProcOutput, l as ProcType, a as Procedure, o as ProcedureMap, d as ProcedureResult, p as RPCProcedure, z as ResultUnwrapErr, y as ResultUnwrapOk, x as RiverErrorSchema, c as RiverUncaughtSchema, n as SerializedServerSchema, e as Service, f as ServiceConfiguration, u as ServiceContextWithState, v as ServiceContextWithTransportInfo, m as ServiceSchema, r as StreamProcedure, q as SubscriptionProcedure, w as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, t as createClient, s as serializeSchema } from '../services-8496d6e8.js';
|
|
3
3
|
import { Static } from '@sinclair/typebox';
|
|
4
4
|
import { ServerTransport } from '../transport/index.js';
|
|
5
5
|
import { Pushable } from 'it-pushable';
|
|
6
|
-
import { C as Connection } from '../index-
|
|
6
|
+
import { C as Connection } from '../index-3ac92295.js';
|
|
7
7
|
import '../types-3e5768ec.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -36,6 +36,6 @@ interface ProcStream {
|
|
|
36
36
|
*/
|
|
37
37
|
declare function createServer<Services extends AnyServiceSchemaMap>(transport: ServerTransport<Connection>, services: Services, extendedContext?: Omit<ServiceContext, 'state'>): Server<Services>;
|
|
38
38
|
|
|
39
|
-
var version = "0.
|
|
39
|
+
var version = "0.20.0";
|
|
40
40
|
|
|
41
41
|
export { PayloadType, version as RIVER_VERSION, Result, RiverError, Server, ServiceContext, createServer };
|
package/dist/router/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Static, TObject, TUnion, TString, TSchema, TNever, TLiteral } from '@sinclair/typebox';
|
|
2
2
|
import { ClientTransport } from './transport/index.js';
|
|
3
3
|
import { Pushable } from 'it-pushable';
|
|
4
|
-
import { C as Connection, T as TransportClientId, a as Session, b as ParsedHandshakeMetadata } from './index-
|
|
4
|
+
import { C as Connection, T as TransportClientId, a as Session, b as ParsedHandshakeMetadata } from './index-3ac92295.js';
|
|
5
5
|
|
|
6
6
|
type AsyncIter<T> = AsyncGenerator<T, T>;
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Static, TObject, TUnion, TString, TSchema, TNever, TLiteral } from '@sinclair/typebox';
|
|
2
2
|
import { ClientTransport } from './transport/index.cjs';
|
|
3
3
|
import { Pushable } from 'it-pushable';
|
|
4
|
-
import { C as Connection, T as TransportClientId, a as Session, b as ParsedHandshakeMetadata } from './index-
|
|
4
|
+
import { C as Connection, T as TransportClientId, a as Session, b as ParsedHandshakeMetadata } from './index-3ac92295.js';
|
|
5
5
|
|
|
6
6
|
type AsyncIter<T> = AsyncGenerator<T, T>;
|
|
7
7
|
/**
|
|
@@ -44,6 +44,12 @@ var TransportMessageSchema = (t) => import_typebox.Type.Object({
|
|
|
44
44
|
procedureName: import_typebox.Type.Optional(import_typebox.Type.String()),
|
|
45
45
|
streamId: import_typebox.Type.String(),
|
|
46
46
|
controlFlags: import_typebox.Type.Integer(),
|
|
47
|
+
tracing: import_typebox.Type.Optional(
|
|
48
|
+
import_typebox.Type.Object({
|
|
49
|
+
traceparent: import_typebox.Type.String(),
|
|
50
|
+
tracestate: import_typebox.Type.String()
|
|
51
|
+
})
|
|
52
|
+
),
|
|
47
53
|
payload: t
|
|
48
54
|
});
|
|
49
55
|
var ControlMessageAckSchema = import_typebox.Type.Object({
|
|
@@ -81,7 +87,7 @@ var ControlMessagePayloadSchema = import_typebox.Type.Union([
|
|
|
81
87
|
var OpaqueTransportMessageSchema = TransportMessageSchema(
|
|
82
88
|
import_typebox.Type.Unknown()
|
|
83
89
|
);
|
|
84
|
-
function handshakeRequestMessage(from, to, sessionId, metadata) {
|
|
90
|
+
function handshakeRequestMessage(from, to, sessionId, metadata, tracing) {
|
|
85
91
|
return {
|
|
86
92
|
id: (0, import_nanoid.nanoid)(),
|
|
87
93
|
from,
|
|
@@ -90,6 +96,7 @@ function handshakeRequestMessage(from, to, sessionId, metadata) {
|
|
|
90
96
|
ack: 0,
|
|
91
97
|
streamId: (0, import_nanoid.nanoid)(),
|
|
92
98
|
controlFlags: 0,
|
|
99
|
+
tracing,
|
|
93
100
|
payload: {
|
|
94
101
|
type: "HANDSHAKE_REQ",
|
|
95
102
|
protocolVersion: PROTOCOL_VERSION,
|
|
@@ -434,6 +441,7 @@ var UdsConnection = class extends Connection {
|
|
|
434
441
|
|
|
435
442
|
// transport/transport.ts
|
|
436
443
|
var import_value = require("@sinclair/typebox/value");
|
|
444
|
+
var import_api2 = require("@opentelemetry/api");
|
|
437
445
|
|
|
438
446
|
// transport/events.ts
|
|
439
447
|
var ProtocolError = {
|
|
@@ -469,6 +477,11 @@ var EventDispatcher = class {
|
|
|
469
477
|
}
|
|
470
478
|
};
|
|
471
479
|
|
|
480
|
+
// tracing/index.ts
|
|
481
|
+
var import_api = require("@opentelemetry/api");
|
|
482
|
+
var tracer = import_api.trace.getTracer("river");
|
|
483
|
+
var tracing_default = tracer;
|
|
484
|
+
|
|
472
485
|
// util/stringify.ts
|
|
473
486
|
function coerceErrorString(err) {
|
|
474
487
|
if (err instanceof Error) {
|
|
@@ -1028,82 +1041,142 @@ var ClientTransport = class extends Transport {
|
|
|
1028
1041
|
* @param to The client ID of the node to connect to.
|
|
1029
1042
|
*/
|
|
1030
1043
|
async connect(to) {
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
}
|
|
1053
|
-
log?.info(`attempting connection to ${to} (${backoffMs}ms backoff)`, {
|
|
1054
|
-
clientId: this.clientId,
|
|
1055
|
-
connectedTo: to
|
|
1056
|
-
});
|
|
1057
|
-
this.retryBudget.consumeBudget(to);
|
|
1058
|
-
reconnectPromise = sleep.then(() => {
|
|
1059
|
-
if (!canProceedWithConnection()) {
|
|
1060
|
-
throw new Error("transport state is no longer open");
|
|
1044
|
+
return tracing_default.startActiveSpan(
|
|
1045
|
+
"connect",
|
|
1046
|
+
{
|
|
1047
|
+
attributes: {
|
|
1048
|
+
component: "river",
|
|
1049
|
+
"span.kind": "client"
|
|
1050
|
+
},
|
|
1051
|
+
kind: import_api2.SpanKind.CLIENT
|
|
1052
|
+
},
|
|
1053
|
+
async (span) => {
|
|
1054
|
+
try {
|
|
1055
|
+
await this.connectAttempt(to);
|
|
1056
|
+
} catch (e) {
|
|
1057
|
+
if (e instanceof Error) {
|
|
1058
|
+
span.recordException(e);
|
|
1059
|
+
} else {
|
|
1060
|
+
span.recordException(coerceErrorString(e));
|
|
1061
|
+
}
|
|
1062
|
+
span.setStatus({ code: import_api2.SpanStatusCode.ERROR });
|
|
1063
|
+
} finally {
|
|
1064
|
+
span.end();
|
|
1061
1065
|
}
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1066
|
+
}
|
|
1067
|
+
);
|
|
1068
|
+
}
|
|
1069
|
+
async connectAttempt(to, attempt = 0) {
|
|
1070
|
+
const retry = await tracing_default.startActiveSpan(
|
|
1071
|
+
"connect",
|
|
1072
|
+
{
|
|
1073
|
+
attributes: {
|
|
1074
|
+
component: "river",
|
|
1075
|
+
"river.attempt": attempt,
|
|
1076
|
+
"span.kind": "client"
|
|
1077
|
+
},
|
|
1078
|
+
kind: import_api2.SpanKind.CLIENT
|
|
1079
|
+
},
|
|
1080
|
+
async (span) => {
|
|
1081
|
+
try {
|
|
1082
|
+
const canProceedWithConnection = () => this.state === "open";
|
|
1083
|
+
if (!canProceedWithConnection()) {
|
|
1084
|
+
log?.info(
|
|
1085
|
+
`transport state is no longer open, cancelling attempt to connect to ${to}`,
|
|
1086
|
+
{ clientId: this.clientId, connectedTo: to }
|
|
1087
|
+
);
|
|
1088
|
+
return false;
|
|
1089
|
+
}
|
|
1090
|
+
let reconnectPromise = this.inflightConnectionPromises.get(to);
|
|
1091
|
+
if (!reconnectPromise) {
|
|
1092
|
+
const budgetConsumed = this.retryBudget.getBudgetConsumed(to);
|
|
1093
|
+
if (!this.retryBudget.hasBudget(to)) {
|
|
1094
|
+
const errMsg = `tried to connect to ${to} but retry budget exceeded (more than ${budgetConsumed} attempts in the last ${this.retryBudget.totalBudgetRestoreTime}ms)`;
|
|
1095
|
+
log?.warn(errMsg, { clientId: this.clientId, connectedTo: to });
|
|
1096
|
+
this.protocolError(ProtocolError.RetriesExceeded, errMsg);
|
|
1097
|
+
return false;
|
|
1070
1098
|
}
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1099
|
+
let sleep = Promise.resolve();
|
|
1100
|
+
const backoffMs = this.retryBudget.getBackoffMs(to);
|
|
1101
|
+
if (backoffMs > 0) {
|
|
1102
|
+
sleep = new Promise((resolve) => setTimeout(resolve, backoffMs));
|
|
1103
|
+
}
|
|
1104
|
+
log?.info(
|
|
1105
|
+
`attempting connection to ${to} (${backoffMs}ms backoff)`,
|
|
1106
|
+
{
|
|
1107
|
+
clientId: this.clientId,
|
|
1108
|
+
connectedTo: to
|
|
1109
|
+
}
|
|
1110
|
+
);
|
|
1111
|
+
this.retryBudget.consumeBudget(to);
|
|
1112
|
+
reconnectPromise = sleep.then(() => {
|
|
1113
|
+
if (!canProceedWithConnection()) {
|
|
1114
|
+
throw new Error("transport state is no longer open");
|
|
1115
|
+
}
|
|
1116
|
+
}).then(() => this.createNewOutgoingConnection(to)).then((conn) => {
|
|
1117
|
+
if (!canProceedWithConnection()) {
|
|
1118
|
+
log?.info(
|
|
1119
|
+
`transport state is no longer open, closing pre-handshake connection to ${to}`,
|
|
1120
|
+
{
|
|
1121
|
+
clientId: this.clientId,
|
|
1122
|
+
connectedTo: to,
|
|
1123
|
+
connId: conn.debugId
|
|
1124
|
+
}
|
|
1125
|
+
);
|
|
1126
|
+
conn.close();
|
|
1127
|
+
throw new Error("transport state is no longer open");
|
|
1128
|
+
}
|
|
1129
|
+
return this.sendHandshake(to, conn).then((ok) => {
|
|
1130
|
+
if (!ok) {
|
|
1131
|
+
conn.close();
|
|
1132
|
+
throw new Error("failed to send handshake");
|
|
1133
|
+
}
|
|
1134
|
+
return conn;
|
|
1135
|
+
});
|
|
1136
|
+
});
|
|
1137
|
+
this.inflightConnectionPromises.set(to, reconnectPromise);
|
|
1138
|
+
} else {
|
|
1139
|
+
log?.info(
|
|
1140
|
+
`attempting connection to ${to} (reusing previous attempt)`,
|
|
1141
|
+
{
|
|
1142
|
+
clientId: this.clientId,
|
|
1143
|
+
connectedTo: to
|
|
1144
|
+
}
|
|
1145
|
+
);
|
|
1079
1146
|
}
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1147
|
+
try {
|
|
1148
|
+
await reconnectPromise;
|
|
1149
|
+
} catch (error) {
|
|
1150
|
+
this.inflightConnectionPromises.delete(to);
|
|
1151
|
+
const errStr = coerceErrorString(error);
|
|
1152
|
+
if (!this.reconnectOnConnectionDrop || !canProceedWithConnection()) {
|
|
1153
|
+
log?.warn(`connection to ${to} failed (${errStr})`, {
|
|
1154
|
+
clientId: this.clientId,
|
|
1155
|
+
connectedTo: to
|
|
1156
|
+
});
|
|
1157
|
+
} else {
|
|
1158
|
+
log?.warn(`connection to ${to} failed (${errStr}), retrying`, {
|
|
1159
|
+
clientId: this.clientId,
|
|
1160
|
+
connectedTo: to
|
|
1161
|
+
});
|
|
1162
|
+
return true;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
} catch (e) {
|
|
1166
|
+
if (e instanceof Error) {
|
|
1167
|
+
span.recordException(e);
|
|
1168
|
+
} else {
|
|
1169
|
+
span.recordException(coerceErrorString(e));
|
|
1170
|
+
}
|
|
1171
|
+
span.setStatus({ code: import_api2.SpanStatusCode.ERROR });
|
|
1172
|
+
} finally {
|
|
1173
|
+
span.end();
|
|
1174
|
+
}
|
|
1175
|
+
return false;
|
|
1106
1176
|
}
|
|
1177
|
+
);
|
|
1178
|
+
if (retry) {
|
|
1179
|
+
return this.connectAttempt(to, attempt + 1);
|
|
1107
1180
|
}
|
|
1108
1181
|
}
|
|
1109
1182
|
deleteSession(session) {
|
|
@@ -1111,6 +1184,8 @@ var ClientTransport = class extends Transport {
|
|
|
1111
1184
|
super.deleteSession(session);
|
|
1112
1185
|
}
|
|
1113
1186
|
async sendHandshake(to, conn) {
|
|
1187
|
+
const tracing = { traceparent: "", tracestate: "" };
|
|
1188
|
+
import_api2.propagation.inject(import_api2.context.active(), tracing);
|
|
1114
1189
|
let metadata;
|
|
1115
1190
|
if (this.options.handshake) {
|
|
1116
1191
|
metadata = await this.options.handshake.get();
|
|
@@ -1131,7 +1206,8 @@ var ClientTransport = class extends Transport {
|
|
|
1131
1206
|
this.clientId,
|
|
1132
1207
|
to,
|
|
1133
1208
|
session.id,
|
|
1134
|
-
metadata
|
|
1209
|
+
metadata,
|
|
1210
|
+
tracing
|
|
1135
1211
|
);
|
|
1136
1212
|
log?.debug(`sending handshake request to ${to}`, {
|
|
1137
1213
|
clientId: this.clientId,
|