A transaction describes an event captured by an Elastic APM agent instrumeting a service. A transaction can for example be an HTTP request or an asynchrounous background job.
It can also contain information about the authenticated
An event’s context can also include information about an authenticated
user, a request leading to it, or a response.
For instance, HTTP requests context have
The agents provide some settings for users to capture customized information. This data is stored as not-indexed in a
Searchable information is stored as
Agents decide whether to sample transactions or not, and provide settings to control sampling behaviour. If sampled, the spans of a transaction are sent and stored seperate documents.
Transactions are stored in transaction indices.
Transactions can have 0, 1, or many spans. Spans have a
transaction.id attribute that refer to their transaction.
A span contains information about a specific code path,
executed as part of a transaction. Such information includes start time, duration, name, type, and optionally a
If for example a database query happens within a sampled transaction, a span describing the database query will be created. In such a case the name of the span will contain information about the query itself, and the type about the database.
Typically, agents instrument automatically a variety of libraries, but also provide an API for ad hoc instrumentation of specific code paths.
Transactions are stored in transaction indices and spans are stored in separated indices by default.
Spans are stored in span indices.