Skip to content

Commit cae896c

Browse files
committed
refactor: remove unused noop
1 parent 3e4418b commit cae896c

2 files changed

Lines changed: 0 additions & 16 deletions

File tree

packages/nitro/src/runtime/hooks/captureStorageEvents.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ function setupStorageTracingChannel(operation: TracedOperation): void {
7777
});
7878

7979
channel.subscribe({
80-
start() {},
81-
asyncStart() {},
82-
end() {},
8380
asyncEnd(data: TracingChannelContextWithSpan<TraceContext & { result?: unknown }>) {
8481
if (data._sentrySpan && CACHE_HIT_OPERATIONS.has(operation)) {
8582
data._sentrySpan.setAttribute(SEMANTIC_ATTRIBUTE_CACHE_HIT, isCacheHit(data.keys?.[0], data.result));

packages/nitro/src/runtime/hooks/captureTracingEvents.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ export function captureTracingEvents(): void {
4141
globalWithTraceChannels.__SENTRY_NITRO_HTTP_CHANNELS_INSTRUMENTED__ = true;
4242
}
4343

44-
/**
45-
* No-op function to satisfy the tracing channel subscribe callbacks
46-
*/
47-
const NOOP = (): void => {};
48-
4944
/**
5045
* Extracts the HTTP status code from a tracing channel result.
5146
* The result is the return value of the traced handler, which is a Response for srvx
@@ -126,8 +121,6 @@ function setupH3TracingChannels(): void {
126121
start: (data: H3TracingRequestEvent) => {
127122
setServerTimingHeaders(data.event);
128123
},
129-
asyncStart: NOOP,
130-
end: NOOP,
131124
asyncEnd: (data: TracingChannelContextWithSpan<H3TracingRequestEvent>) => {
132125
onTraceEnd(data);
133126

@@ -192,9 +185,6 @@ function setupSrvxTracingChannels(): void {
192185

193186
// Subscribe to events (span already created in bindStore)
194187
fetchChannel.subscribe({
195-
start: () => {},
196-
asyncStart: () => {},
197-
end: () => {},
198188
asyncEnd: data => {
199189
onTraceEnd(data);
200190

@@ -239,9 +229,6 @@ function setupSrvxTracingChannels(): void {
239229

240230
// Subscribe to events (span already created in bindStore)
241231
middlewareChannel.subscribe({
242-
start: () => {},
243-
asyncStart: () => {},
244-
end: () => {},
245232
asyncEnd: onTraceEnd,
246233
error: onTraceError,
247234
});

0 commit comments

Comments
 (0)