完善监控sdk

This commit is contained in:
xiangheng
2024-10-31 13:11:34 +08:00
parent daeea359bc
commit e65b9f6af8
11 changed files with 424 additions and 205 deletions

View File

@@ -1,14 +1,18 @@
<script setup lang="ts">
import { onUnmounted } from 'vue'
import XLog from '../../../../x_error_sdk/x-log'
import x_log_browser from '../../../../x_error_sdk/x-log-browser'
const xlog = new XLog(
const xLog = new XLog(
{
Dns: 'http://localhost:5174/api',
Pid: 'e19e3be20de94f49b68fafb4c30668bc',
Uid: '10'
},
x_log_browser
new x_log_browser()
)
onUnmounted(() => {
xLog.unListen()
})
defineProps<{ msg: string }>()
function error() {
throw new Error('主动抛error')