Files
RSSHub/lib/utils/otel/trace.worker.ts
T
DIYgodandClaude Haiku 4.5 d40f812563 refactor: deploy all routes to Cloudflare Workers (#20809)
- Remove Worker-specific route filtering (worker_namespaces) to include all 1537 namespaces in Worker builds
- Remove popularity analytics logic (foloAnalysisTop100) as Worker can now handle all routes
- Update node:child_process alias in tsdown config to use dedicated shim file
- Inline child_process shim in node-module.ts to avoid import cycles
- Fix tough-cookie import in telecompaper route (use named import CookieJar)
- Remove ESModule rules from wrangler.toml (not needed)

This enables full RSSHub functionality on Cloudflare Workers with no memory/size limitations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-04 17:33:55 +08:00

26 lines
545 B
TypeScript

// Worker-specific lightweight trace implementation
// Full OpenTelemetry is too heavy for Worker startup, use no-op implementations
interface Span {
addEvent(name: string): void;
end(): void;
}
interface Tracer {
startSpan(name: string, options?: unknown): Span;
}
// No-op span implementation
const noopSpan: Span = {
addEvent: () => {},
end: () => {},
};
// No-op tracer implementation
const noopTracer: Tracer = {
startSpan: () => noopSpan,
};
export const tracer = noopTracer;
export const mainSpan = noopSpan;