@tramvai/module-micro-sentry 4.4.5 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -91,6 +91,11 @@ export default declareAction({
91
91
  });
92
92
  ```
93
93
 
94
+ ## Environment variables
95
+
96
+ - `SENTRY_RELEASE` - application release version. The value is inserted into the `release` field for all errors
97
+ - `SENTRY_ENVIRONMENT` - the application environment where the error occurred. If the variable is not specified, then `process.env.NODE_ENV` is used
98
+
94
99
  ## Exported tokens
95
100
 
96
101
  #### `MICRO_SENTRY_INSTANCE_TOKEN`
package/lib/browser.js CHANGED
@@ -11,8 +11,10 @@ const TramvaiMicroSentryModule = declareModule({
11
11
  provide({
12
12
  provide: MICRO_SENTRY_OPTIONS_TOKEN,
13
13
  useFactory: ({ envManager }) => {
14
+ var _a;
14
15
  const defaultOptions = {
15
- environment: process.env.NODE_ENV,
16
+ environment: (_a = envManager.get('SENTRY_ENVIRONMENT')) !== null && _a !== void 0 ? _a : process.env.NODE_ENV,
17
+ release: envManager.get('SENTRY_RELEASE'),
16
18
  dsn: envManager.get('SENTRY_DSN'),
17
19
  };
18
20
  return defaultOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-micro-sentry",
3
- "version": "4.4.5",
3
+ "version": "4.7.0",
4
4
  "description": "Micro-sentry module",
5
5
  "browser": "lib/browser.js",
6
6
  "main": "lib/server.js",
@@ -22,9 +22,9 @@
22
22
  "@micro-sentry/browser": "^7.0.1"
23
23
  },
24
24
  "peerDependencies": {
25
- "@tramvai/tokens-render": "4.4.5",
26
- "@tramvai/core": "4.4.5",
27
- "@tramvai/module-common": "4.4.5"
25
+ "@tramvai/tokens-render": "4.7.0",
26
+ "@tramvai/core": "4.7.0",
27
+ "@tramvai/module-common": "4.7.0"
28
28
  },
29
29
  "module": "lib/server.es.js"
30
30
  }