fix(metrics): fix metrics
This commit is contained in:
@ -1114,14 +1114,9 @@ export class RouteConnectionHandler {
|
||||
|
||||
// Store initial data if provided
|
||||
if (initialChunk) {
|
||||
record.bytesReceived += initialChunk.length;
|
||||
// Don't count bytes here - they will be counted when actually forwarded through bidirectional forwarding
|
||||
record.pendingData.push(Buffer.from(initialChunk));
|
||||
record.pendingDataSize = initialChunk.length;
|
||||
|
||||
// Record bytes for metrics
|
||||
if (this.smartProxy.metricsCollector) {
|
||||
this.smartProxy.metricsCollector.recordBytes(record.id, initialChunk.length, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Create the target socket with immediate error handling
|
||||
|
Reference in New Issue
Block a user