Skip to content

Commit 16ab771

Browse files
feat(api): api update
1 parent fd2d1a7 commit 16ab771

4 files changed

Lines changed: 12 additions & 4 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 45
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-923359d34612fd85eddaaf4a787b5509c269ca15731f6026c12274c54c901747.yml
3-
openapi_spec_hash: 5339c136760ece9fa1efb9a4f7749673
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-c108a179582f0e0c6d479ea4b3bc6310a83693987073967c2b6203df23718eb2.yml
3+
openapi_spec_hash: 53b8e5866709af71bef94816b8ede38b
44
config_hash: fb079ef7936611b032568661b8165f19

src/agentex/resources/spans.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ def list(
234234
order_by: Optional[str] | Omit = omit,
235235
order_direction: str | Omit = omit,
236236
page_number: int | Omit = omit,
237+
task_id: Optional[str] | Omit = omit,
237238
trace_id: Optional[str] | Omit = omit,
238239
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
239240
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -243,7 +244,7 @@ def list(
243244
timeout: float | httpx.Timeout | None | NotGiven = not_given,
244245
) -> SpanListResponse:
245246
"""
246-
List all spans for a given trace ID
247+
List spans, optionally filtered by trace_id and/or task_id
247248
248249
Args:
249250
extra_headers: Send extra headers
@@ -267,6 +268,7 @@ def list(
267268
"order_by": order_by,
268269
"order_direction": order_direction,
269270
"page_number": page_number,
271+
"task_id": task_id,
270272
"trace_id": trace_id,
271273
},
272274
span_list_params.SpanListParams,
@@ -485,6 +487,7 @@ async def list(
485487
order_by: Optional[str] | Omit = omit,
486488
order_direction: str | Omit = omit,
487489
page_number: int | Omit = omit,
490+
task_id: Optional[str] | Omit = omit,
488491
trace_id: Optional[str] | Omit = omit,
489492
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
490493
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -494,7 +497,7 @@ async def list(
494497
timeout: float | httpx.Timeout | None | NotGiven = not_given,
495498
) -> SpanListResponse:
496499
"""
497-
List all spans for a given trace ID
500+
List spans, optionally filtered by trace_id and/or task_id
498501
499502
Args:
500503
extra_headers: Send extra headers
@@ -518,6 +521,7 @@ async def list(
518521
"order_by": order_by,
519522
"order_direction": order_direction,
520523
"page_number": page_number,
524+
"task_id": task_id,
521525
"trace_id": trace_id,
522526
},
523527
span_list_params.SpanListParams,

src/agentex/types/span_list_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ class SpanListParams(TypedDict, total=False):
1717

1818
page_number: int
1919

20+
task_id: Optional[str]
21+
2022
trace_id: Optional[str]

tests/api_resources/test_spans.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ def test_method_list_with_all_params(self, client: Agentex) -> None:
191191
order_by="order_by",
192192
order_direction="order_direction",
193193
page_number=1,
194+
task_id="task_id",
194195
trace_id="trace_id",
195196
)
196197
assert_matches_type(SpanListResponse, span, path=["response"])
@@ -395,6 +396,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncAgentex) ->
395396
order_by="order_by",
396397
order_direction="order_direction",
397398
page_number=1,
399+
task_id="task_id",
398400
trace_id="trace_id",
399401
)
400402
assert_matches_type(SpanListResponse, span, path=["response"])

0 commit comments

Comments
 (0)