安装skywalking-client-js
npm install skywalking-client-js --save
在main.js添加信息
import ClientMonitor from 'skywalking-client-js'
router.afterEach(() => {
ClientMonitor.setPerformance({
service: '服务名',
serviceVersion: '版本号',
pagePath: location.href,
useFmp: true, vue:'Vue'
})
})
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ibZasGnn-1667466659592)(C:\Users\13301\AppData\Roaming\Typora\typora-user-images\image-20221103170540934.png)]](https://1000bd.com/contentImg/2024/04/30/f0c0407c2946cba5.png)
vue.config.js
'/browser/': {
target:'http://127.0.0.1:12800',//这个目前是内网地址,后续要开放一个外网地址
changeOrigin: true
}
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-p0FPvq1H-1667466659593)(C:\Users\13301\AppData\Roaming\Typora\typora-user-images\image-20221103171029793.png)]](https://1000bd.com/contentImg/2024/04/30/c383bbac5d8cf528.png)
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-QVhDkR2V-1667466659594)(C:\Users\13301\AppData\Roaming\Typora\typora-user-images\image-20221103171049742.png)]](https://1000bd.com/contentImg/2024/04/30/d848a58075d5e52c.png)