Skip to content

Commit

Permalink
feat(Metrics): Add distributor Metrics.event API
Browse files Browse the repository at this point in the history
  • Loading branch information
jlacivita committed Apr 25, 2023
1 parent 8314263 commit e5b87bd
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 7 deletions.
103 changes: 102 additions & 1 deletion src/openrpc/metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,65 @@
}
}
]
}
},
{
"name": "event",
"tags": [
{
"name": "capabilities",
"x-uses": [
"xrn:firebolt:capability:metrics:distributor"
]
}
],
"summary": "Inform the platform of 1st party distributor metrics.",
"params": [
{
"name": "schema",
"summary": "The schema URI of the metric type",
"schema": {
"type": "string",
"format": "uri"
},
"required": true
},
{
"name": "data",
"summary": "A JSON payload conforming the the provided schema",
"schema": {
"$ref": "#/components/schemas/EventObject"
},
"required": true
}
],
"result": {
"name": "results",
"schema": {
"type": "null"
}
},
"examples": [
{
"name": "Send foo event",
"params": [
{
"name": "schema",
"value": "http://meta.rdkcentral.com/some/schema"
},
{
"name": "data",
"value": {
"foo": "bar"
}
}
],
"result": {
"name": "result",
"value": null
}
}
]
}
],
"components": {
"schemas": {
Expand Down Expand Up @@ -1039,6 +1097,49 @@
"entitlement",
"other"
]
},
"EventObjectPrimatives": {
"title": "EventObjectPrimatives",
"anyOf": [
{
"type": "string",
"maxLength": 256
},
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"EventObject": {
"title": "EventObject",
"type": "object",
"maxProperties": 256,
"additionalProperties": {
"anyOf": [
{
"$ref": "#/components/schemas/EventObjectPrimatives"
},
{
"type": "array",
"maxItems": 256,
"items": {
"$ref": "#/components/schemas/EventObjectPrimatives"
}
},
{
"$ref": "#/components/schemas/EventObject"
}
]
}
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/openrpc/user_grants.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@
}
],
"result": {
"name": "voice",
"name": "result",
"schema": {
"const": "null"
"const": null
}
},
"examples": [
Expand Down Expand Up @@ -266,9 +266,9 @@
}
],
"result": {
"name": "voice",
"name": "result",
"schema": {
"const": "null"
"const": null
}
},
"examples": [
Expand Down Expand Up @@ -331,9 +331,9 @@
}
],
"result": {
"name": "voice",
"name": "result",
"schema": {
"const": "null"
"const": null
}
},
"examples": [
Expand Down
6 changes: 6 additions & 0 deletions src/sdks/manage/sdk.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
"xrn:firebolt:capability:localization:time-zone"
]
},
{
"module": "Metrics",
"use": [
"xrn:firebolt:capability:metrics:distributor"
]
},
{
"module": "Wifi",
"use": [
Expand Down

0 comments on commit e5b87bd

Please sign in to comment.