Skip to main content

Data exporter

Otoroshi sends its events (the analytics of every call, alerts, audit, the events of this extension) to data exporters. The Event brokers exporter is one: its events go to a connection.

In Data exporters, add a custom exporter, choose Cloud APIM - Event brokers exporter, and set its configuration:

{ "connection": "connection_...", "options": { "topic": "otoroshi-events" }, "format": "cloudevents" }

The filtering, the projection and the buffering of the exporter are Otoroshi's own settings.

The events​

Each event is a CloudEvent:

AttributeIs
idits @id
typeio.otoroshi.<@type>: io.otoroshi.GatewayEvent, io.otoroshi.AlertEvent, ...
source/<@product>/<@env>
subjectthe alert, or the route
timeits @timestamp
partitionkeythe route: the events of a route stay in order on Kafka
datathe event, as JSON

format: raw publishes the event alone, without any attribute: what a consumer expecting Otoroshi's JSON gets.

A batch the broker refuses fails the export: Otoroshi's exporter decides what to do then.