Metricsets

edit

Metricsets contain application metric data captured by an APM agent.

Metricset Schema

edit

The APM Server uses JSON Schema for validating requests. The specification for metricsets is defined below:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$id": "docs/spec/metricsets/common_metricset.json",
    "type": "object",
    "description": "Metric data captured by an APM agent",
    "properties": {
        "samples": {
            "type": ["object"],
            "description": "Sampled application metrics collected from the agent.",
            "patternProperties": {
                "^[^*\"]*$": {
                    "$ref": "sample.json"
                }
            },
            "additionalProperties": false
        },
        "tags": {
            "type": ["object", "null"],
            "description": "A flat mapping of user-defined tags with string values.",
            "patternProperties": {
                "^[^*\"]*$": {
                    "type": ["string", "null"],
                    "maxLength": 1024
                }
            },
            "additionalProperties": false
        }
    },
    "required": ["samples"]
}
{
    "$id": "docs/spec/metricsets/v2_metricset.json",
    "type": "object",
    "description": "Data captured by an agent representing an event occurring in a monitored service",
    "allOf": [

        { "$ref": "common_metricset.json"  },
        { "$ref": "../timestamp_epoch.json"},
        {"required": ["timestamp"], "properties": {"timestamp": { "type": "integer" }}}
    ]
}