Skip to content

Add Serialization & Deserialization of Sink File Properties #2576

@RubenCerna2079

Description

@RubenCerna2079

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.

  1. file requires runtime.telemetry

CLI Updates

Add command line support.

  1. Add dab configure --file.enabled
  2. Add dab configure --file.path
  3. Add dab configure --file.rolling-interval
  4. Add dab configure --file.retained-file-count-limit
  5. 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

Metadata

Metadata

Labels

improvementLet's make this better

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions