{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "data": {
            "properties": {
                "annotations": {
                    "additionalProperties": {
                        "type": "string"
                    },
                    "properties": {
                        "finalTimestamp": {
                            "_format": "date-time",
                            "type": "string"
                        },
                        "initTimestamp": {
                            "_format": "date-time",
                            "type": "string"
                        }
                    },
                    "required": [
                        "initTimestamp",
                        "finalTimestamp"
                    ],
                    "type": "object"
                },
                "counters": {
                    "$ref": "#/definitions/metricsList"
                },
                "gauges": {
                    "$ref": "#/definitions/metricsList"
                },
                "timers": {
                    "$ref": "#/definitions/metricsList"
                },
                "version": {
                    "pattern": "^2e$",
                    "type": "string"
                }
            },
            "required": [
                "annotations",
                "version"
            ],
            "type": "object"
        },
        "dataElement": {
            "properties": {
                "values": {
                    "items": {
                        "$ref": "#/definitions/sampleObject"
                    },
                    "type": "array"
                }
            },
            "required": [
                "values"
            ],
            "type": "object"
        },
        "metricsList": {
            "additionalProperties": {
                "$ref": "#/definitions/dataElement"
            },
            "type": "object"
        },
        "sampleObject": {
            "properties": {
                "unit": {
                    "enum": [
                        "nanosecond",
                        "microsecond",
                        "millisecond",
                        "second",
                        "minute",
                        "hour",
                        "day",
                        "week",
                        "bit",
                        "byte",
                        "kilobit",
                        "kilobyte",
                        "megabit",
                        "megabyte",
                        "gigabit",
                        "gigabyte",
                        "terabyte",
                        "petabyte"
                    ],
                    "type": "string"
                },
                "value": {
                    "type": "number"
                }
            },
            "required": [
                "value"
            ],
            "type": "object"
        }
    },
    "description": "log file entry for ingestion by tsd aggregator",
    "properties": {
        "context": {
            "properties": {},
            "type": "object"
        },
        "data": {
            "$ref": "#/definitions/data"
        },
        "id": {
            "type": "string"
        },
        "level": {
            "pattern": "^info$",
            "type": "string"
        },
        "name": {
            "pattern": "^aint.metrics$",
            "type": "string"
        },
        "time": {
            "_format": "date-time",
            "type": "string"
        }
    },
    "required": [
        "time",
        "name",
        "level",
        "data"
    ],
    "title": "Query Log",
    "type": "object"
}