Eventvisor

Building blocks

Targets

Targets describe which definitions belong in an application or service datafile. They replace scattered build-time filtering with a named, reviewable contract.

Every project and every Set needs at least one Target. A normal build emits datafiles/eventvisor-<target>.json for each Target.

Create target definitions in targets/:

# targets/checkout.yml
description: Checkout web application
tag: web
includeEvents: checkout.*
excludeEvents: checkout.internal.*
includeAttributes:
- userId
- sessionId
includeDestinations: "*"
includeEffects: checkout.*
pretty: true
stringify: true
revisionFromHash: true

The include and exclude fields accept one pattern, an array of patterns, or "*". A single * inside a pattern provides glob-like matching.

Targets support includeEvents, includeAttributes, includeDestinations, and includeEffects, with a corresponding exclude field for each entity type.

Tags and targets

tag selects entities carrying one tag. tags can express OR or AND matching:

tags:
and: [web, checkout]

Target selectors combine with tag selectors using AND semantics. Eventvisor also includes runtime dependencies. For example, an included effect brings in the events and attributes that can trigger it. Included events retain their requiredAttributes and definitions referenced through direct or generic source paths such as attribute: userId and source: attributes.userId. Collection sources such as source: attributes retain the complete referenced collection.

An explicit exclusion cannot remove a dependency required by an included definition. The build fails and lists every conflicting dependency, so a Target cannot produce a datafile that is known to be incomplete.

Build

npx eventvisor build --target checkout
npx eventvisor build --target checkout --target account

The builder retains referenced attributes, destination overrides, quarantine destinations, and triggered effects. Dependencies used by those definitions are resolved transitively.

Reusable Schemas are build dependencies rather than Target selectors. Any Schema referenced by a selected event or attribute is resolved transitively and inlined into the generated datafile.

pretty controls formatting for the target datafile. stringify controls compact condition stringification. revisionFromHash produces a stable content-derived revision.

Previous
Effects