adding additional logging schema

This commit is contained in:
Ethan Arrowood 2018-08-31 17:49:07 -04:00
Родитель 675aff1fd4
Коммит 3e4ba11625
1 изменённых файлов: 35 добавлений и 20 удалений

Просмотреть файл

@ -4,17 +4,9 @@ This document defines how Platform Chaos audits chaos events. It lists what is t
## Tracked Data
When a chaos event is initiated or terminated through an *API*, *CLI*, or *Extension*, the following properties are recorded and exported through a JSON object.
- An `id` unique to this event instantiation (`guid`).
- A `chaos-type` of enumerable type `initiate`
- `user` and `system` that terminated the event
- `date` of event initiation (including time `UTC`)
- targeted `resources`. This is broken down by `subscriptionID` and then by `resourceGroup`
- Chaos `event` information (`eventID`, `eventName`, `eventURL`)
When a chaos event is initiated or terminated through an *API* or *CLI* the following properties are recorded and exported through a JSON object.
Additionally an *Extension* may record additional information regarding the specificities of the event. This information is stored within an `extension` property.
Every chaos event type will be logged. The general structure of an event log is defined below:
Every chaos event will be logged. The general structure of an event log for an *API* or *CLI* initiated event is defined below:
- _event log_ (Object)
- `id` (String)
@ -33,10 +25,8 @@ Every chaos event type will be logged. The general structure of an event log is
- `resource` (String)
- String representation of the resource targeted by the chaos
- This is typically generated by `chaos resgen` and looks like so: `"subId/resGrpId/resName"`
- `event` (Object)
- Chaos event properties defined when the event function is typically registered via `chaos register`
- `eventName` (String)
- `eventURI` (String)
- `event` (String)
- Chaos event identifier (can be name, uri, or something else) that denotes what was executed
- `extension` (Object)
- an optional object extension authors can utilize to log pertinant data relate to their module.
@ -45,16 +35,41 @@ Here is an example template:
```json
{
"id": "",
"chaos_type": "initiate",
"type": "initiate",
"user": "",
"system": "",
"date": "",
"resource": "",
"event": {
"eventName": "",
"eventURI": ""
},
"extension": { ... }
"event": "",
"extension": {}
}
```
Additionally if an *Extension* emits an event, the logging schema will be slightly different.
- _event log_ (Object)
- `eventId` (String)
- A unique identifier for the emitted event
- `eventName` (String)
- Some identifiable piece of information specifying the chaos event
- `system` (String | Object)
- Some identifiable piece of information specifying which system the chaos event was executed from
- If more system information can be provided, do so in the form of an object
- `date` (String)
- UTC timestamp of chaos event initiation
- `resource` (String)
- String representation of the resource targeted by the chaos
- This is typically generated by `chaos resgen` and looks like so: `"subId/resGrpId/resName"`
- `extension` (Object)
- an optional object extension authors can utilize to log pertinant data related to their module.
```json
{
"eventId": "",
"eventName": "",
"system": "",
"date": "",
"resource": "",
"extension": {}
}
```