TriFrost

TriFrost 0.24.0

|peterver

News

This release brings a focused round of enhancements aimed at improving developer control, and strengthening TriFrost’s logging system.

Added

  • feat: Enhanced ConsoleExporter with grouped option (default: true). When true will use console.groupCollapsed() and console.groupEnd() for clearer, hierarchical log output.
  • feat: Enhanced ConsoleExporter with ability to pass a custom format function to construct the log label. This format function gets passed the entire log object.
  • feat: Enhanced ConsoleExporter with an omit option, allowing selective removal of keys (including nested keys) from the final logged meta object.
new ConsoleExporter({
    grouped: true,
    format: log => `[${log.level.toUpperCase()}]: ${log.message}`,
    omit: ['ctx.password', 'data.pin'],
});
  • feat: Enhanced JsonExporter with a sink option, allowing users to replace the default console output with a custom sink function (e.g., pushing to a file or external stream).
  • feat: Enhanced JsonExporter with an omit option, allowing selective removal of keys (including nested keys) from the final exported JSON entry.
new JsonExporter({
    omit: ['ctx.password', 'data.pin'],
    sink: entry => myUploadService.add(entry),
});
  • feat: Enhanced OtelHttpExporter with an omit option, allowing selective removal of keys (including nested keys) from log and span payloads before they are transformed into OpenTelemetry format and sent over the wire.
  • feat: Added maxBufferSize (default: 10,000) to OtelHttpExporter to cap the total in-memory buffer size and prevent unbounded memory growth in case of repeated failures.
new OtelHttpExporter({
    logEndpoint: 'https://otel.myservice.dev/v1/logs',
    omit: ['ctx.secret', 'data.internalId'],
    maxBufferSize: 5000,
});

Improved

  • feat: ConsoleExporter log meta will now also include time and level (which was previously not added in the meta object as it only existed in the label).
  • feat: Enhanced OtelHttpExporter attribute conversion so attributes now work with intValue, doubleValue, boolValue, stringValue OpenTelemetry mappings
  • feat: Added use_defaults boolean flag (default: true) to the Security() middleware, letting users opt out of applying built-in defaults.
/* Only applies cross origin opener policy, nothing else */
app.use(Security({crossOriginOpenerPolicy: 'unsafe-none'}, {use_defaults: false}));
  • feat: Added use_defaults boolean flag (default: true) to the Cors() middleware, letting users opt out of applying built-in defaults.
app.use(Cors({methods: ['DELETE']}, {use_Defaults: false}));

TriFrost continues its path toward 1.0, balancing polish, predictability, and power — and making sure every piece feels as solid as the core.

Stay tuned — and as always, stay frosty. ❄️

Loved the read? Share it with others