Skip to content

Commit 53bc5bb

Browse files
SDK regeneration
1 parent 3cd5b25 commit 53bc5bb

4 files changed

Lines changed: 79 additions & 24 deletions

File tree

reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6326,15 +6326,15 @@ for page in response.iter_pages():
63266326
<dl>
63276327
<dd>
63286328

6329-
**sort_direction:** `typing.Optional[SortDirection]` — Sort direction for results. Defaults to desc.
6329+
**sort_direction:** `typing.Optional[SortDirection]` — Sort direction for results based on time. Defaults to descending (latest first)
63306330

63316331
</dd>
63326332
</dl>
63336333

63346334
<dl>
63356335
<dd>
63366336

6337-
**page_token:** `typing.Optional[str]`Base64 encoded page token for pagination
6337+
**page_token:** `typing.Optional[str]`Cursor token for pagination. This is an opaque string that should be passed as-is from the previous response
63386338

63396339
</dd>
63406340
</dl>

src/truefoundry_sdk/traces/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ def query_spans(
8080
The maximum number of spans to return per page. Defaults to 200 if not provided.
8181
8282
sort_direction : typing.Optional[SortDirection]
83-
Sort direction for results. Defaults to desc.
83+
Sort direction for results based on time. Defaults to descending (latest first)
8484
8585
page_token : typing.Optional[str]
86-
Base64 encoded page token for pagination
86+
Cursor token for pagination. This is an opaque string that should be passed as-is from the previous response
8787
8888
request_options : typing.Optional[RequestOptions]
8989
Request-specific configuration.
@@ -194,10 +194,10 @@ async def query_spans(
194194
The maximum number of spans to return per page. Defaults to 200 if not provided.
195195
196196
sort_direction : typing.Optional[SortDirection]
197-
Sort direction for results. Defaults to desc.
197+
Sort direction for results based on time. Defaults to descending (latest first)
198198
199199
page_token : typing.Optional[str]
200-
Base64 encoded page token for pagination
200+
Cursor token for pagination. This is an opaque string that should be passed as-is from the previous response
201201
202202
request_options : typing.Optional[RequestOptions]
203203
Request-specific configuration.

src/truefoundry_sdk/traces/raw_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ def query_spans(
7272
The maximum number of spans to return per page. Defaults to 200 if not provided.
7373
7474
sort_direction : typing.Optional[SortDirection]
75-
Sort direction for results. Defaults to desc.
75+
Sort direction for results based on time. Defaults to descending (latest first)
7676
7777
page_token : typing.Optional[str]
78-
Base64 encoded page token for pagination
78+
Cursor token for pagination. This is an opaque string that should be passed as-is from the previous response
7979
8080
request_options : typing.Optional[RequestOptions]
8181
Request-specific configuration.
@@ -202,10 +202,10 @@ async def query_spans(
202202
The maximum number of spans to return per page. Defaults to 200 if not provided.
203203
204204
sort_direction : typing.Optional[SortDirection]
205-
Sort direction for results. Defaults to desc.
205+
Sort direction for results based on time. Defaults to descending (latest first)
206206
207207
page_token : typing.Optional[str]
208-
Base64 encoded page token for pagination
208+
Cursor token for pagination. This is an opaque string that should be passed as-is from the previous response
209209
210210
request_options : typing.Optional[RequestOptions]
211211
Request-specific configuration.

src/truefoundry_sdk/types/trace_span.py

Lines changed: 69 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,82 @@
1010

1111

1212
class TraceSpan(UniversalBaseModel):
13-
span_id: typing_extensions.Annotated[str, FieldMetadata(alias="spanId")]
14-
trace_id: typing_extensions.Annotated[str, FieldMetadata(alias="traceId")]
15-
parent_span_id: typing_extensions.Annotated[str, FieldMetadata(alias="parentSpanId")]
16-
service_name: typing_extensions.Annotated[str, FieldMetadata(alias="serviceName")]
17-
span_name: typing_extensions.Annotated[str, FieldMetadata(alias="spanName")]
18-
span_kind: typing_extensions.Annotated[str, FieldMetadata(alias="spanKind")]
19-
scope_name: typing_extensions.Annotated[str, FieldMetadata(alias="scopeName")]
20-
scope_version: typing_extensions.Annotated[str, FieldMetadata(alias="scopeVersion")]
13+
span_id: typing_extensions.Annotated[str, FieldMetadata(alias="spanId")] = pydantic.Field()
14+
"""
15+
Unique identifier for the span within the trace.
16+
"""
17+
18+
trace_id: typing_extensions.Annotated[str, FieldMetadata(alias="traceId")] = pydantic.Field()
19+
"""
20+
Unique identifier for the trace that contains this span.
21+
"""
22+
23+
parent_span_id: typing_extensions.Annotated[str, FieldMetadata(alias="parentSpanId")] = pydantic.Field()
24+
"""
25+
Identifier of the parent span in the trace hierarchy.
26+
"""
27+
28+
service_name: typing_extensions.Annotated[str, FieldMetadata(alias="serviceName")] = pydantic.Field()
29+
"""
30+
Name of the service that generated this span.
31+
"""
32+
33+
span_name: typing_extensions.Annotated[str, FieldMetadata(alias="spanName")] = pydantic.Field()
34+
"""
35+
Name of the span
36+
"""
37+
38+
span_kind: typing_extensions.Annotated[str, FieldMetadata(alias="spanKind")] = pydantic.Field()
39+
"""
40+
Type of span (e.g., CLIENT, SERVER, INTERNAL, PRODUCER, CONSUMER).
41+
"""
42+
43+
scope_name: typing_extensions.Annotated[str, FieldMetadata(alias="scopeName")] = pydantic.Field()
44+
"""
45+
Name of the instrumentation scope that created this span.
46+
"""
47+
48+
scope_version: typing_extensions.Annotated[str, FieldMetadata(alias="scopeVersion")] = pydantic.Field()
49+
"""
50+
Version of the instrumentation scope that created this span.
51+
"""
52+
2153
timestamp: str = pydantic.Field()
2254
"""
2355
Timestamp in ISO 8601 format (e.g., 2025-03-12T00:00:09.872Z).
2456
"""
2557

26-
duration: float
27-
status_code: typing_extensions.Annotated[str, FieldMetadata(alias="statusCode")]
28-
status_message: typing_extensions.Annotated[str, FieldMetadata(alias="statusMessage")]
58+
duration_ns: typing_extensions.Annotated[float, FieldMetadata(alias="durationNs")] = pydantic.Field()
59+
"""
60+
Duration of the span in nanoseconds.
61+
"""
62+
63+
status_code: typing_extensions.Annotated[str, FieldMetadata(alias="statusCode")] = pydantic.Field()
64+
"""
65+
Status code of the span (e.g., OK, ERROR, UNSET).
66+
"""
67+
68+
status_message: typing_extensions.Annotated[str, FieldMetadata(alias="statusMessage")] = pydantic.Field()
69+
"""
70+
Human-readable status message describing the span result.
71+
"""
72+
2973
span_attributes: typing_extensions.Annotated[
3074
typing.Dict[str, typing.Optional[typing.Any]], FieldMetadata(alias="spanAttributes")
31-
]
32-
events: typing.List[typing.Dict[str, typing.Optional[typing.Any]]]
33-
created_by_subject: typing_extensions.Annotated[Subject, FieldMetadata(alias="createdBySubject")]
75+
] = pydantic.Field()
76+
"""
77+
Key-value pairs containing additional metadata about the span.
78+
"""
79+
80+
events: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
81+
"""
82+
Array of events that occurred during the span execution.
83+
"""
84+
85+
created_by_subject: typing_extensions.Annotated[Subject, FieldMetadata(alias="createdBySubject")] = pydantic.Field()
86+
"""
87+
Subject (user or virtualaccount) that created this span.
88+
"""
3489

3590
if IS_PYDANTIC_V2:
3691
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2

0 commit comments

Comments
 (0)