The fact of throwing or not MONIT traces would be configured at the ESB entry points. In a BC Consume, a configuration parameter will indicate whether or not to throw all MONIT traces behind this entry point. The MONIT trace would be logged according to the configuration of the loggers.
To limit the generation of MONIT traces has been limited their "throwing" because the generation is always controlled by the log system and the configuration of the loggers. If the logger is set to 'SEVERE' it will not be possible to generate MONIT traces. The idea is to say: we activate MONIT on all the loggers and we limit the "throwing".
With this approach we address several use cases:
- the use case where we want to activate or deactivate the MONIT traces of certain service consumers / providers, whatever the flows in which they are used,
- the use case where we want to deactivate the MONIT traces of some flows whatever the service consumers / providers used, the flow being identified by the ESB entry point,
- the use case where we want to activate the MONIT traces of certain flows whatever the service consumers / providers used. But do not generate MONIT traces for some of these service consumers / providers.
The configuration will be done via two new configuration parameters. They will be managed by the Petals CDK:
- 'activate-flow-tracing': control whether the traces MONIT should be generated or not:
- defined at component level
- overloaded by service consumer or service provider definition (section 'consumes' or 'provides' in JBI descriptor (jbi.xml))
- overloaded by the property 'org.ow2.petals.monitoring.activate-flow-tracing' of incoming message exchange processed by service provider.
- can be overloaded by external service consumer, see below how it is overloaded
- default: value of the parameter 'activate-flow-tracing' defined at component level (default value true),
- if 'true': the MONIT traces are raised,
- if 'false': MONIT traces are not raised,
- the component configuration value could be updated via JMX API (MBean runtime): true, false, <empty>
- 'propagate-flow-tracing-activation': check whether the setting 'activate-flow-tracing' of the current step should be propagated to subsequent steps or not through message exchange:defined at component level
- defined at component level
- overloaded by service consumer definition (section 'consumes' in JBI descriptor (jbi.xml))
- default value: value of the parameter 'propagate-flow-tracing-activation' defined at component level (default value true),
- if 'true': the setting is propagated,
- if 'false': the setting is not propagated,
- the component configuration value could be updated via JMX API (MBean runtime): true, false, <empty>
For BC SOAP and BC REST, the flow tracing activation may be overloaded by HTTP header 'org.ow2.petals.monitoring.activate-flow-tracing'.
For BC JMS, the flow tracing activation may be overloaded by JMS message property 'org.ow2.petals.monitoring.activate-flow-tracing'.
For BC Gateway, the flow tracing activation may be overloaded by the exchange coming from the consumer domain through the exchange property 'org.ow2.petals.monitoring.activate-flow-tracing'.
For the following components, the flow tracing activation propagation is done from the provider side to the consumer side: BC Gateway, SE ASE, SE Camel, SE EIP, SE Flowable.
For the following components, the flow tracing activation propagation is done from the consumer side to the provider side: BC Gateway, BC JMS, BC SOAP, BC REST.
Adding MONIT trace configuration to Petals BC JMS is postponed to version 5.4.0 or upper