1.1.6 • Published 5 years ago

opc-dataflow-trace v1.1.6

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

Data Flow Tracing (DFT)

Data Flow Tracing is a tool to monitor the status of data flow by milestones.

Installation

npm install opc-dataflow-trace

How To Use (sample)

  • Require it in your application
const DFT = require('opc-dataflow-trace');
  • initDataFlow, it will init a dataflow sender
DFT.initDataFlow({ 
        appKey: '3495f290-ceb7-11e9-a993-8f573bffb7d3', 
        serverUrl: 'http://DFT_server/api/milestone/tracing', 
        needPrintSuccessLog: true 
    }, 
    null, 
    'SI submission');
  • send milestone to DFT server
DFT.milestone({ 
        traceData: {bkg_num: '443215123'}, 
        opcTracingId: '932837035', 
        milestoneKey: 'SAVE_BR_TO_DB', 
        isPassed: true
    }, 
    'SI submission');

Functions

  1. initDataFlow(options, logger, dataFlowName = 'default')
ParametersTypeDescriptionMandatoryDefault value
optionsObjectdetail as belowY-
options.appKeyStringan unique appKey generated by DFT server for your data flowY-
options.serverUrlStringDFT server URLY-
options.proxyStringif you need a proxy to DFT serverN-
options.needPrintSuccessLogBooleanoutput the success log after send milestoneN-
loggerStringuse your logger to re-direct the success logN'console'
dataFlowNameStringmust keep it same as the dataFlowName in below 'milestone' functionN'default'
  1. milestone(data, dataFlowName = 'default')
ParametersTypeDescriptionMandatoryDefault value
dataObjectdetail as belowY-
data.traceDataObject/StringYou can post some data for better trouble shooting, such as bkg_numN-
data.opcTracingIdStringan unique id from your application. make sure it must be uniqueY-
data.milestoneKeyStringa milestone code which align between dev team & opc teamY-
data.isPassedBooleanspecify whether this milestone/step is successfully proceed by your applicationYfalse
dataFlowNameStringmust keep it same as the dataFlowName in above 'initDataFlow' functionN'default'
1.1.6

5 years ago

1.1.5

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago