Ferron example observability backend support

December 1, 2025 ยท View on GitHub

This is example observability backend support for Ferron, demonstrating how to integrate a custom observability backend with Ferron.

Notes

This observability backend support prints access logs to standard output, and error logs to standard error.

Additional KDL configuration directives

Directives

  • log_stdout [enable_log_stdout: bool]
    • This directive specifies whenever to log requests to standard output. Default: log_stdout #false
  • error_log_stderr [enable_log_stderr: bool]
    • This directive specifies whenever to log errors to standard error. Default: error_log_stderr #false

Configuration example:

dev.example.com {
    // Enable example logging
    log_stdout
    error_log_stderr

    // Custom test endpoints
    status 200 url="/test" body="Test endpoint working"
    status 500 url="/test-error" body="Simulated error"
}

Compiling Ferron with this observability backend support

To compile Ferron with this observability backend support, first clone the Ferron repository:

git clone https://github.com/ferronweb/ferron.git -b develop-2.x
cd ferron

Then, copy the ferron-build.yaml file to ferron-build-override.yaml:

cp ferron-build.yaml ferron-build-override.yaml

After that, add the following line to the ferron-build-override.yaml file:

observability:
  # Other observability backends...
  - git: https://github.com/ferronweb/ferron-observability-example.git
    crate: ferron-observability-example
    loader: ExampleObservabilityBackendLoader

After modifying the ferron-build-override.yaml file, you can compile Ferron with this module by running the following command:

make build

Or if you're on Windows:

powershell -ExecutionPolicy Bypass .\build.ps1 Build

You can then package it in a ZIP archive using the following command:

make package

Or if you're on Windows:

powershell -ExecutionPolicy Bypass .\build.ps1 Package

The ZIP archive will be created in the dist directory, and can be installed using Ferron installer.