We will add a feature that allows the user to send their logs to a file sink. In order to do that, we will require the user to include the file property, which will be under runtime.telemetry. We therefore add the following to the DAB config schema at the top level and include the ability to configure these settings use the CLI dab configure command.
{
"runtime": {
...
"telemetry": {
"file": {
"enabled": true, // (boolean, default: false)
"path": "/logs/dab-log.txt", // (string, default: "/logs/dab-log.txt")
"rolling-interval": "12Hourse | Day | Week", // (enum, default: "Day")
"retained-file-count-limit": 7, // (int, default: 1)
"file-size-limit-bytes": 1048576 // (int, default: 1048576)
}
}
...
}
}
Json Schema
Update our JSON schema. Add properties and constraints and defaults.
file requires runtime.telemetry
CLI Updates
Add command line support.
- Add
dab configure --file.enabled
- Add
dab configure --file.path
- Add
dab configure --file.rolling-interval
- Add
dab configure --file.retained-file-count-limit
- Add
dab configure --file.file-size-limit-bytes
Reference other PRs that have included additions to the config file to see broader context of how new properties in the config need to be integrated into the broader codebase. For an example of adding to the object model and config/schema see: #2606
For an example of adding CLI configure options see: #2435
We will add a feature that allows the user to send their logs to a file sink. In order to do that, we will require the user to include the
fileproperty, which will be underruntime.telemetry. We therefore add the following to the DAB config schema at the top level and include the ability to configure these settings use the CLI dab configure command.Json Schema
Update our JSON schema. Add properties and constraints and defaults.
filerequiresruntime.telemetryCLI Updates
Add command line support.
dab configure --file.enableddab configure --file.pathdab configure --file.rolling-intervaldab configure --file.retained-file-count-limitdab configure --file.file-size-limit-bytesReference other PRs that have included additions to the config file to see broader context of how new properties in the config need to be integrated into the broader codebase. For an example of adding to the object model and config/schema see: #2606
For an example of adding CLI configure options see: #2435