Refactor: full span tracer

This commit is contained in:
SukkaW
2024-01-14 22:10:16 +08:00
parent 0f257e992a
commit 9bb0c14d5f
23 changed files with 238 additions and 183 deletions

View File

@@ -35,7 +35,7 @@ const getBogusNxDomainIPs = async () => {
);
};
export const buildAntiBogusDomain = task(import.meta.path, async () => {
export const buildAntiBogusDomain = task(import.meta.path, async (span) => {
const bogusIpPromise = getBogusNxDomainIPs();
const result: string[] = [];
@@ -57,7 +57,8 @@ export const buildAntiBogusDomain = task(import.meta.path, async () => {
' - https://github.com/felixonmars/dnsmasq-china-list'
];
return Promise.all(createRuleset(
return createRuleset(
span,
'Sukka\'s Ruleset - Anti Bogus Domain',
description,
new Date(),
@@ -65,7 +66,7 @@ export const buildAntiBogusDomain = task(import.meta.path, async () => {
'ruleset',
path.resolve(import.meta.dir, '../List/ip/reject.conf'),
path.resolve(import.meta.dir, '../Clash/ip/reject.txt')
));
);
});
if (import.meta.main) {