silverwolf-x/project / packages /next /src /client /tracing /report-to-socket.ts
silverwolf-x's picture
download
raw
453 Bytes
import { sendMessage } from '../dev/hot-reloader/pages/websocket'
import type { Span } from './tracer'
export default function reportToSocket(span: Span) {
if (span.state.state !== 'ended') {
throw new Error('Expected span to be ended')
}
sendMessage(
JSON.stringify({
event: 'span-end',
startTime: span.startTime,
endTime: span.state.endTime,
spanName: span.name,
attributes: span.attributes,
})
)
}

Xet Storage Details

Size:
453 Bytes
·
Xet hash:
26a24873261211ac56b0ff036e68bb22ba53b5d909a15688761083081d116f6a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.