cloud_events
Generate structured CloudEvents and ship them to a configured HTTP endpoint.
Versions marked “overview” do not contain this page. Selecting one opens that version’s documentation overview.
On this page
Generate structured CloudEvents and ship them to a configured HTTP endpoint.
Requires Cargo feature: cloud-events-filter.
Configuration Notes
Experimental: requires the off-by-default cloud-events-filter feature. Review its best-effort delivery limitations before using it in production.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
on | request | response_headers | response_complete | yes | Lifecycle phase for this publisher. |
destination | string | yes | HTTP endpoint receiving the structured CloudEvent. |
authorization | CloudEventsAuthorizationConfig | no | Optional environment-backed bearer authorization for the receiver. |
authorization.env_var | string | yes | Environment variable containing the bearer token. |
delivery | best_effort | no | Delivery guarantee supported by this version. |
format | structured_json | no | HTTP CloudEvents binding used by this publisher. |
source | string | yes | Static CloudEvents source attribute. |
type | string | yes | Static CloudEvents type attribute. |
subject | CloudEventsMapping | no | Optional CloudEvents subject attribute. |
subject.value | string | yes | Source reference: context.*, metadata.*, request_header.*, response_header.*, or response.status. |
subject.type | string | integer | boolean | json | yes | Output conversion to apply. |
subject.required | bool | no | Whether failure to resolve this value suppresses the event. |
schema | string | no | Optional CloudEvents data-schema identifier. |
include_provenance | bool | no | Include source-derived provenance in reserved data._praxis_provenance. |
context_fields | string[] | no | Explicitly allowlisted context references. |
request_headers | string[] | no | Explicitly allowlisted request header names. |
response_headers | string[] | no | Explicitly allowlisted response header names. |
metadata_fields | string[] | no | Explicitly allowlisted filter metadata references. |
data | object<string, CloudEventsMapping> | no | Mapped CloudEvent data fields. |
data.value | string | yes | Source reference: context.*, metadata.*, request_header.*, response_header.*, or response.status. |
data.type | string | integer | boolean | json | yes | Output conversion to apply. |
data.required | bool | no | Whether failure to resolve this value suppresses the event. |
extensions | object<string, CloudEventsMapping> | no | Mapped CloudEvent extension attributes. |
extensions.value | string | yes | Source reference: context.*, metadata.*, request_header.*, response_header.*, or response.status. |
extensions.type | string | integer | boolean | json | yes | Output conversion to apply. |
extensions.required | bool | no | Whether failure to resolve this value suppresses the event. |
size_limit_bytes | integer | no | Maximum serialized event size in bytes (1 through 65536). |
delivery_timeout_ms | integer | no | Maximum outbound delivery time in milliseconds. |
Example
filter: cloud_events
on: response_complete
destination: https://events.example.net/v1/events
authorization:
env_var: METERING_AUTH_TOKEN
delivery: best_effort
format: structured_json
source: urn:praxis:gateway
type: inference.tokens.used
size_limit_bytes: 65536
delivery_timeout_ms: 3000
include_provenance: false
context_fields:
- identity.subject_id
- identity.claim.group
- identity.claim.subscription
- identity.claim.model
- cluster
request_headers: [user-agent]
metadata_fields:
- token.input
- token.output
- token.total
- token.cache_read
- token.cache_write
- token.reasoning
subject: { value: context.identity.subject_id, type: string, required: true }
data:
user: { value: context.identity.subject_id, type: string, required: true }
provider: { value: context.cluster, type: string }
user_agent: { value: request_header.user-agent, type: string }
total_tokens: { value: metadata.token.total, type: integer, required: true }