Updated Auditing (markdown)

Ethan Arrowood 2018-09-19 14:01:25 -04:00
Родитель 48b53b5490
Коммит 8aa85bb4c1
1 изменённых файлов: 9 добавлений и 1 удалений

@ -69,4 +69,12 @@ Additionally if an *Extension* emits an event, the logging schema will be slight
"resources": "",
"extensionLog": {}
}
```
```
## Example
Check the below code snippet link for an implementation example. It is from a published extension that is implementing auditing through the sdk.
https://github.com/trstringer/azure-chaos-fn-webapp-startstop/blob/master/start/index.js#L1-L35
Notice how in line 14 the auditer is being initialized with an eventName and resources string. After that point, `context.log` is called as usual. Every time it is called, audits are being added to the SDK's internal audit list. These audits are appended to the body of response when `context.done` is called (on line 28 or 33).