Skip to content

Commit 0635ad5

Browse files
committed
Fix use of deprecated Buffer constructor
1 parent 5d1d7e0 commit 0635ad5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/trace/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export function sendXraySubsegment(segment: string) {
162162
const port = parseInt(parts[1], 10);
163163
const address = parts[0];
164164

165-
const message = new Buffer(`{\"format\": \"json\", \"version\": 1}\n${segment}`);
165+
const message = Buffer.from(`{\"format\": \"json\", \"version\": 1}\n${segment}`);
166166
let client: Socket | undefined;
167167
try {
168168
client = createSocket("udp4");

0 commit comments

Comments
 (0)