{
"id": "publish_metrics",
"schema": {
"type": "object",
"title": "",
"additionalProperties": false,
"properties": {
"fields": {
"title": "Add metrics",
"description": "List of metrics from event to extract and format. Formatted metrics can be used by a destination to pass metrics to a metrics aggregation platform.",
"type": "array",
"minItems": 0,
"items": {
"type": "object",
"required": ["inFieldName", "metricType"],
"properties": {
"inFieldName": {
"type": "string",
"title": "Event Field Name",
"description": "The name of the field in the event that contains the metric value"
},
"outFieldExpr": {
"type": "string",
"title": "Metric Name Expression",
"description": "JavaScript expression to evaluate the metric field name. Defaults to Event Field Name.",
"jsExpression": true
},
"metricType": {
"type": "string",
"title": "Metric Type",
"enum": [
"counter",
"timer",
"gauge",
"distribution",
"summary",
"histogram"
],
"enumNames": [
"Counter",
"Timer",
"Gauge",
"Distribution",
"Summary",
"Histogram"
],
"default": "gauge"
}
}
}
},
"overwrite": {
"type": "boolean",
"title": "Overwrite",
"description": "Overwrite previous metric specs. Leave disabled to append.",
"default": false
},
"dimensions": {
"type": "array",
"title": "Add dimensions",
"description": "Optional list of dimensions to include in events. Wildcards supported. If you don't specify metrics, values will be appended to every metric found in the event. When you add a new metric, dimensions will be present only in those new metrics.",
"default": ["!_*", "*"],
"items": {
"type": "string"
}
},
"removeMetrics": {
"title": "Remove metrics",
"description": "Optional list of metric field names to look for when removing metrics. When a metric's field name matches an element in this list, the metric will be removed from the event.",
"type": "array",
"default": [],
"items": {
"type": "string"
}
},
"removeDimensions": {
"type": "array",
"title": "Remove dimensions",
"description": "Optional list of dimensions to remove from every metric found in the event. Wildcards supported.",
"default": [],
"items": {
"type": "string"
}
}
}
}
}