Skip to content

Commit 4e1a2a3

Browse files
committed
add request ID to RPC handler spans for trace correlation
Include rpc.request_id attribute in the rpc.* telemetry span so client-reported request IDs can be matched to server-side traces.
1 parent 27648d3 commit 4e1a2a3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎packages/server/rpc/handler.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export async function handleRpcRequest(
131131
const result = await span(`rpc.${rpcRequest.method}`, {
132132
attributes: {
133133
"rpc.method": rpcRequest.method,
134+
"rpc.request_id": String(requestId),
134135
},
135136
callback: async () => {
136137
const handlerContext: HandlerContext = {

0 commit comments

Comments
 (0)