Menu

Know What Happened: Application Tracing with @zintrust/trace
📰

Know What Happened: Application Tracing with @zintrust/trace

DEV Community: node·zintrust Zin·1 day ago
#2Aafrabb
#devtonodejs#devto#dev#zintrust#trace
Reading 0:00
15s threshold

Logs tell you that something failed. Traces tell you what led to it.

@zintrust/trace is an optional observability package for ZinTrust apps. When enabled, it registers watchers for core runtime events and records them as trace entries:

Incoming requests

Database queries

Exceptions

Background jobs

Cache activity

Notifications

CLI events

Outbound HTTP calls

Entries are stored in your configured database by default, and an optional web dashboard shows them. Install and set up in three steps:

npm install @zintrust/trace zin migrate:trace

Enter fullscreen mode

Exit fullscreen mode

Import '@zintrust/trace/plugin' in 'src/zintrust.plugins.ts' and set TRACE_ENABLED=true to activate tracing. Mount the dashboard in your own routes, or also set TRACE_AUTO_MOUNT=true to use the stock auto-mount flow.

When the relevant trace events and identifiers are captured, inspect a request, its job activity, queries, and outbound calls in the dashboard.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.