Skip to content

Commit dcbc2ee

Browse files
authored
refactor(tracing): rename tracing channel .fetch to .request (#1294)
1 parent 54e722e commit dcbc2ee

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/tracing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function tracingPlugin(traceOpts?: TracingPluginOptions): H3Plugin {
4040
return;
4141
}
4242

43-
const requestHandlerChannel = tracingChannel("h3.fetch");
43+
const requestHandlerChannel = tracingChannel("h3.request");
4444

4545
function wrapMiddleware(middleware: MaybeTracedMiddleware): Middleware {
4646
if (middleware.__traced__ || traceOpts?.traceMiddleware === false) {

test/tracing.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type TracingEvent = {
1616
function createTracingListener() {
1717
const events: TracingEvent[] = [];
1818

19-
const tracingCh = tracingChannel("h3.fetch");
19+
const tracingCh = tracingChannel("h3.request");
2020

2121
const startHandler = (message: any) => {
2222
events.push({ start: { data: message } });
@@ -121,7 +121,7 @@ describeMatrix(
121121
}
122122
});
123123

124-
it("tracing:h3.fetch:asyncStart/asyncEnd fire for async handlers", async () => {
124+
it("tracing:h3.request:asyncStart/asyncEnd fire for async handlers", async () => {
125125
const listener = createTracingListener();
126126

127127
try {
@@ -151,7 +151,7 @@ describeMatrix(
151151
}
152152
});
153153

154-
it("tracing:h3.fetch:error fires when handler throws", async () => {
154+
it("tracing:h3.request:error fires when handler throws", async () => {
155155
const listener = createTracingListener();
156156

157157
// Disable the test error handler so we can see the tracing error event

0 commit comments

Comments
 (0)