athena.trace
AthenaTrace
Trace of a single request/response saga.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
The unique identifier for the trace. |
name |
str
|
The name of the trace. |
request |
RequestTrace
|
Trace of the request. |
response |
ResponseTrace
|
Trace of the response. |
start |
float
|
The start time of the request in seconds. |
end |
float
|
The end time of the request in seconds. |
elapsed |
float
|
The duration of the request in seconds. |
Source code in athena/trace.py
RequestTrace
Trace of the request component.
Attributes:
Name | Type | Description |
---|---|---|
method |
str
|
The HTTP method of the request. |
url |
str
|
The URL of the request. |
headers |
dict
|
The headers of the request. |
content_type |
str | None
|
The content type of the request. |
text |
str
|
The text content of the request. |
Source code in athena/trace.py
ResponseTrace
Trace of the response component.
Attributes:
Name | Type | Description |
---|---|---|
headers |
dict
|
The headers of the response. |
url |
str
|
The URL of the response. |
reason |
str
|
The reason phrase of the response. |
content_type |
str | None
|
The content type of the response. |
status_code |
int
|
The status code of the response. |
text |
str
|
The text content of the response. |
Source code in athena/trace.py
json()
Parses the response text as JSON and returns the result.
Returns:
Name | Type | Description |
---|---|---|
dict |
The parsed JSON content of the response text. |