mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-28 23:19:27 +08:00
* refactor: drop unused exports * refactor: drop more unused exports * feat!: remoe /anquanke/vul * feat!: remove /wechat/feeddd * refactor(route/metacritic): use api * feat(route/twitter)!: remove search leftover from #21109 * refactor: remove "missing route export" routes * refactor: drop more unused exports
26 lines
570 B
TypeScript
26 lines
570 B
TypeScript
// Worker-specific lightweight trace implementation
|
|
// Full OpenTelemetry is too heavy for Worker startup, use no-op implementations
|
|
import type { SpanOptions } from '@opentelemetry/api';
|
|
|
|
interface Span {
|
|
addEvent(name: string): void;
|
|
end(): void;
|
|
}
|
|
|
|
interface Tracer {
|
|
startSpan(name: string, options?: SpanOptions): Span;
|
|
}
|
|
|
|
// No-op span implementation
|
|
const noopSpan: Span = {
|
|
addEvent: () => {},
|
|
end: () => {},
|
|
};
|
|
|
|
// No-op tracer implementation
|
|
const noopTracer: Tracer = {
|
|
startSpan: () => noopSpan,
|
|
};
|
|
|
|
export const tracer = noopTracer;
|