@mastra/observability 1.17.9-alpha.0 → 1.17.9-alpha.1
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/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/instances/base.d.ts.map +1 -1
- package/dist/metrics/pricing-data.jsonl +3950 -1836
- package/dist/span_processors/sensitive-data-filter.d.ts +2 -1
- package/dist/span_processors/sensitive-data-filter.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -5013,7 +5013,12 @@ var BaseObservabilityInstance = class extends _mastra_core_base.MastraBase {
|
|
|
5013
5013
|
for (const processor of this.spanOutputProcessors) {
|
|
5014
5014
|
if (!span) break;
|
|
5015
5015
|
try {
|
|
5016
|
-
|
|
5016
|
+
const processed = processor.process(span);
|
|
5017
|
+
if (processed !== void 0 && processed !== span) {
|
|
5018
|
+
this.logger.error(`[Observability] Processor error [name=${processor.name}]: process() must return the span it received (or undefined to drop it), not a copy. Span dropped.`);
|
|
5019
|
+
return;
|
|
5020
|
+
}
|
|
5021
|
+
span = processed;
|
|
5017
5022
|
} catch (error) {
|
|
5018
5023
|
this.logger.error(`[Observability] Processor error [name=${processor.name}]`, error);
|
|
5019
5024
|
}
|
|
@@ -9313,9 +9318,10 @@ var SensitiveDataFilter = class {
|
|
|
9313
9318
|
/**
|
|
9314
9319
|
* Process a span by filtering sensitive data across its key fields.
|
|
9315
9320
|
* Fields processed: attributes, metadata, input, output, errorInfo, requestContext.
|
|
9321
|
+
* The span is mutated in place, as the SpanOutputProcessor contract requires.
|
|
9316
9322
|
*
|
|
9317
9323
|
* @param span - The input span to filter
|
|
9318
|
-
* @returns
|
|
9324
|
+
* @returns The same span instance with sensitive values redacted
|
|
9319
9325
|
*/
|
|
9320
9326
|
process(span) {
|
|
9321
9327
|
const indexedState = this.redactionStyle === "indexed" ? this.getTraceState(span.traceId) : void 0;
|