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

@@ -21,7 +21,7 @@ export const getDomesticDomainsRulesetPromise = createMemoizedPromise(async () =
return results;
});
export const buildDomesticRuleset = task(import.meta.path, async () => {
export const buildDomesticRuleset = task(import.meta.path, async (span) => {
const rulesetDescription = [
...SHARED_DESCRIPTION,
'',
@@ -29,7 +29,8 @@ export const buildDomesticRuleset = task(import.meta.path, async () => {
];
return Promise.all([
...createRuleset(
createRuleset(
span,
'Sukka\'s Ruleset - Domestic Domains',
rulesetDescription,
new Date(),
@@ -39,6 +40,7 @@ export const buildDomesticRuleset = task(import.meta.path, async () => {
path.resolve(import.meta.dir, '../Clash/non_ip/domestic.txt')
),
compareAndWriteFile(
span,
[
'#!name=[Sukka] Local DNS Mapping',
`#!desc=Last Updated: ${new Date().toISOString()}`,