DB API Reference

async process_message(db, payload)[source]

Processes a tracing message storing it to the db.

Parameters
  • db – The database object to use.

  • payload (dict) – A dict representing the message to store.

Can be either a tracing run creation in the form of:

msg = {

“msg_type”: “create_trace_run”, “app_name”: app_name, “uuid”: identifier, “column_names”: [“v1”, ‘v2’]

}

or for the insertion of a tracing row:

msg = {

“msg_type”: “row”, “uuid”: identifier, “row_data”: [12.2, 123.1]

}

raises: InvalidMessage

async get_trace(uuid)[source]

Returns all the tracing rows for the passed in uuid.

Parameters

uuid (str) – The identifier for the trace run.

Returns

A list of strings representing a csv view of the tracing run.

Return type

list[str]

async get_all_tracers()[source]

Returns a list with the names of all tracing runs.

Returns

A list with the names of all tracing runs.

Return type

list[str]

async get_trace_as_json(uuid)[source]

Returns all the tracing rows for the passed in uuid as json.

Parameters

uuid (str) – The identifier for the trace run.

Returns

All the tracing rows for the passed in uuid as json.

Return type

list[dict]

async get_trace_run_info(uuid)[source]

Returns descriptive info for the passed in uuid.

Parameters

uuid (str) – The identifier for the trace run.

Returns

Descriptive info for the passed in uuid.

Return type

dict

async get_latest_trace(app_name)[source]

Returns the latest trace for the passed in app_name.

Returns

A list of objects.