Skip to content
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
14 changes: 6 additions & 8 deletions frontend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ require('dotenv').config({ path: path.resolve(__dirname, '../.env') });

const Sentry = require('@sentry/node-experimental');

if(process.env.SENTRY) {
Sentry.init({
dsn: process.env.SENTRY_FRONTEND_DSN,
tracesSampleRate: 1.0,
});
} else {
const sdk = require("../otel/tracing")('frontend');
}
Sentry.init({
dsn: process.env.SENTRY_FRONTEND_DSN,
tracesSampleRate: 1.0,
});

const createError = require("http-errors");
const express = require("express");
Expand All @@ -35,6 +31,8 @@ app.use(express.static(path.join(__dirname, "public")));

app.use("/", indexRouter());

app.use(Sentry.Handlers.errorHandler());

// catch 404 and forward to error handler
app.use((req, res, next) => {
next(createError(404));
Expand Down
1 change: 0 additions & 1 deletion frontend/package-lock.json

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

4 changes: 3 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"start": "node ./bin/www"
},
"dependencies": {
"@sentry/node": "^7.21.1",
"@sentry/node-experimental": "^7.74.1",
"axios": "^0.21.4",
"cookie-parser": "^1.4.6",
Expand All @@ -19,5 +18,8 @@
"morgan": "~1.9.0",
"pug": "^3.0.2",
"request": "^2.88.2"
},
"volta": {
"node": "18.18.2"
}
}
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"private": true,
"volta": {
"node": "18.18.2"
}
}
16 changes: 6 additions & 10 deletions service-blue/app.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../.env') });

const Sentry = require('@sentry/node-experimental');

if(process.env.SENTRY) {
Sentry.init({
dsn: process.env.SENTRY_SERVICE_BLUE_DSN,
tracesSampleRate: 1.0,
});
} else {
const sdk = require("../otel/tracing")('service-blue');
}

Sentry.init({
dsn: process.env.SENTRY_SERVICE_BLUE_DSN,
tracesSampleRate: 1.0,
});

const createError = require("http-errors");
const express = require("express");
Expand All @@ -33,6 +27,8 @@ app.use(express.static(path.join(__dirname, "public")));

app.use("/", indexRouter);

app.use(Sentry.Handlers.errorHandler());

// catch 404 and forward to error handler
app.use((req, res, next) => {
next(createError(404));
Expand Down
2 changes: 1 addition & 1 deletion service-blue/bin/www
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
const sdk = require("../../otel/tracing")('service-blue');
// const sdk = require("../../otel/tracing")('service-blue');

/**
* Module dependencies.
Expand Down
Loading