Lattice service call statistics rollup
What it does. Rebuilds the daily totals per service operation (calls, successes, failures and durations) that Service call statistics shows, from the service call log of the last 30 days. Runs: automatically once a day as a background process. Who looks after it: Integration administrator (running it now, and what the call log keeps); System administrator (the background process itself, on a standard page).
Purpose
The service call log holds one row per call, which is the right place to investigate one request but a poor place to see a trend. The rollup turns the log into one row per service operation per day, so you can see at a glance that a partner stopped sending, that failures started on a given day, or that an operation slowed down.
Without it, Service call statistics and the LatticeServiceCallStatistics entity stay empty, or stop at the
last day the rollup ran. Nothing else in Lattice depends on these rows: calls, retries and events carry on.
When it runs
- Once a day, at about the time of day the process was first registered; set Next execution to change it. It is one process for the whole environment: the call log and the statistics are shared by every legal entity.
- The database synchronization of a Lattice deployment registers it, and process automation must be initialized in the environment. There is no batch job for you to create.
- Every poll creates a batch job named Lattice service call statistics rollup; the process does not first check whether there is anything to do.
- An Integration administrator can run the same job at any time with Service call statistics rollup (see below), for example to see today's numbers before the next daily run.
Configuration and scheduling
| Setting | Where | Default |
|---|---|---|
| How often and when it runs | System administration > Setup > Process automations, Background processes tab: select Lattice service call statistics rollup and choose Edit, then Repeat interval and Next execution on the Execution parameters tab | Once a day |
| A time of day when it does not run | The same dialog, Sleep time period group (Enabled sleep period, Sleep from, Sleep to) | Not set by Lattice |
| Run it now, or with another window | System administration > Periodic tasks > Lattice > Service call statistics rollup (also on the action pane of Service call statistics and in the Links of the Integration operations workspace), field Rebuild window (days) | 30 |
| Which calls reach the log, and for how long | System administration > Setup > Lattice > Service operation logging configuration, Logging level and Retention (days) per operation | Errors only for the six status queries, All for every other operation; global retention |
- The background process takes no parameters: it always rebuilds 30 days. Rebuild window (days) applies only to a run you start from the menu item. The dialog can also schedule that run as a batch job; do not do that: the background process always runs, and both would rebuild the same days.
- A deployment keeps the interval, next execution and owner you set. The process cannot be switched off; to keep it out of busy hours, set Enabled sleep period or Next execution in Edit.
- The Process automations page is a standard page that only the System administrator role opens. Service call statistics rollup needs the Integration administrator role; operators and read-only users see Service call statistics without the button.
How it works
- Find the window. The first day of the window is the UTC date 30 days before the run (the rebuild window when you run it from the menu item). The window runs from midnight UTC of that day to the moment of the run.
- Clear the window. Every statistics row dated on or after that first day is deleted.
- Read the log. The service call log rows that started in the window are read in order of service, operation and start time.
- Write one row per operation per day. For each service, operation and UTC date the process writes Calls, Successes (calls logged as successful), Failures (every other call), Total duration (ms), Minimum duration (ms), Maximum duration (ms), Average duration (ms) (the total divided by the calls, rounded down) and Last call.
- Commit once. Steps 2 to 4 are one transaction: the old rows stay in place until the new ones are complete, and a failure leaves the statistics as they were.
Rows older than the window are never touched by the rollup; the integration log cleanup deletes them. Running the rollup again over the same window gives the same rows.
Before it can run
- Process automation is initialized in the environment (System administration > Setup > Initialize process automations creates the batch job that polls every background process), Lattice was deployed with a database synchronization, which registers the process (a synchronization from Visual Studio registers nothing), and the batch service is running.
- The service call log has rows. Every service operation writes to it, but an operation set to Off writes nothing, and the status queries log only their failures unless they have a row set to All. See Tuning how much an operation logs.
- Nothing else: there is no setup row, and a license warning or block does not stop it.
Inputs and outputs
| What | Where you see it | |
|---|---|---|
| Reads | The service call log of the window | Service call log, LatticeServiceCallLogs |
| Deletes | Statistics rows dated on or after the first day of the window | |
| Writes | One statistics row per service, operation and UTC date | Service call statistics, LatticeServiceCallStatistics |
It raises no business event and changes no business data.
Monitoring and logs
- System administration > Setup > Process automations, Background processes tab: select the process and choose View most recent results. Each run shows "Lattice service call statistics rollup finished.", or "Lattice service call statistics rollup failed. The messages below give the reason; the process runs again at its next interval." with the messages.
- System administration > Inquiries > Batch jobs: the batch job named Lattice service call statistics rollup. Its log holds the run's message: "Lattice service call statistics rollup completed for the last 30 day(s)." or "Lattice service call statistics rollup failed: " followed by the reason.
- System administration > Inquiries > Lattice > Services > Service call statistics: after a run the newest Date is today (UTC), and Last call matches the latest call in the log.
When it fails
The rollup catches its own errors: the whole rebuild is rolled back, the old statistics stay, and the batch job's log shows "Lattice service call statistics rollup failed: " with the reason. Because the error is handled inside the job, View most recent results still records the run as finished, so read the batch job's log when the numbers look stale. The batch framework does not retry the run; the next daily run tries again, or you run it now from the menu item.
| Symptom | Cause | Fix |
|---|---|---|
| Service call statistics is empty | The process is not running (process automation not initialized, Lattice deployed without the database synchronization that registers its processes, or the batch service stopped), or no call was logged | Check the process on Process automations and its batch jobs; check Logging level for the operations you expect |
| Today's calls are missing | The rollup runs once a day | Run Service call statistics rollup now |
| Successes stays at 0 for one operation | Its Logging level is Errors only (the default of the status queries), so only failed calls reach the log | Set it to All if you need the successes counted |
| An operation is missing entirely | Its Logging level is Off, or it is a status query that has not failed in the window | Expected; see the logging guide linked above |
| Older days vanish for one operation | Its Retention (days) is shorter than 30, so each rebuild finds fewer log rows for it | Raise its Retention (days) to 30 or more |
| The batch job log shows "Lattice service call statistics rollup failed: ..." | The rebuild hit a database error, for example a timeout on a very large log | Read the reason, then run it again from the menu item, if needed with a smaller Rebuild window (days) |
Effect on the rest of Lattice
- Only Service call statistics and the
LatticeServiceCallStatisticsentity depend on it. - The statistics follow the call log. An operation at Errors only shows only its failures, an operation at Off does not appear, and an operation whose Retention (days) is under 30 keeps statistics only for the days its log rows survive, because every run rebuilds the whole window from what the log still holds.
- The integration log cleanup deletes statistics rows dated more than 90 days ago, the same window as the service call log.
- Each run reads 30 days of the call log in one transaction. On a busy environment, move Next execution to a quiet hour.