@@ -18,18 +18,6 @@ const WRAPPER_CODE = ({
1818 labels,
1919} ) => {
2020 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-
3321epsagon.init({
3422 token: '${ token } ',
3523 appName: '${ appName } ',
@@ -64,6 +52,18 @@ except:
6452 print('Warning: Epsagon package not found. The function will not be monitored')
6553` ,
6654 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+
6767const epsagon = require('epsagon');
6868const epsagonHandler = require('../${ relativePath } .js');
6969
@@ -72,6 +72,18 @@ ${commonNode}
7272exports.${ method } = epsagon.${ wrapper } (epsagonHandler.${ method } );
7373` ,
7474 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+
7587import * as epsagon from 'epsagon';
7688import * as epsagonHandler from '../${ relativePath } ';
7789
0 commit comments