This release brings a focused round of enhancements aimed at improving developer control, and strengthening TriFrost’s logging system.
Added
- feat: Enhanced
ConsoleExporter
withgrouped
option (default:true
). Whentrue
will useconsole.groupCollapsed()
andconsole.groupEnd()
for clearer, hierarchical log output. - feat: Enhanced
ConsoleExporter
with ability to pass a customformat
function to construct the log label. Thisformat
function gets passed the entire log object. - feat: Enhanced
ConsoleExporter
with anomit
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 asink
option, allowing users to replace the defaultconsole
output with a custom sink function (e.g., pushing to a file or external stream). - feat: Enhanced
JsonExporter
with anomit
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 anomit
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) toOtelHttpExporter
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 includetime
andlevel
(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 withintValue
,doubleValue
,boolValue
,stringValue
OpenTelemetry mappings - feat: Added
use_defaults
boolean flag (default:true
) to theSecurity()
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 theCors()
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. ❄️