-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstrumentation.edge.js
More file actions
26 lines (24 loc) · 878 Bytes
/
instrumentation.edge.js
File metadata and controls
26 lines (24 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* Edge Runtime Instrumentation - No-op Implementation
*
* This file provides empty implementations for edge runtime.
* Edge runtime doesn't need instrumentation but Next.js requires these exports.
*
* ARCHITECTURE:
* - Completely separate from Node.js instrumentation
* - No TypeScript imports or transpilation
* - Minimal overhead for edge runtime
*/
export async function register() {
// Edge runtime doesn't need instrumentation
if (process.env.NODE_ENV === 'development') {
console.log('[instrumentation.edge] Edge runtime initialized (no-op)')
}
}
export async function onRequestError(err, request, context) {
// Minimal error logging for edge runtime
// Avoid complex error handling to keep edge runtime lightweight
if (process.env.NODE_ENV === 'development') {
console.error('[instrumentation.edge] Request error:', err.message)
}
}