@@ -18,18 +18,6 @@ const WRAPPER_CODE = ({
18
18
labels,
19
19
} ) => {
20
20
const commonNode = `
21
- if (!process.env.EPSAGON_IGNORED_KEYS) {
22
- process.env.EPSAGON_IGNORED_KEYS = "${ ignoredKeys || '' } ";
23
- }
24
-
25
- if (!process.env.EPSAGON_URLS_TO_IGNORE) {
26
- process.env.EPSAGON_URLS_TO_IGNORE = "${ urlsToIgnore || '' } ";
27
- }
28
-
29
- if (!process.env.EPSAGON_PAYLOADS_TO_IGNORE) {
30
- process.env.EPSAGON_PAYLOADS_TO_IGNORE = '${ payloadsToIgnore } ';
31
- }
32
-
33
21
epsagon.init({
34
22
token: '${ token } ',
35
23
appName: '${ appName } ',
@@ -64,6 +52,18 @@ except:
64
52
print('Warning: Epsagon package not found. The function will not be monitored')
65
53
` ,
66
54
node : `
55
+ if (!process.env.EPSAGON_IGNORED_KEYS) {
56
+ process.env.EPSAGON_IGNORED_KEYS = "${ ignoredKeys || '' } ";
57
+ }
58
+
59
+ if (!process.env.EPSAGON_URLS_TO_IGNORE) {
60
+ process.env.EPSAGON_URLS_TO_IGNORE = "${ urlsToIgnore || '' } ";
61
+ }
62
+
63
+ if (!process.env.EPSAGON_PAYLOADS_TO_IGNORE) {
64
+ process.env.EPSAGON_PAYLOADS_TO_IGNORE = '${ payloadsToIgnore } ';
65
+ }
66
+
67
67
const epsagon = require('epsagon');
68
68
const epsagonHandler = require('../${ relativePath } .js');
69
69
@@ -72,6 +72,18 @@ ${commonNode}
72
72
exports.${ method } = epsagon.${ wrapper } (epsagonHandler.${ method } );
73
73
` ,
74
74
tsnode : `
75
+ if (!process.env.EPSAGON_IGNORED_KEYS) {
76
+ process.env.EPSAGON_IGNORED_KEYS = "${ ignoredKeys || '' } ";
77
+ }
78
+
79
+ if (!process.env.EPSAGON_URLS_TO_IGNORE) {
80
+ process.env.EPSAGON_URLS_TO_IGNORE = "${ urlsToIgnore || '' } ";
81
+ }
82
+
83
+ if (!process.env.EPSAGON_PAYLOADS_TO_IGNORE) {
84
+ process.env.EPSAGON_PAYLOADS_TO_IGNORE = '${ payloadsToIgnore } ';
85
+ }
86
+
75
87
import * as epsagon from 'epsagon';
76
88
import * as epsagonHandler from '../${ relativePath } ';
77
89
0 commit comments