Skip to content

Commit

Permalink
Add AWS Xray integration - update XRay daemon URL
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagojsag authored and Henrique Pacheco committed Apr 20, 2021
1 parent 4a1a8e5 commit 75ca748
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ const init: () => Promise<IInit> = async (): Promise<IInit> => {
})
}));

// @ts-ignore
app.use(xrayKoa.openSegment('Authentication'));

app.use(flash());

app.use(views(`${__dirname}/views`, { extension: 'ejs' }));
Expand Down Expand Up @@ -80,6 +77,8 @@ const init: () => Promise<IInit> = async (): Promise<IInit> => {
}
});



app.use(RWAPIMicroservice.bootstrap({
name: 'authorization',
info: require('../microservice/register.json'),
Expand All @@ -92,10 +91,14 @@ const init: () => Promise<IInit> = async (): Promise<IInit> => {
fastlyEnabled: process.env.FASTLY_ENABLED as boolean | 'true' | 'false',
fastlyServiceId: process.env.FASTLY_SERVICEID,
fastlyAPIKey: process.env.FASTLY_APIKEY

}));

app.use(koaLogger());

AWSXRay.setDaemonAddress('xray-service.default:2000');
// @ts-ignore
app.use(xrayKoa.openSegment('Authentication'));

loadRoutes(app);

const port: string = process.env.PORT || '9000';
Expand Down

0 comments on commit 75ca748

Please sign in to comment.