Search traces
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.traces.search(page_size=50)
# Handle response
print(res)
| Parameter | Type | Required | Description |
|---|
from_ | date | :heavy_minus_sign: | N/A |
to | date | :heavy_minus_sign: | N/A |
page_size | Optional[int] | :heavy_minus_sign: | N/A |
cursor | OptionalNullable[str] | :heavy_minus_sign: | N/A |
search_expression | OptionalNullable[str] | :heavy_minus_sign: | N/A |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
models.GetTraces
| Error Type | Status Code | Content Type |
|---|
| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get trace field definitions
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.traces.get_trace_fields()
# Handle response
print(res)
| Parameter | Type | Required | Description |
|---|
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
models.GetTraceFields
| Error Type | Status Code | Content Type |
|---|
| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get trace by id
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.traces.get_trace_by_id(trace_id="<id>")
# Handle response
print(res)
| Parameter | Type | Required | Description |
|---|
trace_id | str | :heavy_check_mark: | N/A |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
models.GetTrace
| Error Type | Status Code | Content Type |
|---|
| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get trace spans
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.traces.get_trace_spans(trace_id="<id>", page_size=50)
# Handle response
print(res)
| Parameter | Type | Required | Description |
|---|
trace_id | str | :heavy_check_mark: | N/A |
from_ | date | :heavy_minus_sign: | N/A |
to | date | :heavy_minus_sign: | N/A |
page_size | Optional[int] | :heavy_minus_sign: | N/A |
cursor | OptionalNullable[str] | :heavy_minus_sign: | N/A |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
models.GetSpans
| Error Type | Status Code | Content Type |
|---|
| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get options for a trace field
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.traces.fetch_options(field_name="<value>")
# Handle response
print(res)
| Parameter | Type | Required | Description |
|---|
field_name | str | :heavy_check_mark: | N/A |
from_ | date | :heavy_minus_sign: | N/A |
to | date | :heavy_minus_sign: | N/A |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
models.GetTraceFieldOptions
| Error Type | Status Code | Content Type |
|---|
| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get span by id
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.traces.get_span_by_id(trace_id="<id>", span_id="<id>")
# Handle response
print(res)
| Parameter | Type | Required | Description |
|---|
trace_id | str | :heavy_check_mark: | N/A |
span_id | str | :heavy_check_mark: | N/A |
from_ | date | :heavy_minus_sign: | N/A |
to | date | :heavy_minus_sign: | N/A |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
models.GetSpan
| Error Type | Status Code | Content Type |
|---|
| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |