harp.models.transactions

Inheritance diagram of harp.models.transactions

class Transaction[source]

Bases: Entity

Transaction(*, id: str = None, type: str, endpoint: str = None, started_at: datetime.datetime, finished_at: datetime.datetime = None, elapsed: float = None, tpdex: int = None, messages: List[harp.models.messages.Message] = None, tags: dict = <factory>, extras: dict = <factory>, markers: set = <factory>)

__init__(*, id=None, type, endpoint=None, started_at, finished_at=None, elapsed=None, tpdex=None, messages=None, tags=<factory>, extras=<factory>, markers=<factory>)
Parameters:
Return type:

None

as_storable_dict(*, with_messages=False, with_tags=False)[source]

Create a dict that can be passed to a storage creation method.

elapsed: float = None

Elapsed time in seconds, if the transaction has ended.

endpoint: str = None

Endpoint name, if any (this describes which proxy controller handled the request).

extras: dict
finished_at: datetime = None

Timestamp of the transaction end (if it has ended), or None.

id: str = None

Unique identifier for this transaction.

markers: set
messages: List[Message] = None
started_at: datetime

Timestamp of the transaction start.

tags: dict
tpdex: int = None

TPDEX score, if the transaction has ended.

type: str

Type of ASGI transaction: http, websocket, lifecycle, …