File tree Expand file tree Collapse file tree 7 files changed +57
-351
lines changed
Expand file tree Collapse file tree 7 files changed +57
-351
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,9 @@ const exporter = new JaegerExporter({
5252
53537 . Deploy the example to OpenShift local
5454
55- * Uncomment the ` require('./tracing.js'); ` on ` app.js `
56-
5755```
5856npm install
59- npm run openshift
57+ npm run openshift:enable:trace
6058```
6159
62608 . When you login on Jaeger UI you can see the result like this:
Original file line number Diff line number Diff line change @@ -15,13 +15,12 @@ $ npm install
1515$ npm start
1616```
1717
18- If you want debug information, you can set ` DEBUG ` environment variable and start the application:
18+ This will launch the application on port 8080.
1919
20- ```
21- $ DEBUG=* npm start
22- ```
20+ Other options:
2321
24- This will launch the application on port 8080.
22+ * ` npm run dev ` same as ` npm start ` but with pretty output log.
23+ * ` npm run dev:debug ` shows debug information.
2524
2625### OpenShift Local
2726
@@ -38,5 +37,4 @@ $ npm run openshift # Deploys the example app
3837
3938### OpenTelemetry with OpenShift Distributed Tracing Platform
4039
41- This [ link] ( ./OTEL.md ) contains instructions on how to install the
42- OpenShift Distributed Tracing Platform and enable tracing.
40+ This [ link] ( ./OTEL.md ) contains instructions on how to install the OpenShift Distributed Tracing Platform and enable tracing.
Original file line number Diff line number Diff line change 1818 *
1919 */
2020
21- // require('./tracing.js');
22-
2321const path = require ( 'path' ) ;
2422const express = require ( 'express' ) ;
2523const bodyParser = require ( 'body-parser' ) ;
Original file line number Diff line number Diff line change 2424 * Module dependencies.
2525 */
2626
27- const pinoDebug = require ( 'pino-debug' ) ;
28- const pino = require ( 'pino' ) ;
29- const logger = pino ( {
30- transport : {
31- target : 'pino-pretty'
32- }
33- } ) ;
34- pinoDebug ( logger ) ;
35-
27+ const logger = require ( '../logger.js' ) ;
3628const app = require ( '../app' ) ;
3729const http = require ( 'http' ) ;
3830
@@ -93,10 +85,10 @@ function onError (error) {
9385 // handle specific listen errors with friendly messages
9486 switch ( error . code ) {
9587 case 'EACCES' :
96- console . error ( bind + ' requires elevated privileges' ) ;
88+ logger . error ( bind + ' requires elevated privileges' ) ;
9789 process . exit ( 1 ) ;
9890 case 'EADDRINUSE' :
99- console . error ( bind + ' is already in use' ) ;
91+ logger . error ( bind + ' is already in use' ) ;
10092 process . exit ( 1 ) ;
10193 default :
10294 throw error ;
Original file line number Diff line number Diff line change 1+ const pino = require ( 'pino' ) ;
2+
3+ module . exports = pino ( { } ) ;
You can’t perform that action at this time.
0 commit comments