File tree Expand file tree Collapse file tree 4 files changed +23
-23
lines changed
Expand file tree Collapse file tree 4 files changed +23
-23
lines changed Original file line number Diff line number Diff line change 3939 ],
4040 "license" : " ISC" ,
4141 "dependencies" : {
42- "@frmscoe/frms-coe-lib" : " ^0.3.2 " ,
42+ "@frmscoe/frms-coe-lib" : " ^0.3.5 " ,
4343 "@frmscoe/frms-coe-startup-lib" : " ^0.0.14" ,
4444 "@log4js-node/logstash-http" : " ^1.1.0" ,
4545 "arangojs" : " ^8.4.0" ,
4646 "dotenv" : " ^8.6.0" ,
47- "elastic-apm-node" : " ^3.49.0" ,
4847 "log4js" : " ^6.4.0" ,
4948 "tslib" : " ^2.6.0" ,
5049 "uuid" : " ^8.3.2"
Original file line number Diff line number Diff line change 1- import apm from 'elastic-apm-node ' ;
1+ import { Apm } from '@frmscoe/frms-coe-lib/lib/services/apm ' ;
22import { configuration } from './config' ;
33/*
44 * Initialize the APM Logging
55 **/
6- if ( configuration . apm . active === 'true' ) {
7- apm . start ( {
8- serviceName : configuration . serviceName ,
9- secretToken : configuration . apm ?. secretToken ,
10- serverUrl : configuration . apm ?. url ,
11- usePathAsTransactionName : true ,
12- active : Boolean ( configuration . apm ?. active ) ,
13- transactionIgnoreUrls : [ '/health' ] ,
14- } ) ;
15- }
6+ const apm = new Apm ( {
7+ serviceName : configuration . serviceName ,
8+ secretToken : configuration . apm ?. secretToken ,
9+ serverUrl : configuration . apm ?. url ,
10+ usePathAsTransactionName : true ,
11+ active : Boolean ( configuration . apm ?. active ) ,
12+ transactionIgnoreUrls : [ '/health' ] ,
13+ } ) ;
14+
15+ export default apm ;
Original file line number Diff line number Diff line change 11/* eslint-disable @typescript-eslint/no-non-null-assertion */
22/* eslint-disable @typescript-eslint/no-explicit-any */
3- import apm from 'elastic- apm-node ' ;
3+ import apm from '../ apm' ;
44import { type Message , type NetworkMap } from '@frmscoe/frms-coe-lib/lib/interfaces' ;
55import { Alert } from '../classes/alert' ;
66import { ChannelResult } from '../classes/channel-result' ;
@@ -16,7 +16,7 @@ const calculateDuration = (startTime: bigint): number => {
1616} ;
1717
1818export const handleExecute = async ( rawTransaction : any ) : Promise < any > => {
19- let apmTransaction : apm . Transaction | null = null ;
19+ let apmTransaction = null ;
2020 try {
2121 const startTime = process . hrtime . bigint ( ) ;
2222 // Get the request body and parse it to variables
You can’t perform that action at this time.
0 commit comments