mirror of
https://github.com/steedos/steedos-platform
synced 2024-11-22 17:06:42 +00:00
与sentry服务集成,集中汇总故障报告 #3672
This commit is contained in:
parent
5d54699f70
commit
8155425d2a
@ -4,7 +4,7 @@ image:
|
||||
# List the ports you want to expose and what to do when they are served. See https://www.gitpod.io/docs/config-ports/
|
||||
ports:
|
||||
- port: 5000
|
||||
onOpen: open-browser
|
||||
onOpen: ignore
|
||||
visibility: public
|
||||
- port: 3000
|
||||
onOpen: ignore
|
||||
|
@ -64,6 +64,9 @@ module.exports = {
|
||||
*/
|
||||
async started(ctx) {
|
||||
|
||||
// 故障报告服务
|
||||
this.broker.createService(require("@steedos/service-sentry"));
|
||||
|
||||
// 启动 元数据服务
|
||||
this.broker.createService(require("@steedos/service-metadata-server"));
|
||||
|
||||
@ -87,9 +90,6 @@ module.exports = {
|
||||
// 启动 登录页面
|
||||
this.broker.createService(require("@steedos/webapp-accounts"));
|
||||
|
||||
// 故障报告服务
|
||||
this.broker.createService(require("@steedos/service-sentry"));
|
||||
|
||||
// 产品分析
|
||||
this.broker.createService(require("@steedos/service-analytics"));
|
||||
},
|
||||
|
@ -6,8 +6,7 @@
|
||||
"dependencies": {
|
||||
"@sentry/node": "7.7.0",
|
||||
"@sentry/tracing": "7.7.0",
|
||||
"@sentry/utils": "7.7.0",
|
||||
"@steedos/objectql": "2.2.55-beta.13"
|
||||
"@sentry/utils": "7.7.0"
|
||||
},
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
'use strict'
|
||||
|
||||
|
||||
const _ = require('lodash');
|
||||
const Sentry = require('@sentry/node')
|
||||
const SentryUtils = require('@sentry/utils')
|
||||
@ -24,7 +25,6 @@ const DEFAULT_DSN = {
|
||||
module.exports = {
|
||||
name: serviceName,
|
||||
namespace: "steedos",
|
||||
mixins: [packageLoader],
|
||||
|
||||
/**
|
||||
* Dependencies
|
||||
@ -218,7 +218,7 @@ module.exports = {
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
started() {
|
||||
let { enabled, dsn, options } = this.settings.sentry
|
||||
if (enabled) {
|
||||
|
@ -8,7 +8,7 @@ const packageLoader = require('@steedos/service-meteor-package-loader');
|
||||
const objectql = require('@steedos/objectql');
|
||||
const standardObjectsPath = path.dirname(require.resolve("@steedos/standard-objects/package.json"));
|
||||
const _ = require('lodash');
|
||||
const Sentry = require('@sentry/node')
|
||||
|
||||
/**
|
||||
* @typedef {import('moleculer').Context} Context Moleculer's Context
|
||||
*/
|
||||
|
@ -1,5 +1,4 @@
|
||||
console.log(Meteor.settings.public.sentry.dsn)
|
||||
if (Meteor.settings.public.sentry.dsn) {
|
||||
if (Meteor.settings.public.sentry && Meteor.settings.public.sentry.dsn) {
|
||||
|
||||
let sentryScript = document.createElement("script");
|
||||
sentryScript.setAttribute("src", Steedos.absoluteUrl('/sentry/sentry.min.js'));
|
Loading…
Reference in New Issue
Block a user