Skip to content

Operations

Searching and tracing events, the dashboard and monitoring

Working with events

The dashboard’s Events menu offers, besides the list and the timeline:

  • Live: the cloud events the gateway ingests, as they arrive, optionally filtered by source and/or type. The gateway’s hub (api/ws/events) filters them: a client calls Subscribe(source, type), with either left empty to match any, and only receives the matching events. Up to 500 events are kept on the page, and pausing it counts what it misses. /events/live?source=…&type=… opens it filtered.

  • Search: GET /api/resources/v1/namespaces/{namespace}/cloudevents/search reads the stream of a namespace, or /api/resources/v1/cloudevents/search the whole stream, or a partition (partitionType and partitionId), forwards from its start, from from, or from offset, and returns the records that match every criterion: id, attributes[name]=regex (for example attributes[type]=order), and expression, a jq condition on the record (for example .data.total > 100). Nothing is indexed: a search stops once it has found maxResults matches (20 by default, 100 at most), has read maxScanned records (10,000 at most), or has reached to or the end, and returns nextOffset to continue from, and the amount of records it scanned.

  • Trace, i.e. where’s my event?: GET /api/resources/v1/namespaces/{namespace}/cloudevents/trace?id=…&source=… finds a cloud event by its id, and its source if several use the same id, among the 10,000 most recent of its namespace (maxScanned, 100,000 at most). It tells how it was ingested: its offset, when it was recorded, the gateway that ingested it, its partitions, and the trace of its ingestion. For every subscription of the namespace, it tells what happened to the event, with a sentence that explains why:

    Outcome Meaning
    delivered the subscription is past the event, which it delivered, unless an operator skipped it
    pending the subscription has yet to deliver it, behind ahead records, e.g. because it is suspended, or its subscriber unreachable
    awaiting-ack the event has been delivered, and the subscriber deferred its acknowledgement
    faulted the event faulted the subscription, which is stuck on it, with the fault
    dead-lettered the event could not be delivered, and has been set aside, with its deadLetter
    filtered-out the event doesn’t match the subscription’s filter, evaluated as its broker does
    not-selected the event isn’t in the partition the subscription consumes
    not-subscribed the event was recorded before the subscription started, from the end of its stream
    unknown the subscription doesn’t track its offset, or the event isn’t among the most recent of its partition

    Nothing is recorded per delivery: outcomes are inferred from the state of the subscriptions, so a replayed subscription tells the state of its replay. An event that isn’t found returns 404, which tells why it may be missing, e.g. because the gateway refused it. The trace of the ingestion is linked to the tracing backend with CloudStreams:Tracing:TraceUri, the chart’s telemetry.traceUri, in which {traceId} is replaced, e.g. https://jaeger.example.com/trace/{traceId}. The dashboard’s Trace page, the MCP tool TraceEvent, kubectl cloud-streams trace and the aggregated API’s cloudevents/{id}/trace serve it too.

  • Publish: POST /api/resources/v1/cloudevents/publish publishes a cloud event as the calling user, through the gateway’s admission pipeline (validation, deduplication, rate limits and schema), and returns its outcome (stored, duplicate or ignored). It requires the operator role, and returns 501 on the standalone API, which has no gateway. The page starts from a blank event or from the latest event of a source and type.

The details of an event show its data as indented JSON, as text, or, for binary data (data_base64), as a hexadecimal preview, and can copy the event or its data, and download the data as a file of its media type.

POST /api/resources/v1/namespaces/{namespace}/subscriptions/{name}/redeliver, with { "offset": 42 } (an offset in the stream) or { "partition": { "type": "by-source", "id": "…" }, "offset": 3 }, delivers a recorded event to the subscriber of a subscription once more, mutated as the subscription mutates events, without going through its filter or moving its offset. It requires the operator role, returns the subscriber’s status, or 502 if the subscriber refused it, and is offered by the details of an event in the list and in search results.

Dashboard

  • Navigation. The menu follows the flow of events: Events, then ingestion (Gateways, Feeds, Schemas), delivery (Brokers, Sinks, Subscriptions) and Namespaces. The ? menu at the top right opens the help, and About.

  • Help. /help explains each concept, with an example. The ⓘ button next to the title of a page summarizes its concept and links to its section, as does Help about this page in the ? menu.

  • Subscriptions needing attention. Red and yellow badges next to Subscriptions count the faulted and suspended subscriptions of every namespace the user may read, live. Their tooltip names the namespaces, and the subscriptions whose subscriber is unreachable but still being retried. Clicking them lists those subscriptions (/subscriptions?status=attention).

  • Resources. The gateway, broker and subscription lists can be:

    • sorted by clicking their column headers;
    • filtered by name, or by labels with the same selectors as the API (env=prod,tier!=db, tier in (edge,core)).
  • Details. Selecting a row, or pressing Enter on it, opens the resource’s read-only details, from which administrators edit it.

  • Saving changes. Before an edit is saved, the editor shows the changes it makes to the specification, labels and annotations, which are all it saves.

  • Forms. Subscriptions, brokers, gateways, schemas, sinks and feeds are created and edited with guided forms, in a modal. Endpoints are edited with their authentication, whose secret values can be read from a secret.

    • Steps: the subscription form asks for the subscriber, the events (a partition, attribute patterns or a jq condition, with a preview on the latest events), a transformation, and where delivery starts and what happens to failures. The broker form asks for its health check, the subscriptions it handles, with a live count, and their delivery defaults. The gateway form asks for its health check, authorization rules, validation, ingestion limits, event configurations bound to registered schemas, and split-horizon policy. The schema form asks for the compatibility rule and a version, pasted, uploaded or generated from the data of the latest event of a type.
    • Form or YAML: the YAML tab shows the same resource, and edits in either show in the other. Open in the advanced editor carries what has been filled in to the editor.
    • Validation: each step is checked before the next. The server then validates the resource without saving it, and its errors are shown next to the fields they concern.
    • Review: before saving, the form summarizes the resource in plain language, and shows the changes an edit makes. For a broker, it lists the subscriptions whose effective settings change.
    • Testing a gateway: the gateway form evaluates an example event against the gateway as edited, before it is saved, and tells whether it would be stored, ignored as a loop, refused by authorization, or invalid, and why.
    • Schema versions: the schema form checks a new version against the latest one before saving it, and compares any two versions.
    • Schemas page: the dashboard lists the registered schemas, with their compatibility rule and latest version.
  • Export and import.

    • Export downloads the selected resources as one YAML file, holding only what users own: name, labels, annotations and spec.
    • Import, for administrators, reads such a file, or JSON. Each resource is created, or updated if it exists, and the dashboard reports what became of each one.
  • Theme. The dashboard follows the system’s light or dark theme. The navigation bar can force either, and the browser remembers the choice.

  • Overview. The home page shows:

    • the events recorded per hour over the last 24 hours;
    • subscriptions by status and subscriber state, and those needing attention;
    • the health of gateways, brokers, and the dependencies of the gateway serving the dashboard (Redis, KurrentDB, the projections and admission control);
    • the most active sources and types among the latest events.

    It refreshes every 30 seconds. The activity comes from GET /api/resources/v1/namespaces/{namespace}/cloudevents/stream/activity?period=PT24H&buckets=24&sampleSize=500, or /api/resources/v1/cloudevents/stream/activity for the whole stream, which counts the events of each slice of the period with a binary search on the stream’s timestamps, so it costs a few dozen reads per slice whatever the stream’s size.

  • Subscription details. Selecting a subscription’s name opens its page (/subscriptions/{name}):

    • its state, lag and pending acknowledgement;
    • its fault, if any, with the event that caused it, and buttons to retry or skip that event;
    • its lag and acknowledgement rate, charted from samples taken every 5 seconds while the page is open, since no history is kept;
    • its dead letters, which are its failure history, each of which can be redelivered;
    • a playground.
  • Playground. On a subscription’s page, or at /playground before creating one, a filter and a mutation can be tried against the latest events of the stream or of a partition, or against pasted sample events. It shows which events match and what the subscriber would receive. Nothing is saved or delivered, and mutation webhooks are not called. It uses POST /api/resources/v1/subscriptions/test, which only requires the reader role. Filter expressions apply to the record, as when the broker filters (for example ${ .metadata.contextAttributes.type == "order.placed" }), and mutation expressions to the cloud event.

  • Partitions. Events > Partitions lists the partitions of each type, searchable by prefix, page by page, with their size, first event and last activity, and links to their events. It uses GET /api/resources/v1/namespaces/{namespace}/cloudevents/partitions/{type}/metadata, which returns up to 100 partitions per page (25 by default). /events?partitionType=BySource&partitionId=… opens the event list on a partition.

Monitoring

Gateways, brokers and the API expose two health endpoints, suited to liveness and readiness probes:

Endpoint Checks Status
/healthz/live none: the process is alive always 200
/healthz Redis, KurrentDB, the projections Cloud Streams relies on and, on gateways, whether the admission configuration has been loaded 503 if any check is unhealthy

When the dashboard requires users to sign in, anonymous callers of /healthz only get the overall status, without the details of each check.

Gateways and brokers whose spec.service.healthChecks is set are probed at the configured interval, and their status.healthStatus updated. Every gateway replica, and the standalone API, monitors every gateway and broker, but only the process that holds the resource’s lease in Redis probes it. The others take over when that process stops, or within twice the interval plus 10 seconds if it dies.

GET /api/resources/v1/subscriptions/health (optionally filtered with labelSelector) returns a root-level JSON array describing the health of each subscription, including its lag. It covers the namespaces the user may read; GET /api/resources/v1/namespaces/{namespace}/subscriptions/health covers one. It is designed to be consumed directly by monitoring tools such as Grafana. Official Grafana dashboards are available in deployments/grafana.

Logs of the HTTP clients used by the OpenTelemetry exporters are lowered to Warning by default. Set Logging__LogLevel__System.Net.Http.HttpClient.OtlpTraceExporter (or OtlpMetricExporter/OtlpLogExporter) to restore them.