@mastra/observability 1.24.0-alpha.5 → 1.24.0-alpha.6
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/dist/bus/observability-bus.d.ts.map +1 -1
- package/dist/bus/route-event.d.ts.map +1 -1
- package/dist/default.d.ts +3 -2
- package/dist/default.d.ts.map +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +63 -53
- package/dist/docs/references/reference-observability-feedback.md +14 -0
- package/dist/docs/references/reference-observability-tracing-exporters-langfuse.md +24 -1
- package/dist/exporters/default.d.ts +3 -1
- package/dist/exporters/default.d.ts.map +1 -1
- package/dist/exporters/event-buffer.d.ts +1 -1
- package/dist/exporters/event-buffer.d.ts.map +1 -1
- package/dist/exporters/keyed-queue.d.ts +6 -0
- package/dist/exporters/keyed-queue.d.ts.map +1 -0
- package/dist/exporters/mastra-platform.d.ts +4 -1
- package/dist/exporters/mastra-platform.d.ts.map +1 -1
- package/dist/exporters/mastra-storage.d.ts +3 -1
- package/dist/exporters/mastra-storage.d.ts.map +1 -1
- package/dist/exporters/platform-resolved-record.d.ts +1 -1
- package/dist/exporters/platform-resolved-record.d.ts.map +1 -1
- package/dist/exporters/storage-annotation.d.ts +4 -1
- package/dist/exporters/storage-annotation.d.ts.map +1 -1
- package/dist/index.cjs +122 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +121 -7
- package/dist/index.js.map +1 -1
- package/dist/spans/base.d.ts +9 -0
- package/dist/spans/base.d.ts.map +1 -1
- package/dist/spans/default.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability-bus.d.ts","sourceRoot":"","sources":["../../src/bus/observability-bus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACrB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,CAE3C;IAED;;;;;;OAMG;IACH,IAAI,CAAC,KAAK,EAAE,kBAAkB,EAAE,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,GAAG,IAAI,CAkB/F;IAED;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAYjD;IAED;;;OAGG;IACH,OAAO,CAAC,YAAY;IAQpB,qEAAqE;YACvD,oBAAoB;IAoBlC,sDAAsD;YACxC,mBAAmB;IAiBjC;;;;;;;;;;;;;;;OAeG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAmB3B;IAED,6EAA6E;IACvE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAG9B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-event.d.ts","sourceRoot":"","sources":["../../src/bus/route-event.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EACV,mBAAmB,EAMnB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAGpC;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAa1E;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,oBAAoB,EAC7B,KAAK,EAAE,kBAAkB,EACzB,MAAM,EAAE,aAAa,GACpB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"route-event.d.ts","sourceRoot":"","sources":["../../src/bus/route-event.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EACV,mBAAmB,EAMnB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAGpC;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAa1E;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,oBAAoB,EAC7B,KAAK,EAAE,kBAAkB,EACzB,MAAM,EAAE,aAAa,GACpB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA8EtB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,oBAAoB,EAC7B,KAAK,EAAE,sBAAsB,EAC7B,MAAM,EAAE,aAAa,GACpB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAQtB"}
|
package/dist/default.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Mastra } from '@mastra/core';
|
|
2
2
|
import { MastraBase } from '@mastra/core/base';
|
|
3
3
|
import type { IMastraLogger } from '@mastra/core/logger';
|
|
4
|
-
import type { ClientObservabilityProxy, CorrelationContext, ConfigSelector, ConfigSelectorOptions, FeedbackInput, FeedbackReplacementInput, FeedbackEvent, FeedbackReplacementEvent, ObservabilityEntrypoint, ObservabilityInstance, RecordedTrace, ScoreInput, ScoreEvent } from '@mastra/core/observability';
|
|
4
|
+
import type { ClientObservabilityProxy, CorrelationContext, ConfigSelector, ConfigSelectorOptions, FeedbackInput, FeedbackReplacementInput, FeedbackEvent, FeedbackReplacementEvent, FeedbackReviewStatusEvent, FeedbackReviewStatusInput, ObservabilityEntrypoint, ObservabilityInstance, RecordedTrace, ScoreInput, ScoreEvent } from '@mastra/core/observability';
|
|
5
5
|
import type { ObservabilityRegistryConfig } from './config.js';
|
|
6
6
|
/**
|
|
7
7
|
* Manages observability instances and selects their configurations for Mastra operations.
|
|
@@ -55,8 +55,9 @@ export declare class Observability extends MastraBase implements ObservabilityEn
|
|
|
55
55
|
feedback: FeedbackInput;
|
|
56
56
|
}): Promise<void>;
|
|
57
57
|
replaceFeedback(args: FeedbackReplacementInput): Promise<void>;
|
|
58
|
+
updateFeedbackReviewStatus(args: FeedbackReviewStatusInput): Promise<void>;
|
|
58
59
|
/** @internal Queue an HTTP-created record; flush/shutdown await delivery without holding the HTTP response open. */
|
|
59
|
-
__exportPersistedEvent(event: ScoreEvent | FeedbackEvent | FeedbackReplacementEvent): Promise<void>;
|
|
60
|
+
__exportPersistedEvent(event: ScoreEvent | FeedbackEvent | FeedbackReplacementEvent | FeedbackReviewStatusEvent): Promise<void>;
|
|
60
61
|
/** Register a named observability instance, optionally marking it as default. */
|
|
61
62
|
registerInstance(name: string, instance: ObservabilityInstance, isDefault?: boolean): void;
|
|
62
63
|
/** Get a registered instance by name. */
|
package/dist/default.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../src/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EACV,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,wBAAwB,EACxB,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EAEvB,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,UAAU,EACX,MAAM,4BAA4B,CAAC;AAMpC,OAAO,KAAK,EAA+B,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAmBzF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,aAAc,SAAQ,UAAW,YAAW,uBAAuB;;IAM9E,YAAY,MAAM,EAAE,2BAA2B,EA8I9C;IAED,yFAAyF;IACzF,gBAAgB,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,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,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ/E;IAED,oHAAoH;IAC9G,sBAAsB,CAC1B,KAAK,EAAE,UAAU,GAAG,aAAa,GAAG,wBAAwB,GAAG,yBAAyB,GACvF,OAAO,CAAC,IAAI,CAAC,CAaf;IAED,iFAAiF;IACjF,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,qBAAqB,EAAE,SAAS,UAAQ,GAAG,IAAI,CASvF;IAED,yCAAyC;IACzC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAE3D;IAED,8CAA8C;IAC9C,kBAAkB,IAAI,qBAAqB,GAAG,SAAS,CAEtD;IAED,mDAAmD;IACnD,aAAa,IAAI,WAAW,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAE1D;IAED,gFAAgF;IAChF,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAExC;IAED,mEAAmE;IACnE,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjC;IAED,qEAAqE;IACrE,iBAAiB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAEhD;IAED,8DAA8D;IAC9D,KAAK,IAAI,IAAI,CAEZ;IAED,4DAA4D;IACtD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAG3B;IAED,qEAAqE;IAC/D,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAG9B;IASD;;;;;;;;OAQG;IACH,2BAA2B,IAAI,wBAAwB,GAAG,SAAS,CAQlE;CAiDF"}
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-observability
|
|
|
3
3
|
description: Documentation for @mastra/observability. Use when working with @mastra/observability APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/observability"
|
|
6
|
-
version: "1.24.0-alpha.
|
|
6
|
+
version: "1.24.0-alpha.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -1,251 +1,261 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.24.0-alpha.
|
|
2
|
+
"version": "1.24.0-alpha.6",
|
|
3
3
|
"package": "@mastra/observability",
|
|
4
4
|
"exports": {
|
|
5
5
|
"BaseExporter": {
|
|
6
6
|
"types": "dist/exporters/base.d.ts",
|
|
7
7
|
"implementation": "dist/index.js",
|
|
8
|
-
"line":
|
|
8
|
+
"line": 4294
|
|
9
9
|
},
|
|
10
10
|
"BaseObservabilityEventBus": {
|
|
11
11
|
"types": "dist/bus/base.d.ts",
|
|
12
12
|
"implementation": "dist/index.js",
|
|
13
|
-
"line":
|
|
13
|
+
"line": 102
|
|
14
14
|
},
|
|
15
15
|
"BaseObservabilityInstance": {
|
|
16
16
|
"types": "dist/instances/base.d.ts",
|
|
17
17
|
"implementation": "dist/index.js",
|
|
18
|
-
"line":
|
|
18
|
+
"line": 6232
|
|
19
19
|
},
|
|
20
20
|
"BaseSpan": {
|
|
21
21
|
"types": "dist/spans/base.d.ts",
|
|
22
22
|
"implementation": "dist/index.js",
|
|
23
|
-
"line":
|
|
23
|
+
"line": 3576
|
|
24
24
|
},
|
|
25
25
|
"CardinalityFilter": {
|
|
26
26
|
"types": "dist/metrics/cardinality.d.ts",
|
|
27
27
|
"implementation": "dist/index.js",
|
|
28
|
-
"line":
|
|
28
|
+
"line": 2090
|
|
29
29
|
},
|
|
30
30
|
"CloudExporter": {
|
|
31
31
|
"types": "dist/exporters/cloud.d.ts",
|
|
32
32
|
"implementation": "dist/index.js",
|
|
33
|
-
"line":
|
|
33
|
+
"line": 8652
|
|
34
34
|
},
|
|
35
35
|
"ConsoleExporter": {
|
|
36
36
|
"types": "dist/exporters/console.d.ts",
|
|
37
37
|
"implementation": "dist/index.js",
|
|
38
|
-
"line":
|
|
38
|
+
"line": 8975
|
|
39
39
|
},
|
|
40
40
|
"DEFAULT_DEEP_CLEAN_OPTIONS": {
|
|
41
41
|
"types": "dist/spans/serialization.d.ts",
|
|
42
42
|
"implementation": "dist/index.js",
|
|
43
|
-
"line":
|
|
43
|
+
"line": 205
|
|
44
44
|
},
|
|
45
45
|
"DEFAULT_LIMITS": {
|
|
46
46
|
"types": "dist/client/proxy.d.ts",
|
|
47
47
|
"implementation": "dist/index.js",
|
|
48
|
-
"line":
|
|
48
|
+
"line": 7218
|
|
49
49
|
},
|
|
50
50
|
"DefaultExporter": {
|
|
51
51
|
"types": "dist/exporters/default.d.ts",
|
|
52
52
|
"implementation": "dist/index.js",
|
|
53
|
-
"line":
|
|
53
|
+
"line": 5054
|
|
54
54
|
},
|
|
55
55
|
"DefaultObservabilityInstance": {
|
|
56
56
|
"types": "dist/instances/default.d.ts",
|
|
57
57
|
"implementation": "dist/index.js",
|
|
58
|
-
"line":
|
|
58
|
+
"line": 10903
|
|
59
59
|
},
|
|
60
60
|
"DefaultSpan": {
|
|
61
61
|
"types": "dist/spans/default.d.ts",
|
|
62
62
|
"implementation": "dist/index.js",
|
|
63
|
-
"line":
|
|
63
|
+
"line": 4063
|
|
64
64
|
},
|
|
65
65
|
"JsonExporter": {
|
|
66
66
|
"types": "dist/exporters/test.d.ts",
|
|
67
67
|
"implementation": "dist/index.js",
|
|
68
|
-
"line":
|
|
68
|
+
"line": 10901
|
|
69
69
|
},
|
|
70
70
|
"LoggerContextImpl": {
|
|
71
71
|
"types": "dist/context/logger.d.ts",
|
|
72
72
|
"implementation": "dist/index.js",
|
|
73
|
-
"line":
|
|
73
|
+
"line": 952
|
|
74
74
|
},
|
|
75
75
|
"MastraPlatformExporter": {
|
|
76
76
|
"types": "dist/exporters/mastra-platform.d.ts",
|
|
77
77
|
"implementation": "dist/index.js",
|
|
78
|
-
"line":
|
|
78
|
+
"line": 9305
|
|
79
79
|
},
|
|
80
80
|
"MastraStorageExporter": {
|
|
81
81
|
"types": "dist/exporters/mastra-storage.d.ts",
|
|
82
82
|
"implementation": "dist/index.js",
|
|
83
|
-
"line":
|
|
83
|
+
"line": 5615
|
|
84
84
|
},
|
|
85
85
|
"MetricsContextImpl": {
|
|
86
86
|
"types": "dist/context/metrics.d.ts",
|
|
87
87
|
"implementation": "dist/index.js",
|
|
88
|
-
"line":
|
|
88
|
+
"line": 1016
|
|
89
89
|
},
|
|
90
90
|
"ModelSpanTracker": {
|
|
91
91
|
"types": "dist/model-tracing.d.ts",
|
|
92
92
|
"implementation": "dist/index.js",
|
|
93
|
-
"line":
|
|
93
|
+
"line": 2522
|
|
94
94
|
},
|
|
95
95
|
"NoOpSpan": {
|
|
96
96
|
"types": "dist/spans/no-op.d.ts",
|
|
97
97
|
"implementation": "dist/index.js",
|
|
98
|
-
"line":
|
|
98
|
+
"line": 4237
|
|
99
99
|
},
|
|
100
100
|
"OBSERVABILITY_CAPABILITIES_HEADER": {
|
|
101
101
|
"types": "dist/exporters/mastra-platform.d.ts",
|
|
102
102
|
"implementation": "dist/index.js",
|
|
103
|
-
"line":
|
|
103
|
+
"line": 9206
|
|
104
104
|
},
|
|
105
105
|
"Observability": {
|
|
106
106
|
"types": "dist/default.d.ts",
|
|
107
107
|
"implementation": "dist/index.js",
|
|
108
|
-
"line":
|
|
108
|
+
"line": 11239
|
|
109
109
|
},
|
|
110
110
|
"ObservabilityBus": {
|
|
111
111
|
"types": "dist/bus/observability-bus.d.ts",
|
|
112
112
|
"implementation": "dist/index.js",
|
|
113
|
-
"line":
|
|
113
|
+
"line": 582
|
|
114
114
|
},
|
|
115
115
|
"QUOTA_PAUSE_CAPABILITY": {
|
|
116
116
|
"types": "dist/exporters/mastra-platform.d.ts",
|
|
117
117
|
"implementation": "dist/index.js",
|
|
118
|
-
"line":
|
|
118
|
+
"line": 9207
|
|
119
|
+
},
|
|
120
|
+
"REDACTED_ERROR_MESSAGE": {
|
|
121
|
+
"types": "dist/spans/base.d.ts",
|
|
122
|
+
"implementation": "dist/index.js",
|
|
123
|
+
"line": 3437
|
|
119
124
|
},
|
|
120
125
|
"SamplingStrategyType": {
|
|
121
126
|
"types": "dist/config.d.ts",
|
|
122
127
|
"implementation": "dist/index.js",
|
|
123
|
-
"line":
|
|
128
|
+
"line": 751
|
|
124
129
|
},
|
|
125
130
|
"SensitiveDataFilter": {
|
|
126
131
|
"types": "dist/span_processors/sensitive-data-filter.d.ts",
|
|
127
132
|
"implementation": "dist/index.js",
|
|
128
|
-
"line":
|
|
133
|
+
"line": 11026
|
|
129
134
|
},
|
|
130
135
|
"TestExporter": {
|
|
131
136
|
"types": "dist/exporters/test.d.ts",
|
|
132
137
|
"implementation": "dist/index.js",
|
|
133
|
-
"line":
|
|
138
|
+
"line": 9916
|
|
134
139
|
},
|
|
135
140
|
"TraceData": {
|
|
136
141
|
"types": "dist/exporters/tracking.d.ts",
|
|
137
142
|
"implementation": "dist/index.js",
|
|
138
|
-
"line":
|
|
143
|
+
"line": 7371
|
|
139
144
|
},
|
|
140
145
|
"TrackingExporter": {
|
|
141
146
|
"types": "dist/exporters/tracking.d.ts",
|
|
142
147
|
"implementation": "dist/index.js",
|
|
143
|
-
"line":
|
|
148
|
+
"line": 7700
|
|
144
149
|
},
|
|
145
150
|
"buildExportedLog": {
|
|
146
151
|
"types": "dist/client/otlp.d.ts",
|
|
147
152
|
"implementation": "dist/index.js",
|
|
148
|
-
"line":
|
|
153
|
+
"line": 7135
|
|
149
154
|
},
|
|
150
155
|
"buildExportedSpan": {
|
|
151
156
|
"types": "dist/client/otlp.d.ts",
|
|
152
157
|
"implementation": "dist/index.js",
|
|
153
|
-
"line":
|
|
158
|
+
"line": 7117
|
|
154
159
|
},
|
|
155
160
|
"buildTracingOptions": {
|
|
156
161
|
"types": "dist/tracing-options.d.ts",
|
|
157
162
|
"implementation": "dist/index.js",
|
|
158
|
-
"line":
|
|
163
|
+
"line": 11580
|
|
159
164
|
},
|
|
160
165
|
"chainFormatters": {
|
|
161
166
|
"types": "dist/exporters/span-formatters.d.ts",
|
|
162
167
|
"implementation": "dist/index.js",
|
|
163
|
-
"line":
|
|
168
|
+
"line": 8466
|
|
164
169
|
},
|
|
165
170
|
"createClientObservabilityProxy": {
|
|
166
171
|
"types": "dist/client/proxy.d.ts",
|
|
167
172
|
"implementation": "dist/index.js",
|
|
168
|
-
"line":
|
|
173
|
+
"line": 7352
|
|
169
174
|
},
|
|
170
175
|
"decodeResourceLogs": {
|
|
171
176
|
"types": "dist/client/otlp.d.ts",
|
|
172
177
|
"implementation": "dist/index.js",
|
|
173
|
-
"line":
|
|
178
|
+
"line": 7054
|
|
174
179
|
},
|
|
175
180
|
"decodeResourceSpans": {
|
|
176
181
|
"types": "dist/client/otlp.d.ts",
|
|
177
182
|
"implementation": "dist/index.js",
|
|
178
|
-
"line":
|
|
183
|
+
"line": 7017
|
|
179
184
|
},
|
|
180
185
|
"deepClean": {
|
|
181
186
|
"types": "dist/spans/serialization.d.ts",
|
|
182
187
|
"implementation": "dist/index.js",
|
|
183
|
-
"line":
|
|
188
|
+
"line": 348
|
|
184
189
|
},
|
|
185
190
|
"formatBaggage": {
|
|
186
191
|
"types": "dist/client/w3c.d.ts",
|
|
187
192
|
"implementation": "dist/index.js",
|
|
188
|
-
"line":
|
|
193
|
+
"line": 7208
|
|
189
194
|
},
|
|
190
195
|
"formatTraceparent": {
|
|
191
196
|
"types": "dist/client/w3c.d.ts",
|
|
192
197
|
"implementation": "dist/index.js",
|
|
193
|
-
"line":
|
|
198
|
+
"line": 7171
|
|
194
199
|
},
|
|
195
200
|
"getExternalParentId": {
|
|
196
201
|
"types": "dist/spans/base.d.ts",
|
|
197
202
|
"implementation": "dist/index.js",
|
|
198
|
-
"line":
|
|
203
|
+
"line": 3557
|
|
199
204
|
},
|
|
200
205
|
"isSerializedMap": {
|
|
201
206
|
"types": "dist/spans/serialization.d.ts",
|
|
202
207
|
"implementation": "dist/index.js",
|
|
203
|
-
"line":
|
|
208
|
+
"line": 322
|
|
204
209
|
},
|
|
205
210
|
"mergeSerializationOptions": {
|
|
206
211
|
"types": "dist/spans/serialization.d.ts",
|
|
207
212
|
"implementation": "dist/index.js",
|
|
208
|
-
"line":
|
|
213
|
+
"line": 216
|
|
209
214
|
},
|
|
210
215
|
"observabilityConfigValueSchema": {
|
|
211
216
|
"types": "dist/config.d.ts",
|
|
212
217
|
"implementation": "dist/index.js",
|
|
213
|
-
"line":
|
|
218
|
+
"line": 831
|
|
214
219
|
},
|
|
215
220
|
"observabilityFeatures": {
|
|
216
221
|
"types": "dist/features.d.ts",
|
|
217
222
|
"implementation": "dist/index.js",
|
|
218
|
-
"line":
|
|
223
|
+
"line": 11561
|
|
219
224
|
},
|
|
220
225
|
"observabilityInstanceConfigSchema": {
|
|
221
226
|
"types": "dist/config.d.ts",
|
|
222
227
|
"implementation": "dist/index.js",
|
|
223
|
-
"line":
|
|
228
|
+
"line": 819
|
|
224
229
|
},
|
|
225
230
|
"observabilityRegistryConfigSchema": {
|
|
226
231
|
"types": "dist/config.d.ts",
|
|
227
232
|
"implementation": "dist/index.js",
|
|
228
|
-
"line":
|
|
233
|
+
"line": 851
|
|
229
234
|
},
|
|
230
235
|
"otlpSeverityToLogLevel": {
|
|
231
236
|
"types": "dist/client/otlp.d.ts",
|
|
232
237
|
"implementation": "dist/index.js",
|
|
233
|
-
"line":
|
|
238
|
+
"line": 7091
|
|
234
239
|
},
|
|
235
240
|
"parseBaggage": {
|
|
236
241
|
"types": "dist/client/w3c.d.ts",
|
|
237
242
|
"implementation": "dist/index.js",
|
|
238
|
-
"line":
|
|
243
|
+
"line": 7181
|
|
239
244
|
},
|
|
240
245
|
"parseTraceparent": {
|
|
241
246
|
"types": "dist/client/w3c.d.ts",
|
|
242
247
|
"implementation": "dist/index.js",
|
|
243
|
-
"line":
|
|
248
|
+
"line": 7157
|
|
244
249
|
},
|
|
245
250
|
"reconstructSerializedMap": {
|
|
246
251
|
"types": "dist/spans/serialization.d.ts",
|
|
247
252
|
"implementation": "dist/index.js",
|
|
248
|
-
"line":
|
|
253
|
+
"line": 325
|
|
254
|
+
},
|
|
255
|
+
"redactErrorInfo": {
|
|
256
|
+
"types": "dist/spans/base.d.ts",
|
|
257
|
+
"implementation": "dist/index.js",
|
|
258
|
+
"line": 3443
|
|
249
259
|
},
|
|
250
260
|
"routeToHandler": {
|
|
251
261
|
"types": "dist/bus/route-event.d.ts",
|
|
@@ -255,17 +265,17 @@
|
|
|
255
265
|
"samplingStrategySchema": {
|
|
256
266
|
"types": "dist/config.d.ts",
|
|
257
267
|
"implementation": "dist/index.js",
|
|
258
|
-
"line":
|
|
268
|
+
"line": 762
|
|
259
269
|
},
|
|
260
270
|
"serializationOptionsSchema": {
|
|
261
271
|
"types": "dist/config.d.ts",
|
|
262
272
|
"implementation": "dist/index.js",
|
|
263
|
-
"line":
|
|
273
|
+
"line": 777
|
|
264
274
|
},
|
|
265
275
|
"truncateString": {
|
|
266
276
|
"types": "dist/spans/serialization.d.ts",
|
|
267
277
|
"implementation": "dist/index.js",
|
|
268
|
-
"line":
|
|
278
|
+
"line": 235
|
|
269
279
|
}
|
|
270
280
|
},
|
|
271
281
|
"modules": {}
|
|
@@ -441,6 +441,20 @@ await mastra.observability.replaceFeedback?.({
|
|
|
441
441
|
|
|
442
442
|
Each exporter handles its destination independently. `MastraStorageExporter` resolves local span context when needed, and `MastraPlatformExporter` sends a PUT to Platform. Exporters without a replacement handler skip the event. `flush()` and `shutdown()` wait for pending deliveries.
|
|
443
443
|
|
|
444
|
+
## Updating review status
|
|
445
|
+
|
|
446
|
+
To change review status at configured exporter destinations, pass the feedback ID and either `"reviewed"` or `"needs-review"`:
|
|
447
|
+
|
|
448
|
+
```typescript
|
|
449
|
+
await mastra.observability.updateFeedbackReviewStatus?.({
|
|
450
|
+
feedbackId: 'feedback-123',
|
|
451
|
+
reviewStatus: 'reviewed',
|
|
452
|
+
})
|
|
453
|
+
await mastra.observability.flush()
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
Review updates go to each exporter that supports them, even when the feedback isn't stored locally. Call `flush()` or `shutdown()` to wait for pending deliveries.
|
|
457
|
+
|
|
444
458
|
## HTTP routes
|
|
445
459
|
|
|
446
460
|
These routes belong to a Mastra runtime and use its configured observability storage. They're separate from the [unversioned Mastra Platform Feedback API](https://mastra.ai/docs/mastra-platform/api), which doesn't provide a feedback creation route.
|
|
@@ -9,7 +9,7 @@ Sends Tracing data to Langfuse for observability.
|
|
|
9
9
|
## Constructor
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
new LangfuseExporter(config
|
|
12
|
+
new LangfuseExporter(config?: LangfuseExporterConfig)
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## `LangfuseExporterConfig`
|
|
@@ -25,6 +25,7 @@ interface LangfuseExporterConfig extends BaseExporterConfig {
|
|
|
25
25
|
flushInterval?: number
|
|
26
26
|
environment?: string
|
|
27
27
|
release?: string
|
|
28
|
+
resourceAttributes?: DetectedResourceAttributes
|
|
28
29
|
}
|
|
29
30
|
```
|
|
30
31
|
|
|
@@ -33,6 +34,28 @@ Extends `BaseExporterConfig`, which includes:
|
|
|
33
34
|
- `logger?: IMastraLogger` - Logger instance
|
|
34
35
|
- `logLevel?: LogLevel | 'debug' | 'info' | 'warn' | 'error'` - Log level (default: INFO)
|
|
35
36
|
|
|
37
|
+
**publicKey** (`string`): Langfuse API key. Falls back to LANGFUSE_PUBLIC_KEY env var.
|
|
38
|
+
|
|
39
|
+
**secretKey** (`string`): Langfuse secret key. Falls back to LANGFUSE_SECRET_KEY env var.
|
|
40
|
+
|
|
41
|
+
**baseUrl** (`string`): Langfuse host URL. Falls back to LANGFUSE_BASE_URL env var. Default: https\://cloud.langfuse.com
|
|
42
|
+
|
|
43
|
+
**additionalHeaders** (`Record<string, string>`): Additional headers sent with requests to Langfuse.
|
|
44
|
+
|
|
45
|
+
**realtime** (`boolean`): Enable realtime mode - exports spans immediately instead of batching
|
|
46
|
+
|
|
47
|
+
**flushAt** (`number`): Maximum number of spans per OTEL export batch. Forwarded to the underlying LangfuseSpanProcessor.
|
|
48
|
+
|
|
49
|
+
**flushInterval** (`number`): Maximum time in seconds before pending spans are exported. Forwarded to the underlying LangfuseSpanProcessor.
|
|
50
|
+
|
|
51
|
+
**environment** (`string`): Environment tag for traces (e.g. production, staging). Shows in Langfuse UI for filtering.
|
|
52
|
+
|
|
53
|
+
**release** (`string`): Release tag for traces (e.g. git commit hash). Used for version tracking.
|
|
54
|
+
|
|
55
|
+
**resourceAttributes** (`DetectedResourceAttributes`): OpenTelemetry resource attributes, such as service.version. Values here override the defaults.
|
|
56
|
+
|
|
57
|
+
**logLevel** (`'debug' | 'info' | 'warn' | 'error'`): Level for the logger the exporter creates when no logger is passed (default: 'info'). It has no effect on a supplied logger. When the exporter is registered with Mastra, Mastra replaces this logger with the application logger.
|
|
58
|
+
|
|
36
59
|
## Properties
|
|
37
60
|
|
|
38
61
|
### `client`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TracingEvent, InitExporterOptions, MetricEvent, LogEvent, ScoreEvent, FeedbackEvent, FeedbackReplacementEvent } from '@mastra/core/observability';
|
|
1
|
+
import type { TracingEvent, InitExporterOptions, MetricEvent, LogEvent, ScoreEvent, FeedbackEvent, FeedbackReplacementEvent, FeedbackReviewStatusEvent } from '@mastra/core/observability';
|
|
2
2
|
import type { TracingStorageStrategy } from '@mastra/core/storage';
|
|
3
3
|
import type { BaseExporterConfig } from './base.js';
|
|
4
4
|
import { BaseExporter } from './base.js';
|
|
@@ -94,6 +94,7 @@ export declare class DefaultExporter extends BaseExporter {
|
|
|
94
94
|
*/
|
|
95
95
|
onLogEvent(event: LogEvent): Promise<void>;
|
|
96
96
|
onScoreEvent(event: ScoreEvent): Promise<void>;
|
|
97
|
+
onFeedbackReviewStatusEvent(event: FeedbackReviewStatusEvent): Promise<void>;
|
|
97
98
|
onFeedbackReplacementEvent(event: FeedbackReplacementEvent): Promise<void>;
|
|
98
99
|
onFeedbackEvent(event: FeedbackEvent): Promise<void>;
|
|
99
100
|
private enqueueAnnotation;
|
|
@@ -104,6 +105,7 @@ export declare class DefaultExporter extends BaseExporter {
|
|
|
104
105
|
* are exported before the runtime instance is terminated.
|
|
105
106
|
*/
|
|
106
107
|
flush(): Promise<void>;
|
|
108
|
+
private flushBufferedEvents;
|
|
107
109
|
shutdown(): Promise<void>;
|
|
108
110
|
}
|
|
109
111
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/exporters/default.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,aAAa,EACb,wBAAwB,
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/exporters/default.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EAI1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAwB,sBAAsB,EAAwB,MAAM,sBAAsB,CAAC;AAS/G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAMtC;;;;;;GAMG;AACH,UAAU,qBAAsB,SAAQ,kBAAkB;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,QAAQ,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAAC;CAC5C;AAsCD;;;;;;;;GAQG;AACH,qBAAa,eAAgB,SAAQ,YAAY;;IAC/C,IAAI,SAA2C;IAoB/C,YAAY,MAAM,GAAE,qBAA0B,EAe7C;IAED;;OAEG;IACG,IAAI,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI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er. */
|
|
15
15
|
export type BufferableEvent = Exclude<ObservabilityEvent, {
|
|
16
|
-
type: 'feedback_replacement';
|
|
16
|
+
type: 'feedback_replacement' | 'feedback_review_status';
|
|
17
17
|
}>;
|
|
18
18
|
export type BufferedEvent = BufferableEvent & RetryCount;
|
|
19
19
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-buffer.d.ts","sourceRoot":"","sources":["../../src/exporters/event-buffer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,oFAAoF;AACpF,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,+DAA+D;AAC/D,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACpC;AAED,2EAA2E;AAC3E,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,kBAAkB,EAAE;IAAE,IAAI,EAAE,sBAAsB,CAAA;CAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"event-buffer.d.ts","sourceRoot":"","sources":["../../src/exporters/event-buffer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,oFAAoF;AACpF,MAAM,WAAW,UAAU;IACzB,UAAU,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AED,0CAA0C;IAC1C,IAAI,OAAO,IAAI,aAAa,EAAE,CAE7B;IAED,2DAA2D;IAC3D,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,4EAA4E;IAC5E,IAAI,OAAO,IAAI,MAAM,CAKpB;IAED;;OAEG;IACH,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,eAAe;IAIvB,6FAA6F;IAC7F,eAAe,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,gBAAgB,EAAE,CAAA;KAAE,GAAG,IAAI,CAc3D;IAED,6FAA6F;IAC7F,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,CAMlD;IAED,gFAAgF;IAChF,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAEzC;IAED,sGAAsG;IACtG,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAE/C;IAED,uFAAuF;IACvF,gBAAgB,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,iBAAiB,EAAE,CAAA;KAAE,GAAG,IAAI,CAU7D;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyed-queue.d.ts","sourceRoot":"","sources":["../../src/exporters/keyed-queue.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;IAE5D,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAU9D;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TracingEvent, LogEvent, MetricEvent, ScoreEvent, FeedbackEvent, FeedbackReplacementEvent } from '@mastra/core/observability';
|
|
1
|
+
import type { TracingEvent, LogEvent, MetricEvent, ScoreEvent, FeedbackEvent, FeedbackReplacementEvent, FeedbackReviewStatusEvent } from '@mastra/core/observability';
|
|
2
2
|
import { BaseExporter } from './base.js';
|
|
3
3
|
import type { BaseExporterConfig } from './base.js';
|
|
4
4
|
import type { PlatformByteBatchingConfig, PlatformByteBatchingStats } from './platform-byte-batcher.js';
|
|
@@ -38,6 +38,7 @@ export declare class MastraPlatformExporter extends BaseExporter {
|
|
|
38
38
|
private flushTimer;
|
|
39
39
|
private inFlightFlushes;
|
|
40
40
|
private pendingRecords;
|
|
41
|
+
private readonly feedbackUpdates;
|
|
41
42
|
private quotaPaused;
|
|
42
43
|
private quotaProbeTimer;
|
|
43
44
|
private quotaProbeIntervalSeconds;
|
|
@@ -51,7 +52,9 @@ export declare class MastraPlatformExporter extends BaseExporter {
|
|
|
51
52
|
onScoreEvent(event: ScoreEvent): Promise<void>;
|
|
52
53
|
onFeedbackEvent(event: FeedbackEvent): Promise<void>;
|
|
53
54
|
onFeedbackReplacementEvent(event: FeedbackReplacementEvent): void;
|
|
55
|
+
onFeedbackReviewStatusEvent(event: FeedbackReviewStatusEvent): void;
|
|
54
56
|
private enqueueResolvedRecord;
|
|
57
|
+
private enqueueInteractiveWrite;
|
|
55
58
|
private addToBuffer;
|
|
56
59
|
private addLogToBuffer;
|
|
57
60
|
private addMetricToBuffer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mastra-platform.d.ts","sourceRoot":"","sources":["../../src/exporters/mastra-platform.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EAEZ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,EACb,wBAAwB,
|
|
1
|
+
{"version":3,"file":"mastra-platform.d.ts","sourceRoot":"","sources":["../../src/exporters/mastra-platform.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EAEZ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,E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B;IAkB1B;;;;;OAKG;YACW,gBAAgB;IAoD9B,gFAAgF;IAChF,oBAAoB,IAAI,yBAAyB,GAAG,SAAS,CAE5D;YAEa,cAAc;YAuBd,gBAAgB;IAmC9B,OAAO,CAAC,WAAW;IAUnB;;;;OAIG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAW3B;YAEa,YAAY;IAgCpB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAqC9B;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TracingEvent, InitExporterOptions, MetricEvent, LogEvent, ScoreEvent, FeedbackEvent, FeedbackReplacementEvent } from '@mastra/core/observability';
|
|
1
|
+
import type { TracingEvent, InitExporterOptions, MetricEvent, LogEvent, ScoreEvent, FeedbackEvent, FeedbackReplacementEvent, FeedbackReviewStatusEvent } from '@mastra/core/observability';
|
|
2
2
|
import type { TracingStorageStrategy } from '@mastra/core/storage';
|
|
3
3
|
import type { BaseExporterConfig } from './base.js';
|
|
4
4
|
import { BaseExporter } from './base.js';
|
|
@@ -97,6 +97,7 @@ export declare class MastraStorageExporter extends BaseExporter {
|
|
|
97
97
|
*/
|
|
98
98
|
onLogEvent(event: LogEvent): Promise<void>;
|
|
99
99
|
onScoreEvent(event: ScoreEvent): Promise<void>;
|
|
100
|
+
onFeedbackReviewStatusEvent(event: FeedbackReviewStatusEvent): Promise<void>;
|
|
100
101
|
onFeedbackReplacementEvent(event: FeedbackReplacementEvent): Promise<void>;
|
|
101
102
|
onFeedbackEvent(event: FeedbackEvent): Promise<void>;
|
|
102
103
|
private enqueueAnnotation;
|
|
@@ -107,6 +108,7 @@ export declare class MastraStorageExporter extends BaseExporter {
|
|
|
107
108
|
* are exported before the runtime instance is terminated.
|
|
108
109
|
*/
|
|
109
110
|
flush(): Promise<void>;
|
|
111
|
+
private flushBufferedEvents;
|
|
110
112
|
shutdown(): Promise<void>;
|
|
111
113
|
}
|
|
112
114
|
//# sourceMappingURL=mastra-storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mastra-storage.d.ts","sourceRoot":"","sources":["../../src/exporters/mastra-storage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,aAAa,EACb,wBAAwB,
|
|
1
|
+
{"version":3,"file":"mastra-storage.d.ts","sourceRoot":"","sources":["../../src/exporters/mastra-storage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EAI1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAwB,sBAAsB,EAAwB,MAAM,sBAAsB,CAAC;AAS/G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAOtC,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElG,YAAY,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElG,4FAA4F;AAC5F,MAAM,WAAW,2BAA4B,SAAQ,kBAAkB;IACrE,YAAY,CAAC,EAAE,yBAAyB,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,QAAQ,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAAC;CAC5C;AAoCD;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,YAAY;;IACrD,IAAI,SAA6B;IAwBjC,YAAY,MAAM,GAAE,2BAAgC,EAqBnD;IAED;;OAEG;I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I,CAAC,CAG3B;YAEa,mBAAmB;IA4C3B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CA6B9B;CACF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Deliver one feedback or score record whose span context must be resolved by Platform. */
|
|
2
|
-
export declare function publishResolvedRecord(url: URL, body: string, headers: Record<string, string>, method?: 'POST' | 'PUT'): Promise<void>;
|
|
2
|
+
export declare function publishResolvedRecord(url: URL, body: string, headers: Record<string, string>, method?: 'POST' | 'PUT' | 'PATCH'): Promise<void>;
|
|
3
3
|
//# sourceMappingURL=platform-resolved-record.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-resolved-record.d.ts","sourceRoot":"","sources":["../../src/exporters/platform-resolved-record.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,MAAM,GAAE,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"platform-resolved-record.d.ts","sourceRoot":"","sources":["../../src/exporters/platform-resolved-record.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,MAAM,GAAE,MAAM,GAAG,KAAK,GAAG,OAAgB,GACxC,OAAO,CAAC,IAAI,CAAC,CA8Cf"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMastraLogger } from '@mastra/core/logger';
|
|
2
|
+
import type { FeedbackEvent, FeedbackReplacementEvent, FeedbackReviewStatusInput, ScoreEvent } from '@mastra/core/observability';
|
|
2
3
|
import type { ObservabilityStorage } from '@mastra/core/storage';
|
|
4
|
+
/** Older stores may inherit a method that throws instead of omitting the hook. */
|
|
5
|
+
export declare function updateStorageFeedbackReviewStatus(storage: ObservabilityStorage, feedback: FeedbackReviewStatusInput, logger: IMastraLogger): Promise<void>;
|
|
3
6
|
/**
|
|
4
7
|
* Resolve attached-storage context within a bounded retry window, including failed reads.
|
|
5
8
|
* Exhaustion returns null for missing anchors or throws the last read error for the exporter to report.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-annotation.d.ts","sourceRoot":"","sources":["../../src/exporters/storage-annotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"storage-annotation.d.ts","sourceRoot":"","sources":["../../src/exporters/storage-annotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,UAAU,EACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAMjE,kFAAkF;AAClF,wBAAsB,iCAAiC,CACrD,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,yBAAyB,EACnC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,IAAI,CAAC,CAgBf;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,UAAU,GAAG,aAAa,GAAG,wBAAwB,EAC5D,OAAO,EAAE,oBAAoB,EAC7B,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAC9B,OAAO,CAAC,UAAU,GAAG,aAAa,GAAG,wBAAwB,GAAG,IAAI,CAAC,CAuBvE"}
|