Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

synchronize schema spec #2096

Merged
merged 1 commit into from
Jun 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 108 additions & 3 deletions test/integration/api-schema/apm-server-schema/metricset.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,118 @@
"object"
],
"properties": {
"counts": {
"description": "Counts holds the bucket counts for histogram metrics. These numbers must be positive or zero. If Counts is specified, then Values is expected to be specified with the same number of elements, and with the same order.",
"type": [
"null",
"array"
],
"items": {
"type": "integer",
"minimum": 0
},
"minItems": 0
},
"type": {
"description": "Type holds an optional metric type: gauge, counter, or histogram. If Type is unknown, it will be ignored.",
"type": [
"null",
"string"
]
},
"unit": {
"description": "Unit holds an optional unit for the metric. - \"percent\" (value is in the range [0,1]) - \"byte\" - a time unit: \"nanos\", \"micros\", \"ms\", \"s\", \"m\", \"h\", \"d\" If Unit is unknown, it will be ignored.",
"type": [
"null",
"string"
]
},
"value": {
"description": "Value holds the value of a single metric sample.",
"type": "number"
"type": [
"null",
"number"
]
},
"values": {
"description": "Values holds the bucket values for histogram metrics. Values must be provided in ascending order; failure to do so will result in the metric being discarded.",
"type": [
"null",
"array"
],
"items": {
"type": "number"
},
"minItems": 0
}
},
"required": [
"value"
"allOf": [
{
"if": {
"properties": {
"counts": {
"type": "array"
}
},
"required": [
"counts"
]
},
"then": {
"properties": {
"values": {
"type": "array"
}
},
"required": [
"values"
]
}
},
{
"if": {
"properties": {
"values": {
"type": "array"
}
},
"required": [
"values"
]
},
"then": {
"properties": {
"counts": {
"type": "array"
}
},
"required": [
"counts"
]
}
}
],
"anyOf": [
{
"properties": {
"value": {
"type": "number"
}
},
"required": [
"value"
]
},
{
"properties": {
"values": {
"type": "array"
}
},
"required": [
"values"
]
}
]
}
}
Expand Down