Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Otp |
---|
The
...
Module
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | The module itself is an object of type TransactionLogger. | ||||||
Examples |
You can use directly the module to trace transactions |
Anchor | ||||
---|---|---|---|---|
|
constructor
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Creates an object of type TransactionLogger. | ||||||
Arguments | logPath | The path where the log files will be written. | |||||
Examples |
|
...
startTransaction
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Traces the start of a transaction and return a Transaction object. | ||||||
Arguments | name | The name of the transaction. | |||||
Examples |
|
processLogger
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | An object of type ProcessLogger. | ||||||
Examples |
|
Anchor | ||||
---|---|---|---|---|
|
constructor
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Creates an object of type ProcessLogger. | ||||||
Arguments | logPath | The path where the log files will be written. | |||||
Examples |
|
...
processStart
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Traces the start of a process. | ||||||
Arguments | processName | The name of the process. | |||||
processId | The process id. | ||||||
eventName | The start event name. | ||||||
Examples |
|
processEnd
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Traces the end of a process. | ||||||
Arguments | processName | The name of the process. | |||||
processId | The process id. | ||||||
eventName | The end event name. | ||||||
Examples |
|
processStateStart
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Traces the start of a state. | ||||||
Arguments | processName | The name of the process. | |||||
processId | The process id. | ||||||
stateName | The state name. | ||||||
Examples |
|
processStateEnd
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Traces the end of a state. | ||||||
Arguments | processName | The name of the process. | |||||
processId | The process id. | ||||||
stateName | The state name. | ||||||
Examples |
|
processChoice
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Traces a choice. | ||||||
Arguments | processName | The name of the process. | |||||
processId | The process id. | ||||||
gateway | The gateway name. | ||||||
choice | The choice name. | ||||||
Examples |
|
processEvent
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Traces an event. | ||||||
Arguments | processName | The name of the process. | |||||
processId | The process id. | ||||||
eventName | The eventname. | ||||||
Examples |
|
processValueString
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Traces a value of a String type. | ||||||
Arguments | processName | The name of the process. | |||||
processId | The process id. | ||||||
key | The key. | ||||||
value | The value | ||||||
Examples |
|
processValueFloat
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Traces a value of a Float type. | ||||||
Arguments | processName | The name of the process. | |||||
processId | The process id. | ||||||
key | The key. | ||||||
value | The value | ||||||
Examples |
|
processValueDateTime
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Traces a value of a Date type. | ||||||
Arguments | processName | The name of the process. | |||||
processId | The process id. | ||||||
key | The key. | ||||||
value | The value | ||||||
Examples |
|
Anchor | ||||
---|---|---|---|---|
|
A Transaction object is returned by the startTransaction method of a TransactionLogger. It is then used to trace what happens inside the transaction using startIO or any ProcessLogger method. Using transactions to trace processes instead of a ProcessLogger directly allows you to correlate the process steps and IOs of these transactions.
end
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Traces the end of a transaction. | ||||||
Arguments | state | The state of the transaction. It can be true or 'OK' for a success, false or 'ERROR' for a failed. Default: 'OK' | |||||
Examples |
|
startIO
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Trace the start of an IO call and return an IO object. | ||||||
Arguments | name | The name of the IO call | |||||
domain | The domain of the IO call | ||||||
system | The system of the IO call | ||||||
Examples |
|
Anchor | ||||
---|---|---|---|---|
|
An IO object is returned by the startIO method of a Transaction. It is then used to trace the end of the IO call.
end
Syntax |
| ||||||
---|---|---|---|---|---|---|---|
Semantics | Traces the end of a IO call. | ||||||
Arguments | state | The state of the IO call. It can be true or 'OK' for a success, false or 'ERROR' for a failed. Default: 'OK' | |||||
Examples |
|
transactionLoggerMiddleware
A function that returns a middle ware which can be used with express. It will automatically start a transaction when a request arrives and end it when the response is sent. The Transaction object will be available in the request object as trx.
Arguments | options | object | |||||
---|---|---|---|---|---|---|---|
| The path where the log files will be written. | ||||||
| The name that should be given to the transactions. Can be a function taking the request and response as parameter and returning the name. By default the name will be the URL of the request. | ||||||
Examples |
|
Panel | ||
---|---|---|
| ||
|