@mastra/client-js 1.14.0-alpha.10 → 1.14.0-alpha.11
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.
- package/CHANGELOG.md +9 -0
- package/dist/client.d.ts +5 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +29 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/observability.d.ts +18 -1
- package/dist/resources/observability.d.ts.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -3041,6 +3041,27 @@ var Observability = class extends BaseResource {
|
|
|
3041
3041
|
getTrace(traceId) {
|
|
3042
3042
|
return this.request(`/observability/traces/${traceId}`);
|
|
3043
3043
|
}
|
|
3044
|
+
/**
|
|
3045
|
+
* Retrieves a lightweight trace by ID (timeline fields only).
|
|
3046
|
+
* Excludes heavy fields (input, output, attributes, metadata, tags, links)
|
|
3047
|
+
* for ~97% payload reduction compared to getTrace.
|
|
3048
|
+
*
|
|
3049
|
+
* @param traceId - ID of the trace to retrieve
|
|
3050
|
+
* @returns Promise containing the trace with lightweight spans
|
|
3051
|
+
*/
|
|
3052
|
+
getTraceLight(traceId) {
|
|
3053
|
+
return this.request(`/observability/traces/${traceId}/light`);
|
|
3054
|
+
}
|
|
3055
|
+
/**
|
|
3056
|
+
* Retrieves a single span with full details by trace ID and span ID.
|
|
3057
|
+
*
|
|
3058
|
+
* @param traceId - ID of the trace containing the span
|
|
3059
|
+
* @param spanId - ID of the span to retrieve
|
|
3060
|
+
* @returns Promise containing the full span record
|
|
3061
|
+
*/
|
|
3062
|
+
getSpan(traceId, spanId) {
|
|
3063
|
+
return this.request(`/observability/traces/${traceId}/spans/${spanId}`);
|
|
3064
|
+
}
|
|
3044
3065
|
/**
|
|
3045
3066
|
* Extracts a structured trajectory from a trace's spans.
|
|
3046
3067
|
*
|
|
@@ -4920,6 +4941,14 @@ var MastraClient = class extends BaseResource {
|
|
|
4920
4941
|
getTrace(traceId) {
|
|
4921
4942
|
return this.observability.getTrace(traceId);
|
|
4922
4943
|
}
|
|
4944
|
+
/** Retrieves a lightweight trace by ID (timeline fields only, excludes heavy fields). */
|
|
4945
|
+
getTraceLight(traceId) {
|
|
4946
|
+
return this.observability.getTraceLight(traceId);
|
|
4947
|
+
}
|
|
4948
|
+
/** Retrieves a single span with full details by trace ID and span ID. */
|
|
4949
|
+
getSpan(traceId, spanId) {
|
|
4950
|
+
return this.observability.getSpan(traceId, spanId);
|
|
4951
|
+
}
|
|
4923
4952
|
/** Extracts a structured trajectory from a trace's spans. */
|
|
4924
4953
|
getTraceTrajectory(traceId) {
|
|
4925
4954
|
return this.observability.getTraceTrajectory(traceId);
|