Skip to content

Commit

Permalink
fix: Some record props is overflowed
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Mar 15, 2024
1 parent 5847687 commit 4e52040
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions xmcl-runtime/telemetry/pluginTelemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,7 @@ export const pluginTelemetry: LauncherAppPlugin = async (app) => {
name: 'minecraft-run-telemetry',
async onBeforeLaunch(_, { gamePath }, ctx) {
const state = stateManager.get<InstanceModsState>(getInstanceModStateKey(gamePath))
const mods = state?.mods.map(m => {
const payload = getPayload(m.hash, m.metadata, m.name, m.domain)
delete payload.name
delete payload.domain
return payload
})
const mods = state?.mods.map(m => m.hash)
const runtime = instanceService?.state.all[gamePath]?.runtime
if (mods) {
ctx.mods = mods
Expand All @@ -228,9 +223,9 @@ export const pluginTelemetry: LauncherAppPlugin = async (app) => {
}
if (ctx.mods) {
client.trackEvent({
name: 'minecraft-run-record',
name: 'minecraft-run-record-v2',
properties: {
mods: ctx.mods,
mods: ctx.mods.join(','),
runtime: ctx.runtime,
java: await javaService?.getJavaState().then((javaState) => {
const javaVersion = javaState.all.find(s => s.path === opts.javaPath)
Expand Down

0 comments on commit 4e52040

Please sign in to comment.