Skip to content
DocscloudDocumentation

Monitoring

The Lunora cloud is a managed OpenTelemetry backend + control plane — deploy to it and your traces, logs, metrics, and AI generations flow in automatically, with a Traces waterfall, Issues, and Logs to read them.

Last updated:

The Lunora cloud is both a Workers-for-Platforms control plane and a managed OpenTelemetry backend. When you deploy an app to it, the platform wires your telemetry end-to-end for you. There is no collector to run, no ingest endpoint to configure, and no keys to copy. Your app's spans, logs, metrics, and AI generations land in the cloud and show up in the dashboard.

If you self-host instead, everything here still works: you point otlpSink at your own collector. This page is about the hosted experience.

How telemetry reaches the cloud

At deploy time the platform injects three things into your tenant Worker:

InjectedAsPurpose
LUNORA_OTLP_ENDPOINTenv varthis cell's ingest base URL
LUNORA_OTLP_TOKENsecreta scoped ingest key (telemetry-only, can't deploy)
lunora-log-tailtail consumerstreams ctx.log output to the Logs store

Your app reads the first two in the usual sink wiring, with no cloud-specific code:

import { combineSinks, createWorker, otlpSink } from "@lunora/runtime";

export default createWorker({
    // …schema, functions…
    observability: combineSinks(otlpSink({ endpoint: env.LUNORA_OTLP_ENDPOINT, token: env.LUNORA_OTLP_TOKEN })),
});

Everything the framework emits flows over the standard OpenTelemetry Protocol (OTLP) contract to the cloud: one SERVER span per RPC, nested ctx.trace spans, ctx.log lines, ctx.metrics, and AI generation spans.

Traces

The Traces tab is a real-duration, nested trace waterfall over the span store. Pick a project, then a deployment; recent traces list newest-active first with their latency, span count, error count, and root operation.

Open a trace to drill into its waterfall: every span placed on the trace timeline by its true start and duration, indented by its depth under parentSpanId, so you see which part of a request took the time (not just that it took 900 ms). An errors-only toggle narrows the list; the query also supports filtering by duration, function path, and time window.

Generation spans. An AI model call shows a gen chip with the model and its token counts (12→34 tok). Click any span to open the detail pane: its id, duration, status, attributes, and, for a generation, the model, prompt/completion tokens, and (when the emitter opted in) the recorded input/output. See generation spans for how @lunora/ai and @lunora/agent produce them.

Issues

Error spans (status.code === 2) are grouped into Issues by a deterministic fingerprint, with a count, first/last-seen, and a sample message. Container crashes additionally open Incidents.

Logs

Every ctx.log line is streamed to the durable Logs store via the tail consumer, keeping its full shape: the seven-tier severity, the rendered message, the structured fields, the functionPath, and the traceId/spanId. The Logs tab filters by severity, function, free-text search, and trace id, so you can pull up exactly the lines for one dispatch and link a line back to its trace.

Metrics

ctx.metrics.* measurements POST to /v1/metrics. Keep attributes low-cardinality; see the metrics guidance.

Traffic

The Traffic tab answers what your deployed apps actually served: requests by country, top paths, a response-code breakdown, and request volume with bytes over time. Nothing to enable — the dispatcher already meters every request it routes.

Two sources, deliberately, and the tab labels which is which:

  • Breakdowns and the volume chart come from the metering stream. Analytics Engine samples at high write rates, so these are exact counts (each retained row carries the interval it stands in for) with approximate averages.
  • The live request stream and the p50/p95/p99 latencies come from the span store, which is unsampled and reactive — so the stream fills in as requests complete, with no polling, and the percentiles are real values some request actually took.

Paths are shown as route labels with record ids collapsed (/orders/:id), so an endpoint reads as one row rather than thousands. If you serve several domains, the domain filter narrows every panel except the domain breakdown itself.

Passing a single deployment scopes the same reads to one release, which is how the per-deployment health view works.

Scoped ingest keys

Deploy keys have a capability:

  • deploy (the default): the full key your CI uses to lunora deploy.
  • ingest: telemetry-only. It can push to the OTLP endpoints but is rejected by the deploy and admin paths, so a leaked ingest token can't ship code.

The platform mints one ingest key per project and injects it as LUNORA_OTLP_TOKEN at deploy time. It sends telemetry for that project only, so code shipped with a project-scoped deploy key cannot write as a sibling project. You never handle it directly for your own apps.

Bring your own OpenTelemetry

The cloud ingest is a standard OTLP endpoint, so any OpenTelemetry SDK or Collector can ship to it, not only Lunora's otlpSink. Issue an ingest-scoped key and point your exporter at the cell's base URL:

EndpointSignal
/v1/tracesspans
/v1/logslogs
/v1/metricsmetrics

Lunora's own sinks send JSON, gzipped once the body is large enough. Authenticate with Authorization: Bearer <ingest-key>.

Retention and redaction

The dashboard reads recent traces and logs from the cloud's hot store. Sensitive attribute and log-field values (anything keyed like a credential) are redacted by the sink in your Worker before they are sent.