Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Monitoring Flux Services

Having a lot of Flux Services running can be difficult to manage. Sometimes, you may want to get an overview of your services or inspect their individual behavior. In this section, we will look at some methods that can help you monitor your Flux Services.

Using the Integrate Service Manager

The Integrate Service Manager provides a list of services that are currently running on a TORO Integrate instance. You can use this tool to monitor all running Flux Services as well as terminate them if you want to.

Using Loggers

The Flux Engine logs different kinds of information depending on the current log level. By default, its logger level is set to INFO which will provide exceptions and warnings that occur during its execution. To retrieve more information about Flux executions, edit or add io.toro.fluxengine's log level to DEBUG. Setting it to this level will yield information about:

  • The start and termination of a service
  • State and transition executions
  • Triggered services
  • External events
  • The debugger

Here are some sample log messages sent when the Flux Engine's logger is set to the DEBUG level:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
16/03/18 15:42:45.036 DEBUG [FluxStateProcessor] Started flux integration-223
16/03/18 15:42:45.091 DEBUG [FluxStateProcessor] Processing state state=state_A flux=integration-223
16/03/18 15:42:45.145 DEBUG [FluxStateProcessor] Invoking action for state=state_A flux=integration-223 action=io.toro.gloop.service.step.invoke.InvokeCodeStep(className:io.toro.integrate.LoggerMethods, methodName:println, returnType:null, parameters:[String], exceptions:[], inputModel:input = null, outputModel:output = null, iconName:java)
16/03/18 15:42:45.279 DEBUG [ProcessTransition] Processing transition event=proceed state=state_A flux=integration-223
16/03/18 15:46:20.978 DEBUG [FluxManagerImpl] External event received for flux request io.toro.fluxengine.model.event.FluxEvent([], trigger, jsonObject{})
16/03/18 15:46:21.742 DEBUG [TriggerFluxServices] Triggered flux services: [io.toro.fluxengine.model.event.PostEventState(227, state_A)]
16/03/18 15:42:45.366 DEBUG [FluxManagerImpl] Termination requested for flux id=223
16/03/18 15:48:38.789 DEBUG [FluxDebuggerImpl] On breakpoint state=state_A flux=integration-231
16/03/18 15:48:39.740 DEBUG [FluxDebuggerImpl] State suspended state=state_A flux=integration-231
16/03/18 15:48:45.720 DEBUG [FluxDebuggerImpl] State step INTO state=state_A flux=integration-231
16/03/18 15:48:48.685 DEBUG [FluxDebuggerImpl] Transition stepped over transition=proceed state=state_A flux=integration-231
16/03/18 15:48:51.733 DEBUG [FluxDebuggerImpl] State step OVER state=state_B flux=integration-231

Changing log levels

To change the Flux Engine's log level, you can either modify your <toro-integrate-home>/conf/log4j.properties file or update its logger via the UI.

Using Tracker

Another way to monitor the behavior of Flux Services is by using Tracker. The Flux Engine adds a tracker document when a Flux Services is executed and a document state is added for each of the following scenarios:

  • Start of Execution - where the document state contains the context of the Flux Service in a JSON file.
  • Execution of a State - where the document state contains the context of the invoked state in a JSON file.
  • Occurrence of an Exception - where the document contains the stacktrace of the exception from the {stateName}-error.log file.
  • End of Execution

Flux and Tracker

A Flux Service will not be logged to Tracker if it is debugged or invoked using the Coder IDEs.

By default, the properties of a Flux tracker document are defined as follows:

  • Internal ID

    By default, this is a random 40-digit hex value. It can be overridden by adding a String $fluxTrackerId as a Flux input.

  • External ID

    The time in milliseconds when the execution started.

  • Document Type

    The value is FluxExecution by default, can be overridden by adding a String $fluxTrackerDocumentType as a Flux input.

  • Sender ID

    The context ID of the Flux execution.

  • Receiver ID

    The value is set to Flux.