Logging Improvements
We’ve added new metrics for feature developers on PB Engine that help to expose underlying performance drivers. These metrics will be used by Arc to help diagnose performance and stability related issues.
Cache- Enabling logging for request information from fusion-engine to the Arc managed cache proxy content fetched in a webpage rendering.
- Status written as success, stale, or miss
- Latency in ms
- Size in bytes
- Content source name
Cache metrics will appear in logs for requests with either:
- Fetch latency greater than an Arc-managed threshold (ex: 250ms)
- Response size great greater than an Arc-managed threshold (ex: 1mb)
Content - Enabling logging for request information from fusion-engine to customer specified content sources.
- Status written as success, stale, or miss
- Latency in ms
- Size in bytes
- Content source name
Content fetch metrics will appear in logs for requests with either:
- Fetch latency greater than an Arc-managed threshold (ex: 2500ms)
- Response size great greater than an Arc-managed threshold (ex: 1mb)
Database - Enabling logging for database requests from fusion-engine to the database that stores pages and templates.
- Latency in ms
Database fetch metrics will appear in the logs for requests with:
- Fetch latency greater than an Arc-managed threshold (ex: 500ms)
Render - Enabling logging of the time it takes for an individual component to render during the webpage request flow.
- Latency in ms
- Component name
Component rendering metrics will appear in the logs for requests with:
- Render latency greater than an Arc-managed threshold (ex: 100ms)
In local environments, developers are also free to modify their own metrics logging for thresholds, using two environment variables:
OVERRIDE_THRESHOLDS
- JSON object containing name/value pairs to describe the minimum value for a metric to be logged.LOG_METRICS
- Flag for allowing or suppressing all metrics logging.
LOG_METRICS
Defaults to true. Changing this to false will prevent all logging of metrics. Example: LOG_METRICS=false
OVERRIDE_THRESHOLDS
Defaults to empty. Changing this to add override thresholds will cause the subject metric to be logged only when its value equals or exceeds the given threshold. Example: OVERRIDE_THRESHOLDS={ “render.latency”: 500, “db.latency”: 20 }
Omit the prefix “arc.fusion.” when specifying the metric name.
Available metrics:
- cache.latency
- cache.bytes
- compile.latency
- content.latency
- db.latency
- render.latency