Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 岗哨在本地主机(serve)上工作,但不在服务器(build)上工作_Angular_Sentry - Fatal编程技术网

Angular 岗哨在本地主机(serve)上工作,但不在服务器(build)上工作

Angular 岗哨在本地主机(serve)上工作,但不在服务器(build)上工作,angular,sentry,Angular,Sentry,我想和8号哨兵一起工作 它工作得很好,在localhost中提供服务时捕获错误事件,而不是在服务器上的构建中 想知道为什么/我错过了什么区别吗 //app.module.ts Sentry.init({ integrations: [new Sentry.Integrations.Breadcrumbs({ console: false })], dsn: "https://somecode@o386725.ingest.sentry.io/sometoken

我想和8号哨兵一起工作

它工作得很好,在localhost中提供服务时捕获错误事件,而不是在服务器上的构建中

想知道为什么/我错过了什么区别吗

//app.module.ts
Sentry.init({
    integrations: [new Sentry.Integrations.Breadcrumbs({
        console: false
    })],
  dsn: "https://somecode@o386725.ingest.sentry.io/sometoken"
});

@Injectable()
export class SentryErrorHandler implements ErrorHandler {
  constructor() {}
  handleError(error) {
    const eventId = Sentry.captureException(error.originalError || error);
    Sentry.showReportDialog({ eventId });
  }
}
//later added to providers
{ provide: ErrorHandler, useClass: SentryErrorHandler }