Observability
Action metrics hooks, structured bridge logs, and practical tuning knobs for operating Shardwire in production.
Shardwire is small enough to operate with logs + metrics hooks—you do not need a bundled dashboard to get production-grade visibility.
App process: metrics hooks
connectBotBridge accepts optional metrics.onActionComplete (AppBridgeMetricsHooks). Each action emits:
name,requestId,durationMs,ok- on failure:
errorCode, optionalretryAfterMs,discordStatus,discordCode
Forward these to your metrics stack (Prometheus, OpenTelemetry, Datadog, etc.) as histograms and counters.
Bot process: server options
createBotBridge({ server: { ... } }) exposes tuning knobs (Bot bridge) such as:
heartbeatMsmaxConcurrentActions/actionQueueTimeoutMsidempotencyScope/idempotencyTtlMs- structured
loggeroutput for bridge transport events
Tune concurrency and queue timeouts when you see queue saturation or slow Discord responses—see logs for action completion lines from the transport server.
Introspection
There is no requirement to expose an HTTP “status page” from the library. If you add one in your bot process, keep it authenticated and avoid leaking Discord payloads. Connection counts and queue depth are useful only when they do not become a new attack surface.
Pair with diagnostics
app.capabilities()afterreadyfor live negotiationdiagnoseShardwireApp+formatShardwireDiagnosisfor human-readable contract checks