/
outcomes-metrics.v1.schema.json
50 lines (50 loc) · 1.67 KB
/
outcomes-metrics.v1.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "metrics_outcome",
"$ref": "#/definitions/MetricsOutcome",
"definitions": {
"MetricsOutcome": {
"type": "object",
"properties": {
"timestamp": {
"description": "The UNIX timestamp in seconds when the outcome was created, optionally truncated to the last hour.",
"$ref": "#/definitions/U64"
},
"org_id": {
"description": "The organization for which this outcome is being sent.",
"$ref": "#/definitions/U64"
},
"project_id": {
"description": "The project for which this outcome is being sent.",
"$ref": "#/definitions/U64"
},
"mri": {
"description": "Valid metric resource identifier `<type>:<namespace>/<name>[@<unit>]` for which the outcome is being sent.",
"type": "string"
},
"outcome": {
"description": "Outcome ID, metric outcomes share the same numeric outcome ID with regular outcomes.",
"$ref": "#/definitions/U64"
},
"reason": {
"description": "Optional machine readable, free-form reason code.",
"type": ["string", "null"]
},
"quantity": {
"description": "Amount of metric buckets accepted by Relay (volume).",
"type": "integer"
},
"cardinality": {
"description": "Maximum observed cardinality of the metric.",
"type": "integer"
}
},
"required": ["timestamp", "org_id", "project_id", "mri", "outcome"]
},
"U64": {
"type": "integer",
"minimum": 0,
"maximum": 18446744073709551615
}
}
}