Skip to content

Commit 538a6f1

Browse files
Merge pull request #10 from LunarClient/chore/betterstack-telemetry-export
chore: export telemetry to Better Stack
2 parents 437d039 + 55f55d4 commit 538a6f1

4 files changed

Lines changed: 24 additions & 9 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@
135135
"simple-git-hooks": {
136136
"commit-msg": "pnpm exec commitlint --edit $1"
137137
}
138-
}
138+
}

src/lib/hooks/is-hover.svelte.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
export class IsHover {
22
#current = $state(true);
33

4-
constructor() { }
4+
constructor() {}
55

66
get current() {
77
return this.#current;
88
}
99

10-
destroy() { }
11-
}
10+
destroy() {}
11+
}

src/lib/sections/stats/Overview.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
<Stats />
1616
<AdditionalStats />
1717
</div>
18-
</Section>
18+
</Section>

wrangler.jsonc

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,30 @@
1111
},
1212
"routes": [
1313
{
14-
"pattern": "skycrypt-embed.lunarclient.com",
15-
"custom_domain": true
14+
"pattern": "skycrypt-embed.lunarclient.com",
15+
"custom_domain": true
1616
}
1717
],
18+
// Exported to Better Stack via the OTLP destinations configured in the
19+
// Cloudflare dashboard (Workers & Pages -> Observability -> Telemetry).
20+
// persist: true also retains everything in the CF dashboard.
1821
"observability": {
19-
"enabled": true
22+
"enabled": true,
23+
"logs": {
24+
"enabled": true,
25+
"destinations": ["betterstack-logs"],
26+
"head_sampling_rate": 1.0,
27+
"persist": true
28+
},
29+
"traces": {
30+
"enabled": true,
31+
"destinations": ["betterstack-traces"],
32+
"head_sampling_rate": 0.01,
33+
"persist": true
34+
}
2035
},
2136
"vars": {
2237
"PUBLIC_SERVER_API_URL": "https://sky.shiiyu.moe/api/",
2338
"PUBLIC_API_URL": "https://sky.shiiyu.moe/api/"
2439
}
25-
}
40+
}

0 commit comments

Comments
 (0)