Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Sentry to 8.0.0 #267

Merged
merged 3 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 57 additions & 68 deletions src/NuGetTrends.Web/Portal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/NuGetTrends.Web/Portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"@angular/platform-browser": "^17.1.3",
"@angular/platform-browser-dynamic": "^17.1.3",
"@angular/router": "^17.1.3",
"@sentry/angular": "^8.0.0-alpha.9",
"@sentry-internal/feedback": "^8.0.0-alpha.9",
"@sentry/angular": "^8.0.0",
"@types/chart.js": "2.9.32",
"bulma": "^0.9.4",
"bulma-start": "^0.0.5",
Expand Down
59 changes: 25 additions & 34 deletions src/NuGetTrends.Web/Portal/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule, ErrorHandler } from '@angular/core';
import { DatePipe } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { Router } from '@angular/router';
import * as Sentry from '@sentry/angular';
import { feedbackIntegration, feedbackModalIntegration, feedbackScreenshotIntegration } from "@sentry-internal/feedback";
import { BrowserModule } from "@angular/platform-browser";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { NgModule, ErrorHandler } from "@angular/core";
import { DatePipe } from "@angular/common";
import { HttpClientModule } from "@angular/common/http";
import { Router } from "@angular/router";
import * as Sentry from "@sentry/angular";

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routes.module';
import { environment } from '../environments/environment';
import { PackagesModule } from './packages/packages.module';
import { SharedModule } from './shared/shared.module';
import { HomeModule } from './home/home.module';
import { CoreModule } from './core/core.module';
import { AppComponent } from "./app.component";
import { AppRoutingModule } from "./app-routes.module";
import { environment } from "../environments/environment";
import { PackagesModule } from "./packages/packages.module";
import { SharedModule } from "./shared/shared.module";
import { HomeModule } from "./home/home.module";
import { CoreModule } from "./core/core.module";

if (process.env.NODE_ENV === "development") {
import('@spotlightjs/spotlight').then((Spotlight) =>
import("@spotlightjs/spotlight").then((Spotlight) =>
Spotlight.init({
anchor: 'centerRight',
injectImmediately: true })
anchor: "centerRight",
injectImmediately: true,
})
);
}

Expand All @@ -42,18 +42,12 @@ Sentry.init({
networkResponseHeaders: ["Server"],
}),
Sentry.replayCanvasIntegration(),
feedbackIntegration({
Sentry.feedbackIntegration({
colorScheme: "light", // no dark theme yet
themeLight: {
submitBackground: '#215C84',
submitBackgroundHover: '#A2BACB',
submitBorder: '#153b54',
inputBackground: '#ffffff',
inputForeground: '#374151',
accentBackground: "#215C84",
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

        submitBackgroundHover: '#A2BACB',
        submitBorder: '#153b54',
        inputBackground: '#ffffff',
        inputForeground: '#374151',

are these deleted on purpose? won't it affect what the widget looks like?

}),
feedbackModalIntegration(),
feedbackScreenshotIntegration(),
Sentry.browserTracingIntegration({
idleTimeout: 30000,
}),
Expand All @@ -62,9 +56,7 @@ Sentry.init({
});

@NgModule({
declarations: [
AppComponent
],
declarations: [AppComponent],
imports: [
Sentry.TraceModule,
AppRoutingModule,
Expand All @@ -74,27 +66,26 @@ Sentry.init({
CoreModule,
SharedModule,
PackagesModule,
HomeModule
HomeModule,
],
providers: [
DatePipe,
{
provide: ErrorHandler,
useValue: Sentry.createErrorHandler({
showDialog: environment.production, // User Feedback enabled in production
logErrors: !environment.production // log console errors in dev mode
logErrors: !environment.production, // log console errors in dev mode
}),
},
{
provide: Sentry.TraceService,
deps: [Router],
},
],
bootstrap: [AppComponent]
bootstrap: [AppComponent],
})
export class AppModule {

// force instantiating Sentry tracing
// https://docs.sentry.io/platforms/javascript/guides/angular/#monitor-performance
constructor(_: Sentry.TraceService) { }
constructor(_: Sentry.TraceService) {}
}
Loading