agenta 0.48.9__py3-none-any.whl → 0.48.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of agenta might be problematic. Click here for more details.
- agenta/__init__.py +3 -2
- agenta/client/Readme.md +258 -80
- agenta/client/__init__.py +205 -29
- agenta/client/backend/__init__.py +461 -0
- agenta/client/backend/access_control/__init__.py +2 -0
- agenta/client/backend/access_control/client.py +53 -73
- agenta/client/backend/access_control/raw_client.py +180 -0
- agenta/client/backend/admin/__init__.py +2 -0
- agenta/client/backend/admin/client.py +473 -268
- agenta/client/backend/admin/raw_client.py +1017 -0
- agenta/client/backend/api_keys/__init__.py +2 -0
- agenta/client/backend/api_keys/client.py +43 -276
- agenta/client/backend/api_keys/raw_client.py +364 -0
- agenta/client/backend/apps/__init__.py +2 -0
- agenta/client/backend/apps/client.py +132 -895
- agenta/client/backend/apps/raw_client.py +1516 -0
- agenta/client/backend/bases/__init__.py +2 -0
- agenta/client/backend/bases/client.py +33 -73
- agenta/client/backend/bases/raw_client.py +179 -0
- agenta/client/backend/billing/__init__.py +3 -0
- agenta/client/backend/billing/client.py +564 -0
- agenta/client/backend/billing/raw_client.py +805 -0
- agenta/client/backend/client.py +1268 -0
- agenta/client/backend/configs/__init__.py +2 -0
- agenta/client/backend/configs/client.py +49 -361
- agenta/client/backend/configs/raw_client.py +402 -0
- agenta/client/backend/containers/__init__.py +1 -3
- agenta/client/backend/containers/client.py +25 -548
- agenta/client/backend/containers/raw_client.py +112 -0
- agenta/client/backend/core/__init__.py +5 -0
- agenta/client/backend/core/api_error.py +12 -6
- agenta/client/backend/core/client_wrapper.py +4 -4
- agenta/client/backend/core/file.py +1 -3
- agenta/client/backend/core/force_multipart.py +16 -0
- agenta/client/backend/core/http_client.py +78 -34
- agenta/client/backend/core/http_response.py +55 -0
- agenta/client/backend/core/jsonable_encoder.py +0 -1
- agenta/client/backend/core/pydantic_utilities.py +88 -113
- agenta/client/backend/core/serialization.py +9 -3
- agenta/client/backend/environment.py +7 -0
- agenta/client/backend/environments/__init__.py +2 -0
- agenta/client/backend/environments/client.py +43 -79
- agenta/client/backend/environments/raw_client.py +193 -0
- agenta/client/backend/errors/__init__.py +2 -0
- agenta/client/backend/errors/unprocessable_entity_error.py +8 -2
- agenta/client/backend/evals/__init__.py +3 -0
- agenta/client/backend/evals/client.py +1042 -0
- agenta/client/backend/evals/raw_client.py +1549 -0
- agenta/client/backend/evaluations/__init__.py +2 -0
- agenta/client/backend/evaluations/client.py +106 -590
- agenta/client/backend/evaluations/raw_client.py +1344 -0
- agenta/client/backend/evaluators/__init__.py +2 -0
- agenta/client/backend/evaluators/client.py +99 -516
- agenta/client/backend/evaluators/raw_client.py +1182 -0
- agenta/client/backend/human_evaluations/__init__.py +2 -0
- agenta/client/backend/human_evaluations/client.py +120 -680
- agenta/client/backend/human_evaluations/raw_client.py +1577 -0
- agenta/client/backend/observability/__init__.py +14 -2
- agenta/client/backend/observability/client.py +185 -341
- agenta/client/backend/observability/raw_client.py +943 -0
- agenta/client/backend/observability/types/__init__.py +10 -2
- agenta/client/backend/observability/types/{format.py → fetch_trace_by_id_request_trace_id.py} +1 -1
- agenta/client/backend/observability/types/fetch_trace_by_id_response.py +15 -0
- agenta/client/backend/observability/types/query_analytics_response.py +2 -1
- agenta/client/backend/observability/types/query_traces_response.py +7 -3
- agenta/client/backend/organization/__init__.py +2 -0
- agenta/client/backend/organization/client.py +105 -361
- agenta/client/backend/organization/raw_client.py +774 -0
- agenta/client/backend/raw_client.py +1432 -0
- agenta/client/backend/scopes/__init__.py +2 -0
- agenta/client/backend/scopes/client.py +31 -45
- agenta/client/backend/scopes/raw_client.py +105 -0
- agenta/client/backend/testsets/__init__.py +14 -0
- agenta/client/backend/testsets/client.py +1098 -653
- agenta/client/backend/testsets/raw_client.py +2348 -0
- agenta/client/backend/testsets/types/__init__.py +17 -0
- agenta/client/backend/testsets/types/create_testset_from_file_request_file_type.py +7 -0
- agenta/client/backend/testsets/types/fetch_testset_to_file_request_file_type.py +7 -0
- agenta/client/backend/testsets/types/update_testset_from_file_request_file_type.py +7 -0
- agenta/client/backend/tracing/__init__.py +7 -0
- agenta/client/backend/tracing/client.py +782 -0
- agenta/client/backend/tracing/raw_client.py +1223 -0
- agenta/client/backend/tracing/types/__init__.py +8 -0
- agenta/client/backend/{types/variant_action_enum.py → tracing/types/fetch_trace_request_trace_id.py} +1 -1
- agenta/client/backend/tracing/types/remove_trace_request_trace_id.py +5 -0
- agenta/client/backend/types/__init__.py +153 -26
- agenta/client/backend/types/account_request.py +24 -0
- agenta/client/backend/types/account_response.py +5 -7
- agenta/client/backend/types/agenta_node_dto.py +13 -13
- agenta/client/backend/types/agenta_node_dto_nodes_value.py +1 -0
- agenta/client/backend/types/agenta_nodes_response.py +14 -8
- agenta/client/backend/types/agenta_root_dto.py +16 -8
- agenta/client/backend/types/agenta_roots_response.py +16 -8
- agenta/client/backend/types/agenta_tree_dto.py +16 -8
- agenta/client/backend/types/agenta_trees_response.py +16 -8
- agenta/client/backend/types/aggregated_result.py +5 -7
- agenta/client/backend/types/aggregated_result_evaluator_config.py +1 -0
- agenta/client/backend/types/analytics_response.py +4 -6
- agenta/client/backend/types/annotation.py +50 -0
- agenta/client/backend/types/annotation_create.py +39 -0
- agenta/client/backend/types/annotation_edit.py +31 -0
- agenta/client/backend/types/annotation_kind.py +5 -0
- agenta/client/backend/types/{uri.py → annotation_link.py} +6 -7
- agenta/client/backend/types/{provider_key_dto.py → annotation_link_response.py} +6 -7
- agenta/client/backend/types/annotation_query.py +40 -0
- agenta/client/backend/types/annotation_query_request.py +20 -0
- agenta/client/backend/types/annotation_reference.py +21 -0
- agenta/client/backend/types/annotation_references.py +22 -0
- agenta/client/backend/types/{docker_env_vars.py → annotation_response.py} +6 -7
- agenta/client/backend/types/annotation_source.py +5 -0
- agenta/client/backend/types/annotations_response.py +24 -0
- agenta/client/backend/types/app.py +3 -5
- agenta/client/backend/types/app_variant_response.py +3 -6
- agenta/client/backend/types/app_variant_revision.py +5 -6
- agenta/client/backend/types/artifact.py +44 -0
- agenta/client/backend/types/base_output.py +3 -5
- agenta/client/backend/types/body_fetch_workflow_revision.py +21 -0
- agenta/client/backend/types/body_import_testset.py +3 -5
- agenta/client/backend/types/bucket_dto.py +4 -6
- agenta/client/backend/types/collect_status_response.py +3 -5
- agenta/client/backend/types/config_db.py +3 -5
- agenta/client/backend/types/config_dto.py +5 -7
- agenta/client/backend/types/config_response_model.py +5 -7
- agenta/client/backend/types/correct_answer.py +3 -5
- agenta/client/backend/types/create_app_output.py +3 -5
- agenta/client/backend/types/custom_model_settings_dto.py +3 -5
- agenta/client/backend/types/custom_provider_dto.py +6 -9
- agenta/client/backend/types/custom_provider_kind.py +5 -5
- agenta/client/backend/types/custom_provider_settings_dto.py +3 -5
- agenta/client/backend/types/data.py +2 -1
- agenta/client/backend/types/delete_evaluation.py +3 -5
- agenta/client/backend/types/environment_output.py +3 -5
- agenta/client/backend/types/environment_output_extended.py +4 -6
- agenta/client/backend/types/environment_revision.py +5 -5
- agenta/client/backend/types/error.py +3 -5
- agenta/client/backend/types/evaluation.py +6 -8
- agenta/client/backend/types/evaluation_scenario.py +5 -7
- agenta/client/backend/types/evaluation_scenario_input.py +3 -5
- agenta/client/backend/types/evaluation_scenario_output.py +4 -6
- agenta/client/backend/types/evaluation_scenario_result.py +4 -6
- agenta/client/backend/types/evaluator.py +31 -12
- agenta/client/backend/types/evaluator_config.py +3 -5
- agenta/client/backend/types/evaluator_flags.py +21 -0
- agenta/client/backend/types/evaluator_mapping_output_interface.py +3 -5
- agenta/client/backend/types/evaluator_output_interface.py +3 -5
- agenta/client/backend/types/evaluator_query.py +32 -0
- agenta/client/backend/types/evaluator_query_request.py +30 -0
- agenta/client/backend/types/evaluator_request.py +20 -0
- agenta/client/backend/types/evaluator_response.py +21 -0
- agenta/client/backend/types/evaluators_response.py +21 -0
- agenta/client/backend/types/exception_dto.py +3 -5
- agenta/client/backend/types/{o_tel_spans_response.py → extended_o_tel_tracing_response.py} +5 -7
- agenta/client/backend/types/focus.py +5 -0
- agenta/client/backend/types/format.py +5 -0
- agenta/client/backend/types/full_json_input.py +34 -0
- agenta/client/backend/types/full_json_output.py +29 -0
- agenta/client/backend/types/get_config_response.py +3 -5
- agenta/client/backend/types/{header_dto.py → header.py} +4 -6
- agenta/client/backend/types/http_validation_error.py +4 -6
- agenta/client/backend/types/human_evaluation.py +3 -5
- agenta/client/backend/types/human_evaluation_scenario.py +4 -6
- agenta/client/backend/types/human_evaluation_scenario_input.py +3 -5
- agenta/client/backend/types/human_evaluation_scenario_output.py +3 -5
- agenta/client/backend/types/invite_request.py +4 -6
- agenta/client/backend/types/legacy_analytics_response.py +4 -6
- agenta/client/backend/types/legacy_data_point.py +3 -5
- agenta/client/backend/types/legacy_evaluator.py +26 -0
- agenta/client/backend/types/legacy_scope_request.py +4 -6
- agenta/client/backend/types/legacy_scopes_response.py +3 -5
- agenta/client/backend/types/legacy_subscription_request.py +19 -0
- agenta/client/backend/types/legacy_user_request.py +5 -7
- agenta/client/backend/types/legacy_user_response.py +3 -5
- agenta/client/backend/types/lifecycle_dto.py +3 -5
- agenta/client/backend/types/link_dto.py +4 -6
- agenta/client/backend/types/list_api_keys_response.py +3 -5
- agenta/client/backend/types/llm_run_rate_limit.py +3 -5
- agenta/client/backend/types/meta_request.py +30 -0
- agenta/client/backend/types/metrics_dto.py +3 -5
- agenta/client/backend/types/new_testset.py +3 -5
- agenta/client/backend/types/node_dto.py +4 -6
- agenta/client/backend/types/o_tel_context_dto.py +3 -5
- agenta/client/backend/types/o_tel_event.py +35 -0
- agenta/client/backend/types/o_tel_event_dto.py +3 -5
- agenta/client/backend/types/o_tel_extra_dto.py +4 -6
- agenta/client/backend/types/o_tel_flat_span.py +56 -0
- agenta/client/backend/types/o_tel_flat_span_input_end_time.py +6 -0
- agenta/client/backend/types/o_tel_flat_span_input_start_time.py +6 -0
- agenta/client/backend/types/o_tel_flat_span_output_end_time.py +6 -0
- agenta/client/backend/types/o_tel_flat_span_output_start_time.py +6 -0
- agenta/client/backend/types/o_tel_link.py +34 -0
- agenta/client/backend/types/o_tel_link_dto.py +4 -6
- agenta/client/backend/types/o_tel_links_response.py +22 -0
- agenta/client/backend/types/o_tel_span.py +58 -0
- agenta/client/backend/types/o_tel_span_dto.py +8 -10
- agenta/client/backend/types/o_tel_span_input_end_time.py +6 -0
- agenta/client/backend/types/o_tel_span_input_spans_value.py +7 -0
- agenta/client/backend/types/o_tel_span_input_start_time.py +6 -0
- agenta/client/backend/types/o_tel_span_output_end_time.py +6 -0
- agenta/client/backend/types/o_tel_span_output_spans_value.py +30 -0
- agenta/client/backend/types/o_tel_span_output_start_time.py +6 -0
- agenta/client/backend/types/o_tel_spans_tree.py +22 -0
- agenta/client/backend/types/o_tel_spans_tree_input_spans_value.py +7 -0
- agenta/client/backend/types/o_tel_spans_tree_output_spans_value.py +5 -0
- agenta/client/backend/types/o_tel_status_code.py +1 -1
- agenta/client/backend/types/o_tel_tracing_data_response.py +22 -0
- agenta/client/backend/types/o_tel_tracing_request.py +22 -0
- agenta/client/backend/types/o_tel_tracing_response.py +27 -0
- agenta/client/backend/types/organization.py +3 -5
- agenta/client/backend/types/organization_details.py +3 -5
- agenta/client/backend/types/organization_membership_request.py +5 -7
- agenta/client/backend/types/organization_output.py +3 -5
- agenta/client/backend/types/organization_request.py +3 -5
- agenta/client/backend/types/parent_dto.py +3 -5
- agenta/client/backend/types/permission.py +11 -0
- agenta/client/backend/types/plan.py +14 -0
- agenta/client/backend/types/project_membership_request.py +5 -7
- agenta/client/backend/types/project_request.py +4 -6
- agenta/client/backend/types/project_scope.py +5 -7
- agenta/client/backend/types/projects_response.py +3 -5
- agenta/client/backend/types/recursive_types.py +23 -0
- agenta/client/backend/types/reference.py +18 -5
- agenta/client/backend/types/reference_dto.py +4 -5
- agenta/client/backend/types/reference_request_model.py +4 -5
- agenta/client/backend/types/result.py +4 -6
- agenta/client/backend/types/root_dto.py +3 -5
- agenta/client/backend/types/scopes_response_model.py +4 -6
- agenta/client/backend/types/secret_dto.py +5 -7
- agenta/client/backend/types/secret_response_dto.py +11 -11
- agenta/client/backend/types/simple_evaluation_output.py +4 -6
- agenta/client/backend/types/span_dto.py +18 -14
- agenta/client/backend/types/span_dto_nodes_value.py +1 -1
- agenta/client/backend/types/standard_provider_dto.py +5 -7
- agenta/client/backend/types/standard_provider_settings_dto.py +3 -5
- agenta/client/backend/types/status_dto.py +4 -6
- agenta/client/backend/types/tags_request.py +30 -0
- agenta/client/backend/types/test_set_output_response.py +5 -7
- agenta/client/backend/types/test_set_simple_response.py +3 -5
- agenta/client/backend/types/testcase_response.py +33 -0
- agenta/client/backend/types/testset.py +46 -0
- agenta/client/backend/types/testset_request.py +20 -0
- agenta/client/backend/types/testset_response.py +21 -0
- agenta/client/backend/types/testsets_response.py +21 -0
- agenta/client/backend/types/time_dto.py +3 -5
- agenta/client/backend/types/timestamp.py +6 -0
- agenta/client/backend/types/tree_dto.py +4 -6
- agenta/client/backend/types/update_app_output.py +3 -5
- agenta/client/backend/types/user_request.py +3 -5
- agenta/client/backend/types/validation_error.py +4 -6
- agenta/client/backend/types/workflow_artifact.py +45 -0
- agenta/client/backend/types/workflow_data.py +20 -0
- agenta/client/backend/types/workflow_flags.py +21 -0
- agenta/client/backend/types/workflow_request.py +20 -0
- agenta/client/backend/types/workflow_response.py +21 -0
- agenta/client/backend/types/workflow_revision.py +57 -0
- agenta/client/backend/types/workflow_revision_request.py +20 -0
- agenta/client/backend/types/workflow_revision_response.py +21 -0
- agenta/client/backend/types/workflow_revisions_response.py +21 -0
- agenta/client/backend/types/workflow_variant.py +48 -0
- agenta/client/backend/types/workflow_variant_request.py +20 -0
- agenta/client/backend/types/workflow_variant_response.py +21 -0
- agenta/client/backend/types/workflow_variants_response.py +21 -0
- agenta/client/backend/types/workflows_response.py +21 -0
- agenta/client/backend/types/workspace.py +3 -5
- agenta/client/backend/types/workspace_member_response.py +4 -6
- agenta/client/backend/types/workspace_membership_request.py +5 -7
- agenta/client/backend/types/workspace_permission.py +5 -7
- agenta/client/backend/types/workspace_request.py +4 -6
- agenta/client/backend/types/workspace_response.py +4 -6
- agenta/client/backend/variants/__init__.py +2 -0
- agenta/client/backend/variants/client.py +306 -1651
- agenta/client/backend/variants/raw_client.py +2482 -0
- agenta/client/backend/variants/types/__init__.py +2 -0
- agenta/client/backend/variants/types/add_variant_from_base_and_config_response.py +1 -0
- agenta/client/backend/vault/__init__.py +2 -0
- agenta/client/backend/vault/client.py +69 -323
- agenta/client/backend/vault/raw_client.py +616 -0
- agenta/client/backend/workflows/__init__.py +3 -0
- agenta/client/backend/workflows/client.py +2398 -0
- agenta/client/backend/workflows/raw_client.py +3639 -0
- agenta/client/backend/workspace/__init__.py +2 -0
- agenta/client/backend/workspace/client.py +46 -147
- agenta/client/backend/workspace/raw_client.py +376 -0
- agenta/client/types.py +4 -0
- agenta/sdk/types.py +28 -1
- {agenta-0.48.9.dist-info → agenta-0.48.10.dist-info}/METADATA +1 -1
- agenta-0.48.10.dist-info/RECORD +362 -0
- agenta/client/backend/containers/types/__init__.py +0 -5
- agenta/client/backend/containers/types/container_templates_response.py +0 -6
- agenta/client/backend/types/image.py +0 -25
- agenta/client/backend/types/provider_kind.py +0 -21
- agenta/client/backend/types/template.py +0 -23
- agenta/client/backend/types/template_image_info.py +0 -29
- agenta/client/backend/types/variant_action.py +0 -22
- agenta-0.48.9.dist-info/RECORD +0 -255
- {agenta-0.48.9.dist-info → agenta-0.48.10.dist-info}/WHEEL +0 -0
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.client_wrapper import SyncClientWrapper
|
|
4
3
|
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
5
6
|
from ..core.request_options import RequestOptions
|
|
6
7
|
from ..types.collect_status_response import CollectStatusResponse
|
|
7
|
-
from ..
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from .types.
|
|
11
|
-
from .types.query_traces_response import QueryTracesResponse
|
|
12
|
-
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
13
|
-
from ..types.http_validation_error import HttpValidationError
|
|
8
|
+
from ..types.format import Format
|
|
9
|
+
from .raw_client import AsyncRawObservabilityClient, RawObservabilityClient
|
|
10
|
+
from .types.fetch_trace_by_id_request_trace_id import FetchTraceByIdRequestTraceId
|
|
11
|
+
from .types.fetch_trace_by_id_response import FetchTraceByIdResponse
|
|
14
12
|
from .types.query_analytics_response import QueryAnalyticsResponse
|
|
15
|
-
from
|
|
13
|
+
from .types.query_traces_response import QueryTracesResponse
|
|
16
14
|
|
|
17
15
|
|
|
18
16
|
class ObservabilityClient:
|
|
19
17
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
20
|
-
self.
|
|
18
|
+
self._raw_client = RawObservabilityClient(client_wrapper=client_wrapper)
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def with_raw_response(self) -> RawObservabilityClient:
|
|
22
|
+
"""
|
|
23
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
24
|
+
|
|
25
|
+
Returns
|
|
26
|
+
-------
|
|
27
|
+
RawObservabilityClient
|
|
28
|
+
"""
|
|
29
|
+
return self._raw_client
|
|
21
30
|
|
|
22
31
|
def otlp_v_1_traces(
|
|
23
32
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
@@ -41,28 +50,11 @@ class ObservabilityClient:
|
|
|
41
50
|
|
|
42
51
|
client = AgentaApi(
|
|
43
52
|
api_key="YOUR_API_KEY",
|
|
44
|
-
base_url="https://yourhost.com/path/to/api",
|
|
45
53
|
)
|
|
46
54
|
client.observability.otlp_v_1_traces()
|
|
47
55
|
"""
|
|
48
|
-
_response = self.
|
|
49
|
-
|
|
50
|
-
method="POST",
|
|
51
|
-
request_options=request_options,
|
|
52
|
-
)
|
|
53
|
-
try:
|
|
54
|
-
if 200 <= _response.status_code < 300:
|
|
55
|
-
return typing.cast(
|
|
56
|
-
CollectStatusResponse,
|
|
57
|
-
parse_obj_as(
|
|
58
|
-
type_=CollectStatusResponse, # type: ignore
|
|
59
|
-
object_=_response.json(),
|
|
60
|
-
),
|
|
61
|
-
)
|
|
62
|
-
_response_json = _response.json()
|
|
63
|
-
except JSONDecodeError:
|
|
64
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
65
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
56
|
+
_response = self._raw_client.otlp_v_1_traces(request_options=request_options)
|
|
57
|
+
return _response.data
|
|
66
58
|
|
|
67
59
|
def otlp_status(
|
|
68
60
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
@@ -86,28 +78,11 @@ class ObservabilityClient:
|
|
|
86
78
|
|
|
87
79
|
client = AgentaApi(
|
|
88
80
|
api_key="YOUR_API_KEY",
|
|
89
|
-
base_url="https://yourhost.com/path/to/api",
|
|
90
81
|
)
|
|
91
82
|
client.observability.otlp_status()
|
|
92
83
|
"""
|
|
93
|
-
_response = self.
|
|
94
|
-
|
|
95
|
-
method="GET",
|
|
96
|
-
request_options=request_options,
|
|
97
|
-
)
|
|
98
|
-
try:
|
|
99
|
-
if 200 <= _response.status_code < 300:
|
|
100
|
-
return typing.cast(
|
|
101
|
-
CollectStatusResponse,
|
|
102
|
-
parse_obj_as(
|
|
103
|
-
type_=CollectStatusResponse, # type: ignore
|
|
104
|
-
object_=_response.json(),
|
|
105
|
-
),
|
|
106
|
-
)
|
|
107
|
-
_response_json = _response.json()
|
|
108
|
-
except JSONDecodeError:
|
|
109
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
110
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
84
|
+
_response = self._raw_client.otlp_status(request_options=request_options)
|
|
85
|
+
return _response.data
|
|
111
86
|
|
|
112
87
|
def otlp_receiver(
|
|
113
88
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
@@ -131,28 +106,11 @@ class ObservabilityClient:
|
|
|
131
106
|
|
|
132
107
|
client = AgentaApi(
|
|
133
108
|
api_key="YOUR_API_KEY",
|
|
134
|
-
base_url="https://yourhost.com/path/to/api",
|
|
135
109
|
)
|
|
136
110
|
client.observability.otlp_receiver()
|
|
137
111
|
"""
|
|
138
|
-
_response = self.
|
|
139
|
-
|
|
140
|
-
method="POST",
|
|
141
|
-
request_options=request_options,
|
|
142
|
-
)
|
|
143
|
-
try:
|
|
144
|
-
if 200 <= _response.status_code < 300:
|
|
145
|
-
return typing.cast(
|
|
146
|
-
CollectStatusResponse,
|
|
147
|
-
parse_obj_as(
|
|
148
|
-
type_=CollectStatusResponse, # type: ignore
|
|
149
|
-
object_=_response.json(),
|
|
150
|
-
),
|
|
151
|
-
)
|
|
152
|
-
_response_json = _response.json()
|
|
153
|
-
except JSONDecodeError:
|
|
154
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
155
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
112
|
+
_response = self._raw_client.otlp_receiver(request_options=request_options)
|
|
113
|
+
return _response.data
|
|
156
114
|
|
|
157
115
|
def query_traces(
|
|
158
116
|
self,
|
|
@@ -205,49 +163,22 @@ class ObservabilityClient:
|
|
|
205
163
|
|
|
206
164
|
client = AgentaApi(
|
|
207
165
|
api_key="YOUR_API_KEY",
|
|
208
|
-
base_url="https://yourhost.com/path/to/api",
|
|
209
166
|
)
|
|
210
167
|
client.observability.query_traces()
|
|
211
168
|
"""
|
|
212
|
-
_response = self.
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
"size": size,
|
|
223
|
-
"next": next,
|
|
224
|
-
"stop": stop,
|
|
225
|
-
},
|
|
169
|
+
_response = self._raw_client.query_traces(
|
|
170
|
+
format=format,
|
|
171
|
+
focus=focus,
|
|
172
|
+
oldest=oldest,
|
|
173
|
+
newest=newest,
|
|
174
|
+
filtering=filtering,
|
|
175
|
+
page=page,
|
|
176
|
+
size=size,
|
|
177
|
+
next=next,
|
|
178
|
+
stop=stop,
|
|
226
179
|
request_options=request_options,
|
|
227
180
|
)
|
|
228
|
-
|
|
229
|
-
if 200 <= _response.status_code < 300:
|
|
230
|
-
return typing.cast(
|
|
231
|
-
QueryTracesResponse,
|
|
232
|
-
parse_obj_as(
|
|
233
|
-
type_=QueryTracesResponse, # type: ignore
|
|
234
|
-
object_=_response.json(),
|
|
235
|
-
),
|
|
236
|
-
)
|
|
237
|
-
if _response.status_code == 422:
|
|
238
|
-
raise UnprocessableEntityError(
|
|
239
|
-
typing.cast(
|
|
240
|
-
HttpValidationError,
|
|
241
|
-
parse_obj_as(
|
|
242
|
-
type_=HttpValidationError, # type: ignore
|
|
243
|
-
object_=_response.json(),
|
|
244
|
-
),
|
|
245
|
-
)
|
|
246
|
-
)
|
|
247
|
-
_response_json = _response.json()
|
|
248
|
-
except JSONDecodeError:
|
|
249
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
250
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
181
|
+
return _response.data
|
|
251
182
|
|
|
252
183
|
def delete_traces(
|
|
253
184
|
self,
|
|
@@ -279,42 +210,13 @@ class ObservabilityClient:
|
|
|
279
210
|
|
|
280
211
|
client = AgentaApi(
|
|
281
212
|
api_key="YOUR_API_KEY",
|
|
282
|
-
base_url="https://yourhost.com/path/to/api",
|
|
283
213
|
)
|
|
284
214
|
client.observability.delete_traces()
|
|
285
215
|
"""
|
|
286
|
-
_response = self.
|
|
287
|
-
|
|
288
|
-
method="DELETE",
|
|
289
|
-
params={
|
|
290
|
-
"node_id": node_id,
|
|
291
|
-
"node_ids": node_ids,
|
|
292
|
-
},
|
|
293
|
-
request_options=request_options,
|
|
216
|
+
_response = self._raw_client.delete_traces(
|
|
217
|
+
node_id=node_id, node_ids=node_ids, request_options=request_options
|
|
294
218
|
)
|
|
295
|
-
|
|
296
|
-
if 200 <= _response.status_code < 300:
|
|
297
|
-
return typing.cast(
|
|
298
|
-
CollectStatusResponse,
|
|
299
|
-
parse_obj_as(
|
|
300
|
-
type_=CollectStatusResponse, # type: ignore
|
|
301
|
-
object_=_response.json(),
|
|
302
|
-
),
|
|
303
|
-
)
|
|
304
|
-
if _response.status_code == 422:
|
|
305
|
-
raise UnprocessableEntityError(
|
|
306
|
-
typing.cast(
|
|
307
|
-
HttpValidationError,
|
|
308
|
-
parse_obj_as(
|
|
309
|
-
type_=HttpValidationError, # type: ignore
|
|
310
|
-
object_=_response.json(),
|
|
311
|
-
),
|
|
312
|
-
)
|
|
313
|
-
)
|
|
314
|
-
_response_json = _response.json()
|
|
315
|
-
except JSONDecodeError:
|
|
316
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
317
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
219
|
+
return _response.data
|
|
318
220
|
|
|
319
221
|
def query_analytics(
|
|
320
222
|
self,
|
|
@@ -368,55 +270,79 @@ class ObservabilityClient:
|
|
|
368
270
|
|
|
369
271
|
client = AgentaApi(
|
|
370
272
|
api_key="YOUR_API_KEY",
|
|
371
|
-
base_url="https://yourhost.com/path/to/api",
|
|
372
273
|
)
|
|
373
274
|
client.observability.query_analytics()
|
|
374
275
|
"""
|
|
375
|
-
_response = self.
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
"app_id": app_id,
|
|
387
|
-
"environment": environment,
|
|
388
|
-
"variant": variant,
|
|
389
|
-
},
|
|
276
|
+
_response = self._raw_client.query_analytics(
|
|
277
|
+
format=format,
|
|
278
|
+
focus=focus,
|
|
279
|
+
oldest=oldest,
|
|
280
|
+
newest=newest,
|
|
281
|
+
window=window,
|
|
282
|
+
filtering=filtering,
|
|
283
|
+
time_range=time_range,
|
|
284
|
+
app_id=app_id,
|
|
285
|
+
environment=environment,
|
|
286
|
+
variant=variant,
|
|
390
287
|
request_options=request_options,
|
|
391
288
|
)
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
289
|
+
return _response.data
|
|
290
|
+
|
|
291
|
+
def fetch_trace_by_id(
|
|
292
|
+
self,
|
|
293
|
+
trace_id: FetchTraceByIdRequestTraceId,
|
|
294
|
+
*,
|
|
295
|
+
format: typing.Optional[Format] = None,
|
|
296
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
297
|
+
) -> FetchTraceByIdResponse:
|
|
298
|
+
"""
|
|
299
|
+
Fetch trace by ID.
|
|
300
|
+
|
|
301
|
+
Parameters
|
|
302
|
+
----------
|
|
303
|
+
trace_id : FetchTraceByIdRequestTraceId
|
|
304
|
+
|
|
305
|
+
format : typing.Optional[Format]
|
|
306
|
+
|
|
307
|
+
request_options : typing.Optional[RequestOptions]
|
|
308
|
+
Request-specific configuration.
|
|
309
|
+
|
|
310
|
+
Returns
|
|
311
|
+
-------
|
|
312
|
+
FetchTraceByIdResponse
|
|
313
|
+
Successful Response
|
|
314
|
+
|
|
315
|
+
Examples
|
|
316
|
+
--------
|
|
317
|
+
from agenta import AgentaApi
|
|
318
|
+
|
|
319
|
+
client = AgentaApi(
|
|
320
|
+
api_key="YOUR_API_KEY",
|
|
321
|
+
)
|
|
322
|
+
client.observability.fetch_trace_by_id(
|
|
323
|
+
trace_id="trace_id",
|
|
324
|
+
)
|
|
325
|
+
"""
|
|
326
|
+
_response = self._raw_client.fetch_trace_by_id(
|
|
327
|
+
trace_id, format=format, request_options=request_options
|
|
328
|
+
)
|
|
329
|
+
return _response.data
|
|
415
330
|
|
|
416
331
|
|
|
417
332
|
class AsyncObservabilityClient:
|
|
418
333
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
419
|
-
self.
|
|
334
|
+
self._raw_client = AsyncRawObservabilityClient(client_wrapper=client_wrapper)
|
|
335
|
+
|
|
336
|
+
@property
|
|
337
|
+
def with_raw_response(self) -> AsyncRawObservabilityClient:
|
|
338
|
+
"""
|
|
339
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
340
|
+
|
|
341
|
+
Returns
|
|
342
|
+
-------
|
|
343
|
+
AsyncRawObservabilityClient
|
|
344
|
+
"""
|
|
345
|
+
return self._raw_client
|
|
420
346
|
|
|
421
347
|
async def otlp_v_1_traces(
|
|
422
348
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
@@ -442,7 +368,6 @@ class AsyncObservabilityClient:
|
|
|
442
368
|
|
|
443
369
|
client = AsyncAgentaApi(
|
|
444
370
|
api_key="YOUR_API_KEY",
|
|
445
|
-
base_url="https://yourhost.com/path/to/api",
|
|
446
371
|
)
|
|
447
372
|
|
|
448
373
|
|
|
@@ -452,24 +377,10 @@ class AsyncObservabilityClient:
|
|
|
452
377
|
|
|
453
378
|
asyncio.run(main())
|
|
454
379
|
"""
|
|
455
|
-
_response = await self.
|
|
456
|
-
|
|
457
|
-
method="POST",
|
|
458
|
-
request_options=request_options,
|
|
380
|
+
_response = await self._raw_client.otlp_v_1_traces(
|
|
381
|
+
request_options=request_options
|
|
459
382
|
)
|
|
460
|
-
|
|
461
|
-
if 200 <= _response.status_code < 300:
|
|
462
|
-
return typing.cast(
|
|
463
|
-
CollectStatusResponse,
|
|
464
|
-
parse_obj_as(
|
|
465
|
-
type_=CollectStatusResponse, # type: ignore
|
|
466
|
-
object_=_response.json(),
|
|
467
|
-
),
|
|
468
|
-
)
|
|
469
|
-
_response_json = _response.json()
|
|
470
|
-
except JSONDecodeError:
|
|
471
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
472
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
383
|
+
return _response.data
|
|
473
384
|
|
|
474
385
|
async def otlp_status(
|
|
475
386
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
@@ -495,7 +406,6 @@ class AsyncObservabilityClient:
|
|
|
495
406
|
|
|
496
407
|
client = AsyncAgentaApi(
|
|
497
408
|
api_key="YOUR_API_KEY",
|
|
498
|
-
base_url="https://yourhost.com/path/to/api",
|
|
499
409
|
)
|
|
500
410
|
|
|
501
411
|
|
|
@@ -505,24 +415,8 @@ class AsyncObservabilityClient:
|
|
|
505
415
|
|
|
506
416
|
asyncio.run(main())
|
|
507
417
|
"""
|
|
508
|
-
_response = await self.
|
|
509
|
-
|
|
510
|
-
method="GET",
|
|
511
|
-
request_options=request_options,
|
|
512
|
-
)
|
|
513
|
-
try:
|
|
514
|
-
if 200 <= _response.status_code < 300:
|
|
515
|
-
return typing.cast(
|
|
516
|
-
CollectStatusResponse,
|
|
517
|
-
parse_obj_as(
|
|
518
|
-
type_=CollectStatusResponse, # type: ignore
|
|
519
|
-
object_=_response.json(),
|
|
520
|
-
),
|
|
521
|
-
)
|
|
522
|
-
_response_json = _response.json()
|
|
523
|
-
except JSONDecodeError:
|
|
524
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
525
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
418
|
+
_response = await self._raw_client.otlp_status(request_options=request_options)
|
|
419
|
+
return _response.data
|
|
526
420
|
|
|
527
421
|
async def otlp_receiver(
|
|
528
422
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
@@ -548,7 +442,6 @@ class AsyncObservabilityClient:
|
|
|
548
442
|
|
|
549
443
|
client = AsyncAgentaApi(
|
|
550
444
|
api_key="YOUR_API_KEY",
|
|
551
|
-
base_url="https://yourhost.com/path/to/api",
|
|
552
445
|
)
|
|
553
446
|
|
|
554
447
|
|
|
@@ -558,24 +451,10 @@ class AsyncObservabilityClient:
|
|
|
558
451
|
|
|
559
452
|
asyncio.run(main())
|
|
560
453
|
"""
|
|
561
|
-
_response = await self.
|
|
562
|
-
|
|
563
|
-
method="POST",
|
|
564
|
-
request_options=request_options,
|
|
454
|
+
_response = await self._raw_client.otlp_receiver(
|
|
455
|
+
request_options=request_options
|
|
565
456
|
)
|
|
566
|
-
|
|
567
|
-
if 200 <= _response.status_code < 300:
|
|
568
|
-
return typing.cast(
|
|
569
|
-
CollectStatusResponse,
|
|
570
|
-
parse_obj_as(
|
|
571
|
-
type_=CollectStatusResponse, # type: ignore
|
|
572
|
-
object_=_response.json(),
|
|
573
|
-
),
|
|
574
|
-
)
|
|
575
|
-
_response_json = _response.json()
|
|
576
|
-
except JSONDecodeError:
|
|
577
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
578
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
457
|
+
return _response.data
|
|
579
458
|
|
|
580
459
|
async def query_traces(
|
|
581
460
|
self,
|
|
@@ -630,7 +509,6 @@ class AsyncObservabilityClient:
|
|
|
630
509
|
|
|
631
510
|
client = AsyncAgentaApi(
|
|
632
511
|
api_key="YOUR_API_KEY",
|
|
633
|
-
base_url="https://yourhost.com/path/to/api",
|
|
634
512
|
)
|
|
635
513
|
|
|
636
514
|
|
|
@@ -640,45 +518,19 @@ class AsyncObservabilityClient:
|
|
|
640
518
|
|
|
641
519
|
asyncio.run(main())
|
|
642
520
|
"""
|
|
643
|
-
_response = await self.
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
"size": size,
|
|
654
|
-
"next": next,
|
|
655
|
-
"stop": stop,
|
|
656
|
-
},
|
|
521
|
+
_response = await self._raw_client.query_traces(
|
|
522
|
+
format=format,
|
|
523
|
+
focus=focus,
|
|
524
|
+
oldest=oldest,
|
|
525
|
+
newest=newest,
|
|
526
|
+
filtering=filtering,
|
|
527
|
+
page=page,
|
|
528
|
+
size=size,
|
|
529
|
+
next=next,
|
|
530
|
+
stop=stop,
|
|
657
531
|
request_options=request_options,
|
|
658
532
|
)
|
|
659
|
-
|
|
660
|
-
if 200 <= _response.status_code < 300:
|
|
661
|
-
return typing.cast(
|
|
662
|
-
QueryTracesResponse,
|
|
663
|
-
parse_obj_as(
|
|
664
|
-
type_=QueryTracesResponse, # type: ignore
|
|
665
|
-
object_=_response.json(),
|
|
666
|
-
),
|
|
667
|
-
)
|
|
668
|
-
if _response.status_code == 422:
|
|
669
|
-
raise UnprocessableEntityError(
|
|
670
|
-
typing.cast(
|
|
671
|
-
HttpValidationError,
|
|
672
|
-
parse_obj_as(
|
|
673
|
-
type_=HttpValidationError, # type: ignore
|
|
674
|
-
object_=_response.json(),
|
|
675
|
-
),
|
|
676
|
-
)
|
|
677
|
-
)
|
|
678
|
-
_response_json = _response.json()
|
|
679
|
-
except JSONDecodeError:
|
|
680
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
681
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
533
|
+
return _response.data
|
|
682
534
|
|
|
683
535
|
async def delete_traces(
|
|
684
536
|
self,
|
|
@@ -712,7 +564,6 @@ class AsyncObservabilityClient:
|
|
|
712
564
|
|
|
713
565
|
client = AsyncAgentaApi(
|
|
714
566
|
api_key="YOUR_API_KEY",
|
|
715
|
-
base_url="https://yourhost.com/path/to/api",
|
|
716
567
|
)
|
|
717
568
|
|
|
718
569
|
|
|
@@ -722,38 +573,10 @@ class AsyncObservabilityClient:
|
|
|
722
573
|
|
|
723
574
|
asyncio.run(main())
|
|
724
575
|
"""
|
|
725
|
-
_response = await self.
|
|
726
|
-
|
|
727
|
-
method="DELETE",
|
|
728
|
-
params={
|
|
729
|
-
"node_id": node_id,
|
|
730
|
-
"node_ids": node_ids,
|
|
731
|
-
},
|
|
732
|
-
request_options=request_options,
|
|
576
|
+
_response = await self._raw_client.delete_traces(
|
|
577
|
+
node_id=node_id, node_ids=node_ids, request_options=request_options
|
|
733
578
|
)
|
|
734
|
-
|
|
735
|
-
if 200 <= _response.status_code < 300:
|
|
736
|
-
return typing.cast(
|
|
737
|
-
CollectStatusResponse,
|
|
738
|
-
parse_obj_as(
|
|
739
|
-
type_=CollectStatusResponse, # type: ignore
|
|
740
|
-
object_=_response.json(),
|
|
741
|
-
),
|
|
742
|
-
)
|
|
743
|
-
if _response.status_code == 422:
|
|
744
|
-
raise UnprocessableEntityError(
|
|
745
|
-
typing.cast(
|
|
746
|
-
HttpValidationError,
|
|
747
|
-
parse_obj_as(
|
|
748
|
-
type_=HttpValidationError, # type: ignore
|
|
749
|
-
object_=_response.json(),
|
|
750
|
-
),
|
|
751
|
-
)
|
|
752
|
-
)
|
|
753
|
-
_response_json = _response.json()
|
|
754
|
-
except JSONDecodeError:
|
|
755
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
756
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
579
|
+
return _response.data
|
|
757
580
|
|
|
758
581
|
async def query_analytics(
|
|
759
582
|
self,
|
|
@@ -809,7 +632,6 @@ class AsyncObservabilityClient:
|
|
|
809
632
|
|
|
810
633
|
client = AsyncAgentaApi(
|
|
811
634
|
api_key="YOUR_API_KEY",
|
|
812
|
-
base_url="https://yourhost.com/path/to/api",
|
|
813
635
|
)
|
|
814
636
|
|
|
815
637
|
|
|
@@ -819,43 +641,65 @@ class AsyncObservabilityClient:
|
|
|
819
641
|
|
|
820
642
|
asyncio.run(main())
|
|
821
643
|
"""
|
|
822
|
-
_response = await self.
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
"app_id": app_id,
|
|
834
|
-
"environment": environment,
|
|
835
|
-
"variant": variant,
|
|
836
|
-
},
|
|
644
|
+
_response = await self._raw_client.query_analytics(
|
|
645
|
+
format=format,
|
|
646
|
+
focus=focus,
|
|
647
|
+
oldest=oldest,
|
|
648
|
+
newest=newest,
|
|
649
|
+
window=window,
|
|
650
|
+
filtering=filtering,
|
|
651
|
+
time_range=time_range,
|
|
652
|
+
app_id=app_id,
|
|
653
|
+
environment=environment,
|
|
654
|
+
variant=variant,
|
|
837
655
|
request_options=request_options,
|
|
838
656
|
)
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
657
|
+
return _response.data
|
|
658
|
+
|
|
659
|
+
async def fetch_trace_by_id(
|
|
660
|
+
self,
|
|
661
|
+
trace_id: FetchTraceByIdRequestTraceId,
|
|
662
|
+
*,
|
|
663
|
+
format: typing.Optional[Format] = None,
|
|
664
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
665
|
+
) -> FetchTraceByIdResponse:
|
|
666
|
+
"""
|
|
667
|
+
Fetch trace by ID.
|
|
668
|
+
|
|
669
|
+
Parameters
|
|
670
|
+
----------
|
|
671
|
+
trace_id : FetchTraceByIdRequestTraceId
|
|
672
|
+
|
|
673
|
+
format : typing.Optional[Format]
|
|
674
|
+
|
|
675
|
+
request_options : typing.Optional[RequestOptions]
|
|
676
|
+
Request-specific configuration.
|
|
677
|
+
|
|
678
|
+
Returns
|
|
679
|
+
-------
|
|
680
|
+
FetchTraceByIdResponse
|
|
681
|
+
Successful Response
|
|
682
|
+
|
|
683
|
+
Examples
|
|
684
|
+
--------
|
|
685
|
+
import asyncio
|
|
686
|
+
|
|
687
|
+
from agenta import AsyncAgentaApi
|
|
688
|
+
|
|
689
|
+
client = AsyncAgentaApi(
|
|
690
|
+
api_key="YOUR_API_KEY",
|
|
691
|
+
)
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
async def main() -> None:
|
|
695
|
+
await client.observability.fetch_trace_by_id(
|
|
696
|
+
trace_id="trace_id",
|
|
697
|
+
)
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
asyncio.run(main())
|
|
701
|
+
"""
|
|
702
|
+
_response = await self._raw_client.fetch_trace_by_id(
|
|
703
|
+
trace_id, format=format, request_options=request_options
|
|
704
|
+
)
|
|
705
|
+
return _response.data
|