Skip to content

Log streams

A log stream sends a deployment’s logs to somewhere you choose as they happen: a webhook, or a service such as Datadog or Axiom. Each request to a webhook is signed, so the receiver can check it came from Convex.

Log streams need the Convex Professional plan. Below it, a deploy fails with LogStreamingNotEnabled.

const stream = yield* Convex.LogStream("Logs", {
deployment,
config: {
logStreamType: "webhook",
url: "https://example.com/logs",
format: "json",
},
});

stream.hmacSecret signs each request. Alchemy reads it from the deployment, so a stream you adopt has its secret too.

Update config and deploy. Changing logStreamType replaces the stream. A deployment has one stream of each type.