@edirect/trace 9.0.46 → 11.0.25

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.
Files changed (57) hide show
  1. package/README.md +222 -206
  2. package/dist/README.md +381 -0
  3. package/dist/package.json +44 -0
  4. package/package.json +58 -33
  5. package/.editorconfig +0 -14
  6. package/.eslintignore +0 -1
  7. package/.eslintrc.js +0 -44
  8. package/.eslintrc.json +0 -159
  9. package/.prettierrc +0 -5
  10. package/dist/constants/headers.d.ts +0 -4
  11. package/dist/constants/headers.js +0 -6
  12. package/dist/constants/headers.js.map +0 -1
  13. package/dist/constants/index.d.ts +0 -1
  14. package/dist/constants/index.js +0 -9
  15. package/dist/constants/index.js.map +0 -1
  16. package/dist/index.d.ts +0 -3
  17. package/dist/index.js +0 -32
  18. package/dist/index.js.map +0 -1
  19. package/dist/middlewares/CLS.d.ts +0 -5
  20. package/dist/middlewares/CLS.js +0 -34
  21. package/dist/middlewares/CLS.js.map +0 -1
  22. package/dist/middlewares/body.d.ts +0 -5
  23. package/dist/middlewares/body.js +0 -104
  24. package/dist/middlewares/body.js.map +0 -1
  25. package/dist/middlewares/index.d.ts +0 -4
  26. package/dist/middlewares/index.js +0 -15
  27. package/dist/middlewares/index.js.map +0 -1
  28. package/dist/middlewares/nextjs.d.ts +0 -5
  29. package/dist/middlewares/nextjs.js +0 -35
  30. package/dist/middlewares/nextjs.js.map +0 -1
  31. package/dist/middlewares/trace.d.ts +0 -5
  32. package/dist/middlewares/trace.js +0 -27
  33. package/dist/middlewares/trace.js.map +0 -1
  34. package/dist/otel.d.ts +0 -1
  35. package/dist/otel.js +0 -194
  36. package/dist/otel.js.map +0 -1
  37. package/dist/tsconfig.build.tsbuildinfo +0 -1
  38. package/dist/utils/CLS.d.ts +0 -5
  39. package/dist/utils/CLS.js +0 -42
  40. package/dist/utils/CLS.js.map +0 -1
  41. package/dist/utils/body-prop-tools.d.ts +0 -15
  42. package/dist/utils/body-prop-tools.js +0 -87
  43. package/dist/utils/body-prop-tools.js.map +0 -1
  44. package/dist/utils/index.d.ts +0 -3
  45. package/dist/utils/index.js +0 -13
  46. package/dist/utils/index.js.map +0 -1
  47. package/dist/utils/json-path.d.ts +0 -9
  48. package/dist/utils/json-path.js +0 -33
  49. package/dist/utils/json-path.js.map +0 -1
  50. package/dist/utils/trace.d.ts +0 -5
  51. package/dist/utils/trace.js +0 -13
  52. package/dist/utils/trace.js.map +0 -1
  53. package/dist/version.d.ts +0 -1
  54. package/dist/version.js +0 -5
  55. package/dist/version.js.map +0 -1
  56. package/docs/architecture.png +0 -0
  57. package/tsconfig.build.json +0 -9
package/README.md CHANGED
@@ -7,22 +7,22 @@ Based on application logs and a sales checker service that triggers alerts on a
7
7
  Due to the sheer amount of logs and complex integrations between the application microservices, it is not uncommon to find scenarios where the development team can spend hours tracing the problem back to its origin.
8
8
 
9
9
  - Non-standard logs
10
- - The log format and content depends on implementation and log uniformity is a challenge by itself.
10
+ - The log format and content depends on implementation and log uniformity is a challenge by itself.
11
11
  - Logs might be outdated or absent
12
- - As services shift, evolve and so should logs. This can be a source for inconsistencies as logs may not be updated or can be wrongly removed during the feature implementation.
12
+ - As services shift, evolve and so should logs. This can be a source for inconsistencies as logs may not be updated or can be wrongly removed during the feature implementation.
13
13
  - Logs are difficult to query and trace
14
- - Even with the help of tools such Elasticsearch, querying and tracing logs can be a difficult task due to complex interactions among different services in the application.
15
- - As an example, an error response from quote-engine but we only dispose of the policy number to find the root cause. The data provided is not enough for a complete investigation, which may lead to long research.
14
+ - Even with the help of tools such Elasticsearch, querying and tracing logs can be a difficult task due to complex interactions among different services in the application.
15
+ - As an example, an error response from quote-engine but we only dispose of the policy number to find the root cause. The data provided is not enough for a complete investigation, which may lead to long research.
16
16
  - Not able to trace all exception occurrences
17
- - In the case shown by the previous item the error was not logged or at least not easily accessible.
18
- - Sales triggers are not flexible
19
- - Triggers are configured as code in the sales checker service. Any change to the logic must be implemented, tested and deployed.
20
- - Sales alert do not provide insight into root causes
21
- - The alert contains only the basic information necessary for an investigation to start. It contains the lead, partner, vertical and a brief description of the problem.
17
+ - In the case shown by the previous item the error was not logged or at least not easily accessible.
18
+ - Sales triggers are not flexible
19
+ - Triggers are configured as code in the sales checker service. Any change to the logic must be implemented, tested and deployed.
20
+ - Sales alert do not provide insight into root causes
21
+ - The alert contains only the basic information necessary for an investigation to start. It contains the lead, partner, vertical and a brief description of the problem.
22
22
  - Limited business process visibility
23
- - As the alerts are based on sale statuses, we have limited insight into the process. With such a limited view we cannot verify which steps represent bottlenecks or are more prone to errors. Useful information for maintaining and improving the system.
23
+ - As the alerts are based on sale statuses, we have limited insight into the process. With such a limited view we cannot verify which steps represent bottlenecks or are more prone to errors. Useful information for maintaining and improving the system.
24
24
  - No concise view of the business flow
25
- - Currently there are no dashboards or easily accessible views that can provide correlated information about the many steps that compose the Bolttech business flow.
25
+ - Currently there are no dashboards or easily accessible views that can provide correlated information about the many steps that compose the Bolttech business flow.
26
26
 
27
27
  ## Detailed Design
28
28
 
@@ -41,107 +41,116 @@ Taking the requirements in consideration, the proposed solutions employs an appl
41
41
  ## Usage
42
42
 
43
43
  - Tracing Apps
44
- - Datadog
44
+ - Datadog
45
45
  - Services and Observability
46
- - [Service Visibility Frontend](https://bitbucket.org/gofrank/service-visibility-frontend/src/main/)
47
- - [Service Visibility Backend](https://bitbucket.org/gofrank/service-visibility-backend/src/main/)
46
+ - [Service Visibility Frontend](https://bitbucket.org/gofrank/service-visibility-frontend/src/main/)
47
+ - [Service Visibility Backend](https://bitbucket.org/gofrank/service-visibility-backend/src/main/)
48
48
 
49
49
  ## Sample application
50
50
 
51
51
  - [Service Visibility Samples](https://bitbucket.org/gofrank/service-visibility-samples/src/master/)
52
+ 1. Expressjs Sample
52
53
 
53
- 1. Expressjs Sample
54
+ https://bitbucket.org/gofrank/service-visibility-samples/src/master/samples/api/
54
55
 
55
- https://bitbucket.org/gofrank/service-visibility-samples/src/master/samples/api/
56
+ 2. Nest-app Sample
56
57
 
57
- 2. Nest-app Sample
58
-
59
- https://bitbucket.org/gofrank/service-visibility-samples/src/master/samples/quote-nestapp/
58
+ https://bitbucket.org/gofrank/service-visibility-samples/src/master/samples/quote-nestapp/
60
59
 
61
60
  ## NestJS Applications
62
61
 
63
- NestJs applications __should be upgraded to version 9.__
62
+ NestJs applications **should be upgraded to version 9.**
64
63
 
65
64
  - Just the fact of upgrade the nest-app to version 9 will able the service to ship all logs to the service visibility
66
65
 
67
- As we applied the `@edirect/trace` to the nest-app, we dont need to have the trace part of code on nest-app applications with nest-app version 9
66
+ As we applied the `@edirect/trace` to the nest-app, we dont need to have the trace part of code on nest-app applications with nest-app version 9
68
67
 
69
- In case of impossibility to upgrade, use the "Other" instructions using `@edirect/trace` directly
68
+ In case of impossibility to upgrade, use the "Other" instructions using `@edirect/trace` directly
70
69
 
71
- Integration Service was not able to upgrade because it uses a react-ssr that does not have compatibility with nestjs 9, so, even as a nestjs application, we implemented the "Other" way
70
+ Integration Service was not able to upgrade because it uses a react-ssr that does not have compatibility with nestjs 9, so, even as a nestjs application, we implemented the "Other" way
72
71
 
73
72
  - [@edirect/nest-app:9](https://bitbucket.org/gofrank/nest-app/src/master/)
73
+ 1. Upgrade nest-app, all edirect dependencies and all nestjs dependencies
74
74
 
75
- 1. Upgrade nest-app, all edirect dependencies and all nestjs dependencies
76
-
77
- 2. We should initialize our application with `otel` as a requirement for node startup command:
75
+ 2. We should initialize our application with `otel` as a requirement for node startup command:
78
76
 
79
- ```bash
80
- node --require ./node_modules/@edirect/trace/dist/otel.js dist/main
81
- ```
77
+ ```bash
78
+ node --require ./node_modules/@edirect/trace/dist/otel.js dist/main
79
+ ```
82
80
 
83
- (dist/main or your application entrypoint)
81
+ (dist/main or your application entrypoint)
84
82
 
85
- 3. Remove the old client initialization as we moved it to the node require
83
+ 3. Remove the old client initialization as we moved it to the node require
86
84
 
87
- If the service was using old trace version
85
+ If the service was using old trace version
88
86
 
89
- ```js
90
- const config = require('config');
91
- const { services: { APM }, middlewares: traceMiddlewares } = require('@edirect/trace');
92
- const apmConfig = config.get('apm');
87
+ ```js
88
+ const config = require('config');
89
+ const {
90
+ services: { APM },
91
+ middlewares: traceMiddlewares,
92
+ } = require('@edirect/trace');
93
+ const apmConfig = config.get('apm');
93
94
 
94
- if (apmConfig.enabled) {
95
- const apm = new APM(apmConfig.service, apmConfig.url, apmConfig.traceServer);
96
- apm.startTrace();
97
- }
98
- ```
95
+ if (apmConfig.enabled) {
96
+ const apm = new APM(
97
+ apmConfig.service,
98
+ apmConfig.url,
99
+ apmConfig.traceServer,
100
+ );
101
+ apm.startTrace();
102
+ }
103
+ ```
99
104
 
100
- 4. Remove the middleware usage
105
+ 4. Remove the middleware usage
101
106
 
102
- If the service was using old trace version
107
+ If the service was using old trace version
103
108
 
104
- Remove it completely as we moved it to inside of `@edirect/trace`:
109
+ Remove it completely as we moved it to inside of `@edirect/trace`:
105
110
 
106
- ```js
107
- if (apmConfig.enabled) {
108
- app.use(new traceMiddlewares.Body().body);
109
- }
110
- ```
111
+ ```js
112
+ if (apmConfig.enabled) {
113
+ app.use(new traceMiddlewares.Body().body);
114
+ }
115
+ ```
111
116
 
112
117
  ## NextJS Applications
113
- NextJS applications __should be upgraded to version 12 or above__.
114
118
 
115
- 1. Install the trace package:
119
+ NextJS applications **should be upgraded to version 12 or above**.
120
+
121
+ 1. Install the trace package:
122
+
116
123
  ```bash
117
124
  npm install --save @edirect/trace
118
125
  ```
119
126
 
120
- 2. Create a middleware
127
+ 2. Create a middleware
128
+ - When you upgrade the NextJS application to the version 12(or above) you will be able
129
+ to use [Middlewares](https://nextjs.org/docs/advanced-features/middleware).
121
130
 
122
- * When you upgrade the NextJS application to the version 12(or above) you will be able
123
- to use [Middlewares](https://nextjs.org/docs/advanced-features/middleware).
124
-
125
- Create a file called as `middleware.ts(or .js)` inside of the `src` folder.
131
+ Create a file called as `middleware.ts(or .js)` inside of the `src` folder.
126
132
 
127
- ```ts
128
- import { NextResponse } from 'next/server';
129
- import type { NextRequest } from 'next/server';
130
- import NextJsTracer from '@edirect/trace/dist/middlewares/nextjs';
133
+ ```ts
134
+ import { NextResponse } from 'next/server';
135
+ import type { NextRequest } from 'next/server';
136
+ import NextJsTracer from '@edirect/trace/dist/middlewares/nextjs';
131
137
 
132
- // This function can be marked `async` if using `await` inside
133
- export function middleware(request: NextRequest) {
134
- // @edirect/trace
135
- new NextJsTracer().body(req as unknown as Request & Record<string, unknown>);
136
- NextResponse.next();
137
- }
138
- ```
138
+ // This function can be marked `async` if using `await` inside
139
+ export function middleware(request: NextRequest) {
140
+ // @edirect/trace
141
+ new NextJsTracer().body(req as unknown as Request & Record<string, unknown>);
142
+ NextResponse.next();
143
+ }
144
+ ```
145
+
146
+ 3. Install dotenv and create a dotenv.config
139
147
 
140
- 3. Install dotenv and create a dotenv.config
141
148
  ```bash
142
149
  npm install --save dotenv
143
150
  ```
151
+
144
152
  `dotenv.config.js`
153
+
145
154
  ```js
146
155
  const dotenv = require('dotenv');
147
156
  const nodeEnv = process.env.NODE_ENV || 'development';
@@ -149,8 +158,9 @@ NextJS applications __should be upgraded to version 12 or above__.
149
158
  dotenv.config({ path: `.${nodeEnv}.env` });
150
159
  ```
151
160
 
152
- 4. Add the environment variables to your NextJS app:
153
- __Example:__`.development.env`
161
+ 4. Add the environment variables to your NextJS app:
162
+ **Example:**`.development.env`
163
+
154
164
  ```yml
155
165
  ## OPEN TELEMETRY
156
166
  TRACE_TAG_OWNER=OWNER
@@ -164,101 +174,107 @@ NextJS applications __should be upgraded to version 12 or above__.
164
174
  TRACE_TAG_ENV=ie-stag-broker
165
175
  ```
166
176
 
167
- 5. Serve your production build on the standalone mode. Add this line to your `next.config.js` file
177
+ 5. Serve your production build on the standalone mode. Add this line to your `next.config.js` file
178
+
168
179
  ```js
169
180
  module.exports = {
170
- // ...myOtherSettings
171
- output: 'standalone'
172
- }
181
+ // ...myOtherSettings
182
+ output: 'standalone',
183
+ };
173
184
  ```
174
185
 
175
- 6. Change the __start__ and __dev__ command:
186
+ 6. Change the **start** and **dev** command:
176
187
  ```json
177
188
  {
178
- "scripts": {
179
- "dev": "cross-env NODE_ENV=development node --require ./dotenv.config.js --require ./node_modules/@edirect/trace/dist/otel.js ./node_modules/next/dist/bin/next -p 3100",
180
- "start": "cross-env NODE_ENV=production node --require ./dotenv.config.js --require ./node_modules/@edirect/trace/dist/otel.js ./build/client/standalone/server.js -p 3100"
181
- }
189
+ "scripts": {
190
+ "dev": "cross-env NODE_ENV=development node --require ./dotenv.config.js --require ./node_modules/@edirect/trace/dist/otel.js ./node_modules/next/dist/bin/next -p 3100",
191
+ "start": "cross-env NODE_ENV=production node --require ./dotenv.config.js --require ./node_modules/@edirect/trace/dist/otel.js ./build/client/standalone/server.js -p 3100"
192
+ }
182
193
  }
183
194
  ```
184
195
 
185
-
186
196
  ## Other (Not nest-app:9)
187
197
 
188
198
  ### If you are unable to update to nest 9 or is not nest (express)
189
199
 
190
200
  - [@edirect/trace](https://bitbucket.org/gofrank/trace/src/master/)
191
201
 
192
- The usage of `@edirect/trace` will need your care to inject our middleware to log all requests from the app
202
+ The usage of `@edirect/trace` will need your care to inject our middleware to log all requests from the app
203
+ 1. Install the trace package
193
204
 
194
- 1. Install the trace package
205
+ ```bash
206
+ npm install --save @edirect/trace
207
+ ```
195
208
 
196
- ```bash
197
- npm install --save @edirect/trace
198
- ```
209
+ 2. Import the trace package
199
210
 
200
- 2. Import the trace package
211
+ ```js
212
+ import { middlewares as traceMiddlewares } from '@edirect/trace';
213
+ ```
201
214
 
202
- ```js
203
- import { middlewares as traceMiddlewares } from '@edirect/trace';
204
- ```
215
+ 3. Add the trace middleware to your application routes
205
216
 
206
- 3. Add the trace middleware to your application routes
217
+ Express:
207
218
 
208
- Express:
219
+ ```js
220
+ app.use(new traceMiddlewares.Body().body);
221
+ ```
209
222
 
210
- ```js
211
- app.use(new traceMiddlewares.Body().body);
212
- ```
223
+ NestJs with nest-app:
213
224
 
214
- NestJs with nest-app:
225
+ ```js
226
+ consumer
227
+ .apply(new traceMiddlewares.Body().body)
228
+ .forRoutes({ path: '/**', method: RequestMethod.ALL });
229
+ ```
215
230
 
216
- ```js
217
- consumer
218
- .apply(new traceMiddlewares.Body().body)
219
- .forRoutes({path: '/**', method: RequestMethod.ALL});
220
- ```
231
+ 4. We should initialize our application with `otel` as a requirement for node startup command:
221
232
 
222
- 4. We should initialize our application with `otel` as a requirement for node startup command:
233
+ ```bash
234
+ node --require ./node_modules/@edirect/trace/dist/otel.js dist/main
235
+ ```
223
236
 
224
- ```bash
225
- node --require ./node_modules/@edirect/trace/dist/otel.js dist/main
226
- ```
237
+ (dist/main or your application entrypoint)
227
238
 
228
- (dist/main or your application entrypoint)
239
+ 5. Remove the old client initialization as we moved it to the node require
229
240
 
230
- 5. Remove the old client initialization as we moved it to the node require
241
+ If the service was using old trace version
231
242
 
232
- If the service was using old trace version
243
+ ```js
244
+ const config = require('config');
245
+ const {
246
+ services: { APM },
247
+ middlewares: traceMiddlewares,
248
+ } = require('@edirect/trace');
249
+ const apmConfig = config.get('apm');
233
250
 
234
- ```js
235
- const config = require('config');
236
- const { services: { APM }, middlewares: traceMiddlewares } = require('@edirect/trace');
237
- const apmConfig = config.get('apm');
251
+ if (apmConfig.enabled) {
252
+ const apm = new APM(
253
+ apmConfig.service,
254
+ apmConfig.url,
255
+ apmConfig.traceServer,
256
+ );
257
+ apm.startTrace();
258
+ }
259
+ ```
238
260
 
239
- if (apmConfig.enabled) {
240
- const apm = new APM(apmConfig.service, apmConfig.url, apmConfig.traceServer);
241
- apm.startTrace();
242
- }
243
- ```
261
+ 6. Clean the middleware usage
244
262
 
245
- 6. Clean the middleware usage
263
+ If the service was using old trace version
246
264
 
247
- If the service was using old trace version
265
+ Replace:
248
266
 
249
- Replace:
267
+ ```js
268
+ if (apmConfig.enabled) {
269
+ app.use(new traceMiddlewares.Body().body);
270
+ }
271
+ ```
250
272
 
251
- ```js
252
- if (apmConfig.enabled) {
253
- app.use(new traceMiddlewares.Body().body);
254
- }
255
- ```
273
+ with:
256
274
 
257
- with:
258
-
259
- ```js
260
- app.use(new traceMiddlewares.Body().body);
261
- ```
275
+ ```js
276
+ app.use(new traceMiddlewares.Body().body);
277
+ ```
262
278
 
263
279
  ## Applying k8s configurations (Required)
264
280
 
@@ -267,99 +283,99 @@ We created a standard way to deploy our application configurations and simplify
267
283
  - Sometimes it could be already done by another team and you don't need to manage the configuration, just generate the configurations and apply it
268
284
  - `bolttech-broker-asia\staging\config-map.yaml` (or your environment config-map)
269
285
 
270
- ```yaml
271
- auth: #or your service
272
- trace:
273
- tags:
274
- scope: ie #your tech center
275
- env: ie-stag-broker #current k8s cluster environment
276
- cluster: stag-ie #current k8s cluster
277
- tenant: ${namespace}
278
- service: ${name}-${namespace}
279
- servicename: ${name}
280
- version: "1.0.0"
281
- owner: OWNER
282
- server: opentelemetry-collector.stag.bolttechbroker.net #cluster opentelemetry server
283
- ```
286
+ ```yaml
287
+ auth: #or your service
288
+ trace:
289
+ tags:
290
+ scope: ie #your tech center
291
+ env: ie-stag-broker #current k8s cluster environment
292
+ cluster: stag-ie #current k8s cluster
293
+ tenant: ${namespace}
294
+ service: ${name}-${namespace}
295
+ servicename: ${name}
296
+ version: '1.0.0'
297
+ owner: OWNER
298
+ server: opentelemetry-collector.stag.bolttechbroker.net #cluster opentelemetry server
299
+ ```
284
300
 
285
301
  Then you should generate and apply your brand new configurations:
286
302
 
287
303
  1. Generate
288
304
 
289
- This command will generate the new configuration files for the services.
305
+ This command will generate the new configuration files for the services.
290
306
 
291
- ```bash
292
- # Staging Clusters
293
- edi infra bolttech-broker-asia k8s generate <ENVIRONMENT> <SERVICE>
294
- edi infra bolttech-broker-asia k8s generate stage1-vnbroker rules-engine # VN Example
307
+ ```bash
308
+ # Staging Clusters
309
+ edi infra bolttech-broker-asia k8s generate <ENVIRONMENT> <SERVICE>
310
+ edi infra bolttech-broker-asia k8s generate stage1-vnbroker rules-engine # VN Example
295
311
 
296
- # Production Clusters
297
- edi infra <PRODUCTION_BROKER> k8s generate <ENVIRONMENT> <SERVICE>
298
- edi infra bolttech-broker-asia-hk k8s generate live-hkbroker-a policy-issuing-service --prod # HK Example
299
- ```
312
+ # Production Clusters
313
+ edi infra <PRODUCTION_BROKER> k8s generate <ENVIRONMENT> <SERVICE>
314
+ edi infra bolttech-broker-asia-hk k8s generate live-hkbroker-a policy-issuing-service --prod # HK Example
315
+ ```
300
316
 
301
317
  2. Apply
302
318
 
303
- This command will apply the new configurations and __redeploy__ the service on the cluster.
319
+ This command will apply the new configurations and **redeploy** the service on the cluster.
304
320
 
305
- ```bash
306
- # Staging Clusters
307
- edi infra bolttech-broker-asia k8s apply staging <STAGE/RC> <SERVICE> --redeploy
308
- edi infra bolttech-broker-asia k8s apply staging rc-vnbroker frontend-service --redeploy # VN Example
321
+ ```bash
322
+ # Staging Clusters
323
+ edi infra bolttech-broker-asia k8s apply staging <STAGE/RC> <SERVICE> --redeploy
324
+ edi infra bolttech-broker-asia k8s apply staging rc-vnbroker frontend-service --redeploy # VN Example
309
325
 
310
- # Production Clusters
311
- edi infra <PRODUCTION_BROKER> k8s apply <CLUSTER> <ENVIRONMENT> <SERVICE>
312
- edi infra bolttech-broker-asia-hk k8s apply cluster-a live-hkbroker-a plan-service --prod --redeploy # HK Example
313
- ```
326
+ # Production Clusters
327
+ edi infra <PRODUCTION_BROKER> k8s apply <CLUSTER> <ENVIRONMENT> <SERVICE>
328
+ edi infra bolttech-broker-asia-hk k8s apply cluster-a live-hkbroker-a plan-service --prod --redeploy # HK Example
329
+ ```
314
330
 
315
331
  - Key notes when using the infrastructure repositories:
316
- - Before running any command make sure you have completed the setup of the `edi-cli` tool and that you have all the related projects (`infrastructure` and `k8s-templates`) inside the same root folder.
317
- - Make sure to have the most recent version of the `master` branch before running any commands.
318
- - Remember to __ALWAYS COMMIT AND PUSH YOUR CHANGES TO THE REPOSITORIES, OTHERWISE THE NEW CONFIGURATIONS WILL NOT BE APPLIED TO SERVICES WHEN THEY ARE DEPLOYED USING THE JENKINS PIPELINES__.
319
- - To make things easier, make sure to check the helper script on `edi-cli` project. Located at the `edi-cli-cli` folder.
320
- - Consider hiding the folders of the brokers you will not need to work with. This will greatly improve your navigation inside the project.
332
+ - Before running any command make sure you have completed the setup of the `edi-cli` tool and that you have all the related projects (`infrastructure` and `k8s-templates`) inside the same root folder.
333
+ - Make sure to have the most recent version of the `master` branch before running any commands.
334
+ - Remember to **ALWAYS COMMIT AND PUSH YOUR CHANGES TO THE REPOSITORIES, OTHERWISE THE NEW CONFIGURATIONS WILL NOT BE APPLIED TO SERVICES WHEN THEY ARE DEPLOYED USING THE JENKINS PIPELINES**.
335
+ - To make things easier, make sure to check the helper script on `edi-cli` project. Located at the `edi-cli-cli` folder.
336
+ - Consider hiding the folders of the brokers you will not need to work with. This will greatly improve your navigation inside the project.
321
337
 
322
338
  ## Debugging
323
339
 
324
340
  - How to debug it on vscode:
325
341
 
326
- As we don't debug using node command directly, we suggest you to use this in your `.vscode/launch.json`
327
-
328
- ```json
329
- {
330
- "version": "0.2.0",
331
- "configurations": [
332
- {
333
- "type": "node",
334
- "request": "launch",
335
- "name": "Debug with OTEL",
336
- "args": ["${workspaceFolder}/src/main.ts"],
337
- "runtimeArgs": [
338
- "--inspect",
339
- "-r",
340
- "./node_modules/@edirect/trace/dist/otel.js",
341
- "-r",
342
- "tsconfig-paths/register",
343
- "-r",
344
- "ts-node/register",
345
- ],
346
- "console": "integratedTerminal",
347
- "envFile": "${workspaceFolder}/.development.env"
348
- },
349
- ]
350
- }
351
- ```
352
-
353
- and append the OTEL environment variables to your local environments file:
354
-
355
- ```conf
356
- TRACE_TAG_OWNER=OWNER
357
- TRACE_TAG_SCOPE=pgw
358
- TRACE_TAG_SERVICENAME=payment-gateway
359
- TRACE_TAG_TENANT=local-paythbroker
360
- TRACE_SERVER_URL=opentelemetry-collector.stag.bolttechpay.net
361
- TRACE_TAG_SERVICE=payment-gateway-local-paythbroker
362
- TRACE_TAG_VERSION=1.0.0
363
- TRACE_TAG_CLUSTER=localhost
364
- TRACE_TAG_ENV=development
365
- ```
342
+ As we don't debug using node command directly, we suggest you to use this in your `.vscode/launch.json`
343
+
344
+ ```json
345
+ {
346
+ "version": "0.2.0",
347
+ "configurations": [
348
+ {
349
+ "type": "node",
350
+ "request": "launch",
351
+ "name": "Debug with OTEL",
352
+ "args": ["${workspaceFolder}/src/main.ts"],
353
+ "runtimeArgs": [
354
+ "--inspect",
355
+ "-r",
356
+ "./node_modules/@edirect/trace/dist/otel.js",
357
+ "-r",
358
+ "tsconfig-paths/register",
359
+ "-r",
360
+ "ts-node/register"
361
+ ],
362
+ "console": "integratedTerminal",
363
+ "envFile": "${workspaceFolder}/.development.env"
364
+ }
365
+ ]
366
+ }
367
+ ```
368
+
369
+ and append the OTEL environment variables to your local environments file:
370
+
371
+ ```conf
372
+ TRACE_TAG_OWNER=OWNER
373
+ TRACE_TAG_SCOPE=pgw
374
+ TRACE_TAG_SERVICENAME=payment-gateway
375
+ TRACE_TAG_TENANT=local-paythbroker
376
+ TRACE_SERVER_URL=opentelemetry-collector.stag.bolttechpay.net
377
+ TRACE_TAG_SERVICE=payment-gateway-local-paythbroker
378
+ TRACE_TAG_VERSION=1.0.0
379
+ TRACE_TAG_CLUSTER=localhost
380
+ TRACE_TAG_ENV=development
381
+ ```