Statistics Detail Messages

Introduction

Statistics detail messages pass between the ManageApp and any other application (including itself) to request and return detailed information about the runtime statistics collected by that application.

!MANAGEMENT-STATISTICS-DETAIL-REQUEST

The !MANAGEMENT-STATISTICS-DETAIL-REQUEST message is sent by ManageApp to any application (including itself and the WatchdogApp) in order to get detailed information on that application’s collected and current statistics values and configuration.

The !MANAGEMENT-STATISTICS-DETAIL-REQUEST message has no attributes.

!MANAGEMENT-STATISTICS-DETAIL-RESPONSE

The !MANAGEMENT-STATISTICS-DETAIL-RESPONSE is returned by an application in response to an inbound !MANAGEMENT-STATISTICS-DETAIL-REQUEST message.

Note that all statistics in this response are separated and may contain statistics tags. For aggregated summary statistics, refer to the !MANAGEMENT-SUMMARY-REQUEST management message.

The attributes of the !MANAGEMENT-STATISTICS-DETAIL-RESPONSE message are:

Field Type Description
prefix String The configured global statistics prefix.
slice_secs String The configured application statistics slice seconds.
last_slice_start Integer An epoch value representing the time the most recent statistics slice began.
core_tags Object A configured statistics tags object.
gauges Object A statistics gauge values object.
slices Array A statistics slices array.

A sample response might look like:

{
    prefix           => 'something.',
    slice_secs       => 5,
    last_slice_start => 123,
    core_tags        => {
        c => 'd'
    },
    gauges           => {
        foo => {
            untagged => 2,
            tags     => {
                ab => { a => "b" }
            },
            tagged   => {
                ab => 3
            }
        }
    },
    slices           => [
        {
            counters => {
                foo => {
                    untagged => 2,
                    tags     => {
                        ab => { a => "b" }
                    },
                    tagged   => {
                        ab => 3
                    }
                }
            },
            timings => {
                foo => {
                    untagged => [ 2 ],
                    tags     => {
                        ab => { a => "b" }
                    },
                    tagged   => {
                        ab => [ 3 ]
                    }
                }
            }
        }
    ]
}

Configured Statistics Tags

The configured statistics tags object contains details of the global statistics tags that are configured for all applications as a simple key => value pair object.

{
    ...
    core_tags        => {
        c => 'd'
    },
    ...
}

In addition, any automatic statistics tags that apply for the application will also be included.

Statistics Gauge Values

The statistics gauge values object contains details of the statistics gauges for the application.

{
    ...
    gauges           => {
        foo => {
            untagged => 2,
            tags     => {
                ab => { a => "b" }
            },
            tagged   => {
                ab => 3
            }
        }
    },
    ...
}

Each key in the gauges object is a statistic ID, with the value being an object containing the following:

Statistics Slices

The statistics slices array contains all recorded statistics slices for an application, limited by the application’s stats_slice_count configuration parameter.

The last slice in the array has a collection start time defined by the returned last_slice_start. The first slice in the array is the oldest slice. Note that the last slice will almost certainly not contain a full slice_secs amount of entries, as it will still be being used.

{
    ...
    slices           => [
        {
            counters => {
                foo => {
                    untagged => 2,
                    tags     => {
                        ab => { a => "b" }
                    },
                    tagged   => {
                        ab => 3
                    }
                }
            },
            timings => {
                foo => {
                    untagged => [ 2 ],
                    tags     => {
                        ab => { a => "b" }
                    },
                    tagged   => {
                        ab => [ 3 ]
                    }
                }
            }
        }
    ],
    ...
}

Each statistics slice array member is an object containing:

Slice Statistics Counters

Each key in the slice’s statistics counters object is a statistic ID, with the value being an object of the same structure as for statistics gauges, showing the current value of the counter.

{
    ...
    slices           => [
        {
            counters => {
                foo => {
                    untagged => 2,
                    tags     => {
                        ab => { a => "b" }
                    },
                    tagged   => {
                        ab => 3
                    }
                }
            },
            ...
        }
    ],
    ...
}

Counter values are reset to zero for each new slice, but the structure is not removed. An application that has been running for a long time will therefore likely have many more tag/value combinations than one that has just started.

Counter values are lost completely when an application is restarted and are only present after being incremented at least once.

Slice Statistics Timings

Each key in the slice’s statistics timings object is a statistic ID, with the value being an object of the same structure as for statistics gauges with the difference that the untagged and tagged values are arrays of integers instead of integers, showing the time used (in milliseconds) for measured operations.

{
    ...
    slices           => [
        {
            ...
            timings => {
                foo => {
                    untagged => [ 2 ],
                    tags     => {
                        ab => { a => "b" }
                    },
                    tagged   => {
                        ab => [ 3 ]
                    }
                }
            },
        }
    ],
    ...
}

Timings values are reset to an empty array for each new slice, but the structure is not removed. An application that has been running for a long time will therefore likely have many more tag/value combinations than one that has just started.

Timings values are lost completely when an application is restarted.