metricv0.0.1
An event has occurred that increments a metric
Context
An event has occurred that increments a metric.
Trigger
An event that is to be monitored and measured. Up to 20 metrics per event.
Effect
The event is transformed and forwarded to the OPG Digital metrics service data stream to be used in quantifying performance and productivity of OPG Digital services.
Consumer / Producer Diagram
Examples
1{
2 "metrics": [
3 {
4 "metric": {
5 "Project": "MRLPA",
6 "Category": "metric",
7 "Subcategory": "FunnelCompletionRate",
8 "Environment": "demo",
9 "MeasureName": "DONORJOURNEYCOMPLETED",
10 "MeasureValue": "1",
11 "MeasureValueType": "BIGINT",
12 "Time": "1744275915000"
13 }
14 },
15 {
16 "metric": {
17 "Project": "MRLPA",
18 "Category": "metric",
19 "Subcategory": "FunnelCompletionRate",
20 "Environment": "demo",
21 "MeasureName": "DONORJOURNEYCOMPLETED",
22 "MeasureValue": "1",
23 "MeasureValueType": "BIGINT",
24 "Time": "1744275916000"
25 }
26 }
27 ]
28}
29
metric Schema (json)
{
"$id": "https://opg.service.justice.gov.uk/opg.poas.makeregister/metric.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "opg.poas.makeregister/metric",
"type": "object",
"properties": {
"metrics": {
"type": "array",
"maxItems": 20,
"minItems": 1,
"items": {
"type": "object",
"required": [
"metric"
],
"properties": {
"metric": {
"type": "object",
"properties": {
"Project": {
"type": "string",
"description": "The service or project name",
"pattern": "^[a-zA-Z-_0-9]{1,32}$"
},
"Category": {
"type": "string",
"description": "Assign metric a Category",
"pattern": "^[a-zA-Z-_0-9]{1,25}$"
},
"Subcategory": {
"type": "string",
"description": "Assign metric a Subcategory",
"pattern": "^[a-zA-Z-_0-9]{1,25}$"
},
"Environment": {
"type": "string",
"description": "Sets the environment the metric has come from",
"pattern": "^[a-zA-Z-_0-9]{1,25}$"
},
"MeasureName": {
"type": "string",
"description": "The metric name",
"pattern": "^[a-zA-Z-_0-9]{1,64}$"
},
"MeasureValue": {
"type": "string",
"description": "The metric value",
"pattern": "^[0-9\\.]{1,20}$"
},
"MeasureValueType": {
"type": "string",
"description": "The metric value type",
"enum": ["DOUBLE", "BIGINT", "VARCHAR", "BOOLEAN"]
},
"Time": {
"type": "string",
"description": "The type of LPA being created",
"pattern": "^[0-9]{13}$"
}
},
"required": ["Project", "Category", "Subcategory", "Environment", "MeasureName", "MeasureValue", "Time"]
}
}
}
}
}
}
Edit this pageLast updated on 2025/4/11