Skip to content

Commit

Permalink
feat(sentry): Add sentry integration for inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
adonispuente committed Oct 17, 2024
1 parent dff405a commit 1879e8d
Show file tree
Hide file tree
Showing 4 changed files with 1,613 additions and 955 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ codecov*
.nyc_output
reports

.cache
.cache
# Sentry Config File
.env.sentry-build-plugin
18 changes: 18 additions & 0 deletions fec.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { resolve } = require('path');
const packageJson = require('./package.json');
const webpack = require('webpack');
const { sentryWebpackPlugin } = require('@sentry/webpack-plugin');

const bundle = 'insights';
const appName = packageJson[bundle].appname;
Expand All @@ -10,10 +11,27 @@ module.exports = {
appUrl: `/${bundle}/${appName}`,
useProxy: process.env.PROXY === 'true',
debug: true,
devtool: 'hidden-source-map',
plugins: [
new webpack.DefinePlugin({
IS_DEV: process.env.NODE_ENV !== 'production',
}),
// Put the Sentry Webpack plugin after all other plugins
...(process.env.SENTRY_AUTH_TOKEN
? [
sentryWebpackPlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: 'red-hat-it',
project: 'inventory-rhel',
_experiments: {
moduleMetadata: ({ release }) => ({
dsn: process.env.SENTRY_INVENTORY_DSN,
release,
}),
},
}),
]
: []),
],
moduleFederation: {
shared: [
Expand Down
Loading

0 comments on commit 1879e8d

Please sign in to comment.