Skip to content

Add collection time bucket to GroupedTableAppenderResponse #33

Open
@zikato

Description

@zikato

I'd like to trend aggregated data for insights over time.

Example:

XE definition

create event session wait_info on server
add event sqlos.wait_info
(
    where opcode = 'end'
)

json config (simplified)

{
    "Target": {
        "ServerName": "server",
        "SessionName": "wait_info ",
        "FailOnProcessingError": false,
        "Responses": [
            {
                "__type": "GroupedTableAppenderResponse",
                "ServerName": "localhost",
                "DatabaseName": "XeSmartTarget",
                "TableName": "WaitInfoHistogram",
                "AutoCreateTargetTable": true,
                "UploadIntervalSeconds": 10,
                "Events": [
                    "wait_info"
                ],
                "OutputColumns": [
                    "database_id",
                    "MAX(collection_time) AS max_collection_time", 
                    "SUM(duration) AS sum_duration_ms"
                ]
            }
        ]
    }
}

Current

It will group by database_id sum duration of waits. For each collection it will then merge with what's in the table so I get total waits per DB since the collection started (similar to how SQL Server tracks wait stats since last restart)

Ideal

Introduce a date bucket syntax for the collection_time column
For example:

So instead of collection_time , I'd have something like bin(collection_time, 5m) and have the aggregates in 5-minute intervals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions