@mastra/otel-exporter 0.0.0-refactor-agent-information-for-recomposable-ui-20251112151814 → 0.0.0-safe-stringify-telemetry-20251205024938
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 +50 -84
- package/README.md +10 -10
- package/dist/{tracing.d.ts → ai-tracing.d.ts} +6 -6
- package/dist/ai-tracing.d.ts.map +1 -0
- package/dist/index.cjs +106 -107
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +105 -106
- package/dist/index.js.map +1 -1
- package/dist/mastra-span.d.ts +2 -2
- package/dist/mastra-span.d.ts.map +1 -1
- package/dist/span-converter.d.ts +5 -5
- package/dist/span-converter.d.ts.map +1 -1
- package/dist/types.d.ts +2 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +12 -9
- package/dist/tracing.d.ts.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var observability = require('@mastra/observability');
|
|
3
|
+
var aiTracing = require('@mastra/core/ai-tracing');
|
|
5
4
|
var api = require('@opentelemetry/api');
|
|
6
5
|
var resources = require('@opentelemetry/resources');
|
|
7
6
|
var sdkTraceBase = require('@opentelemetry/sdk-trace-base');
|
|
8
7
|
var semanticConventions = require('@opentelemetry/semantic-conventions');
|
|
9
8
|
|
|
10
|
-
// src/tracing.ts
|
|
9
|
+
// src/ai-tracing.ts
|
|
11
10
|
|
|
12
11
|
// src/loadExporter.ts
|
|
13
12
|
var OTLPHttpExporter;
|
|
@@ -225,45 +224,45 @@ var MastraReadableSpan = class {
|
|
|
225
224
|
droppedAttributesCount = 0;
|
|
226
225
|
droppedEventsCount = 0;
|
|
227
226
|
droppedLinksCount = 0;
|
|
228
|
-
constructor(
|
|
229
|
-
this.name =
|
|
227
|
+
constructor(aiSpan, attributes, kind, parentSpanId, resource, instrumentationLibrary) {
|
|
228
|
+
this.name = aiSpan.name;
|
|
230
229
|
this.kind = kind;
|
|
231
230
|
this.attributes = attributes;
|
|
232
231
|
this.parentSpanId = parentSpanId;
|
|
233
232
|
this.links = [];
|
|
234
233
|
this.events = [];
|
|
235
|
-
this.startTime = this.dateToHrTime(
|
|
236
|
-
this.endTime =
|
|
237
|
-
this.ended = !!
|
|
238
|
-
if (
|
|
239
|
-
const durationMs =
|
|
234
|
+
this.startTime = this.dateToHrTime(aiSpan.startTime);
|
|
235
|
+
this.endTime = aiSpan.endTime ? this.dateToHrTime(aiSpan.endTime) : this.startTime;
|
|
236
|
+
this.ended = !!aiSpan.endTime;
|
|
237
|
+
if (aiSpan.endTime) {
|
|
238
|
+
const durationMs = aiSpan.endTime.getTime() - aiSpan.startTime.getTime();
|
|
240
239
|
this.duration = [Math.floor(durationMs / 1e3), durationMs % 1e3 * 1e6];
|
|
241
240
|
} else {
|
|
242
241
|
this.duration = [0, 0];
|
|
243
242
|
}
|
|
244
|
-
if (
|
|
243
|
+
if (aiSpan.errorInfo) {
|
|
245
244
|
this.status = {
|
|
246
245
|
code: api.SpanStatusCode.ERROR,
|
|
247
|
-
message:
|
|
246
|
+
message: aiSpan.errorInfo.message
|
|
248
247
|
};
|
|
249
248
|
this.events.push({
|
|
250
249
|
name: "exception",
|
|
251
250
|
attributes: {
|
|
252
|
-
"exception.message":
|
|
251
|
+
"exception.message": aiSpan.errorInfo.message,
|
|
253
252
|
"exception.type": "Error",
|
|
254
|
-
...
|
|
255
|
-
"exception.stacktrace":
|
|
253
|
+
...aiSpan.errorInfo.details?.stack && {
|
|
254
|
+
"exception.stacktrace": aiSpan.errorInfo.details.stack
|
|
256
255
|
}
|
|
257
256
|
},
|
|
258
257
|
time: this.startTime,
|
|
259
258
|
droppedAttributesCount: 0
|
|
260
259
|
});
|
|
261
|
-
} else if (
|
|
260
|
+
} else if (aiSpan.endTime) {
|
|
262
261
|
this.status = { code: api.SpanStatusCode.OK };
|
|
263
262
|
} else {
|
|
264
263
|
this.status = { code: api.SpanStatusCode.UNSET };
|
|
265
264
|
}
|
|
266
|
-
if (
|
|
265
|
+
if (aiSpan.isEvent) {
|
|
267
266
|
this.events.push({
|
|
268
267
|
name: "instant_event",
|
|
269
268
|
attributes: {},
|
|
@@ -272,14 +271,14 @@ var MastraReadableSpan = class {
|
|
|
272
271
|
});
|
|
273
272
|
}
|
|
274
273
|
this.spanContext = () => ({
|
|
275
|
-
traceId:
|
|
276
|
-
spanId:
|
|
274
|
+
traceId: aiSpan.traceId,
|
|
275
|
+
spanId: aiSpan.id,
|
|
277
276
|
traceFlags: api.TraceFlags.SAMPLED,
|
|
278
277
|
isRemote: false
|
|
279
278
|
});
|
|
280
279
|
if (parentSpanId) {
|
|
281
280
|
this.parentSpanContext = {
|
|
282
|
-
traceId:
|
|
281
|
+
traceId: aiSpan.traceId,
|
|
283
282
|
spanId: parentSpanId,
|
|
284
283
|
traceFlags: api.TraceFlags.SAMPLED,
|
|
285
284
|
isRemote: false
|
|
@@ -306,13 +305,13 @@ var MastraReadableSpan = class {
|
|
|
306
305
|
// src/span-converter.ts
|
|
307
306
|
var SPAN_KIND_MAPPING = {
|
|
308
307
|
// Model operations are CLIENT spans (calling external AI services)
|
|
309
|
-
[
|
|
310
|
-
[
|
|
308
|
+
[aiTracing.AISpanType.MODEL_GENERATION]: api.SpanKind.CLIENT,
|
|
309
|
+
[aiTracing.AISpanType.MODEL_CHUNK]: api.SpanKind.CLIENT,
|
|
311
310
|
// MCP tool calls are CLIENT (external service calls)
|
|
312
|
-
[
|
|
311
|
+
[aiTracing.AISpanType.MCP_TOOL_CALL]: api.SpanKind.CLIENT,
|
|
313
312
|
// Root spans for agent/workflow are SERVER (entry points)
|
|
314
|
-
[
|
|
315
|
-
[
|
|
313
|
+
[aiTracing.AISpanType.AGENT_RUN]: api.SpanKind.SERVER,
|
|
314
|
+
[aiTracing.AISpanType.WORKFLOW_RUN]: api.SpanKind.SERVER
|
|
316
315
|
};
|
|
317
316
|
var SpanConverter = class {
|
|
318
317
|
resource;
|
|
@@ -325,19 +324,19 @@ var SpanConverter = class {
|
|
|
325
324
|
};
|
|
326
325
|
}
|
|
327
326
|
/**
|
|
328
|
-
* Convert a Mastra
|
|
327
|
+
* Convert a Mastra AI span to an OpenTelemetry ReadableSpan
|
|
329
328
|
* This preserves Mastra's trace and span IDs
|
|
330
329
|
*/
|
|
331
|
-
convertSpan(
|
|
332
|
-
const spanKind = this.getSpanKind(
|
|
333
|
-
const attributes = this.buildAttributes(
|
|
334
|
-
const spanName = this.buildSpanName(
|
|
335
|
-
const otelSpan = { ...
|
|
330
|
+
convertSpan(aiSpan) {
|
|
331
|
+
const spanKind = this.getSpanKind(aiSpan);
|
|
332
|
+
const attributes = this.buildAttributes(aiSpan);
|
|
333
|
+
const spanName = this.buildSpanName(aiSpan);
|
|
334
|
+
const otelSpan = { ...aiSpan, name: spanName };
|
|
336
335
|
return new MastraReadableSpan(
|
|
337
336
|
otelSpan,
|
|
338
337
|
attributes,
|
|
339
338
|
spanKind,
|
|
340
|
-
|
|
339
|
+
aiSpan.parentSpanId,
|
|
341
340
|
// Use the parentSpanId from the Mastra span directly
|
|
342
341
|
this.resource,
|
|
343
342
|
this.instrumentationLibrary
|
|
@@ -346,81 +345,81 @@ var SpanConverter = class {
|
|
|
346
345
|
/**
|
|
347
346
|
* Get the appropriate SpanKind based on span type and context
|
|
348
347
|
*/
|
|
349
|
-
getSpanKind(
|
|
350
|
-
if (
|
|
351
|
-
if (
|
|
348
|
+
getSpanKind(aiSpan) {
|
|
349
|
+
if (aiSpan.isRootSpan) {
|
|
350
|
+
if (aiSpan.type === aiTracing.AISpanType.AGENT_RUN || aiSpan.type === aiTracing.AISpanType.WORKFLOW_RUN) {
|
|
352
351
|
return api.SpanKind.SERVER;
|
|
353
352
|
}
|
|
354
353
|
}
|
|
355
|
-
return SPAN_KIND_MAPPING[
|
|
354
|
+
return SPAN_KIND_MAPPING[aiSpan.type] || api.SpanKind.INTERNAL;
|
|
356
355
|
}
|
|
357
356
|
/**
|
|
358
357
|
* Build OTEL-compliant span name based on span type and attributes
|
|
359
358
|
*/
|
|
360
|
-
buildSpanName(
|
|
361
|
-
switch (
|
|
362
|
-
case
|
|
363
|
-
const attrs =
|
|
359
|
+
buildSpanName(aiSpan) {
|
|
360
|
+
switch (aiSpan.type) {
|
|
361
|
+
case aiTracing.AISpanType.MODEL_GENERATION: {
|
|
362
|
+
const attrs = aiSpan.attributes;
|
|
364
363
|
const operation = attrs?.resultType === "tool_selection" ? "tool_selection" : "chat";
|
|
365
364
|
const model = attrs?.model || "unknown";
|
|
366
365
|
return `${operation} ${model}`;
|
|
367
366
|
}
|
|
368
|
-
case
|
|
369
|
-
case
|
|
370
|
-
const toolAttrs =
|
|
367
|
+
case aiTracing.AISpanType.TOOL_CALL:
|
|
368
|
+
case aiTracing.AISpanType.MCP_TOOL_CALL: {
|
|
369
|
+
const toolAttrs = aiSpan.attributes;
|
|
371
370
|
const toolName = toolAttrs?.toolId || "unknown";
|
|
372
371
|
return `tool.execute ${toolName}`;
|
|
373
372
|
}
|
|
374
|
-
case
|
|
375
|
-
const agentAttrs =
|
|
373
|
+
case aiTracing.AISpanType.AGENT_RUN: {
|
|
374
|
+
const agentAttrs = aiSpan.attributes;
|
|
376
375
|
const agentId = agentAttrs?.agentId || "unknown";
|
|
377
376
|
return `agent.${agentId}`;
|
|
378
377
|
}
|
|
379
|
-
case
|
|
380
|
-
const workflowAttrs =
|
|
378
|
+
case aiTracing.AISpanType.WORKFLOW_RUN: {
|
|
379
|
+
const workflowAttrs = aiSpan.attributes;
|
|
381
380
|
const workflowId = workflowAttrs?.workflowId || "unknown";
|
|
382
381
|
return `workflow.${workflowId}`;
|
|
383
382
|
}
|
|
384
|
-
case
|
|
385
|
-
return
|
|
383
|
+
case aiTracing.AISpanType.WORKFLOW_STEP:
|
|
384
|
+
return aiSpan.name;
|
|
386
385
|
default:
|
|
387
|
-
return
|
|
386
|
+
return aiSpan.name;
|
|
388
387
|
}
|
|
389
388
|
}
|
|
390
389
|
/**
|
|
391
|
-
* Build OpenTelemetry attributes from Mastra
|
|
390
|
+
* Build OpenTelemetry attributes from Mastra AI span
|
|
392
391
|
* Following OTEL Semantic Conventions for GenAI
|
|
393
392
|
*/
|
|
394
|
-
buildAttributes(
|
|
393
|
+
buildAttributes(aiSpan) {
|
|
395
394
|
const attributes = {};
|
|
396
|
-
attributes["gen_ai.operation.name"] = this.getOperationName(
|
|
397
|
-
attributes["span.kind"] = this.getSpanKindString(
|
|
398
|
-
attributes["mastra.span.type"] =
|
|
399
|
-
attributes["mastra.trace_id"] =
|
|
400
|
-
attributes["mastra.span_id"] =
|
|
401
|
-
if (
|
|
402
|
-
attributes["mastra.parent_span_id"] =
|
|
395
|
+
attributes["gen_ai.operation.name"] = this.getOperationName(aiSpan);
|
|
396
|
+
attributes["span.kind"] = this.getSpanKindString(aiSpan);
|
|
397
|
+
attributes["mastra.span.type"] = aiSpan.type;
|
|
398
|
+
attributes["mastra.trace_id"] = aiSpan.traceId;
|
|
399
|
+
attributes["mastra.span_id"] = aiSpan.id;
|
|
400
|
+
if (aiSpan.parentSpanId) {
|
|
401
|
+
attributes["mastra.parent_span_id"] = aiSpan.parentSpanId;
|
|
403
402
|
}
|
|
404
|
-
if (
|
|
405
|
-
const inputStr = typeof
|
|
403
|
+
if (aiSpan.input !== void 0) {
|
|
404
|
+
const inputStr = typeof aiSpan.input === "string" ? aiSpan.input : JSON.stringify(aiSpan.input);
|
|
406
405
|
attributes["input"] = inputStr;
|
|
407
|
-
if (
|
|
406
|
+
if (aiSpan.type === aiTracing.AISpanType.MODEL_GENERATION) {
|
|
408
407
|
attributes["gen_ai.prompt"] = inputStr;
|
|
409
|
-
} else if (
|
|
408
|
+
} else if (aiSpan.type === aiTracing.AISpanType.TOOL_CALL || aiSpan.type === aiTracing.AISpanType.MCP_TOOL_CALL) {
|
|
410
409
|
attributes["gen_ai.tool.input"] = inputStr;
|
|
411
410
|
}
|
|
412
411
|
}
|
|
413
|
-
if (
|
|
414
|
-
const outputStr = typeof
|
|
412
|
+
if (aiSpan.output !== void 0) {
|
|
413
|
+
const outputStr = typeof aiSpan.output === "string" ? aiSpan.output : JSON.stringify(aiSpan.output);
|
|
415
414
|
attributes["output"] = outputStr;
|
|
416
|
-
if (
|
|
415
|
+
if (aiSpan.type === aiTracing.AISpanType.MODEL_GENERATION) {
|
|
417
416
|
attributes["gen_ai.completion"] = outputStr;
|
|
418
|
-
} else if (
|
|
417
|
+
} else if (aiSpan.type === aiTracing.AISpanType.TOOL_CALL || aiSpan.type === aiTracing.AISpanType.MCP_TOOL_CALL) {
|
|
419
418
|
attributes["gen_ai.tool.output"] = outputStr;
|
|
420
419
|
}
|
|
421
420
|
}
|
|
422
|
-
if (
|
|
423
|
-
const modelAttrs =
|
|
421
|
+
if (aiSpan.type === aiTracing.AISpanType.MODEL_GENERATION && aiSpan.attributes) {
|
|
422
|
+
const modelAttrs = aiSpan.attributes;
|
|
424
423
|
if (modelAttrs.model) {
|
|
425
424
|
attributes["gen_ai.request.model"] = modelAttrs.model;
|
|
426
425
|
}
|
|
@@ -473,12 +472,12 @@ var SpanConverter = class {
|
|
|
473
472
|
attributes["gen_ai.response.finish_reasons"] = modelAttrs.finishReason;
|
|
474
473
|
}
|
|
475
474
|
}
|
|
476
|
-
if ((
|
|
477
|
-
const toolAttrs =
|
|
475
|
+
if ((aiSpan.type === aiTracing.AISpanType.TOOL_CALL || aiSpan.type === aiTracing.AISpanType.MCP_TOOL_CALL) && aiSpan.attributes) {
|
|
476
|
+
const toolAttrs = aiSpan.attributes;
|
|
478
477
|
if (toolAttrs.toolId) {
|
|
479
478
|
attributes["gen_ai.tool.name"] = toolAttrs.toolId;
|
|
480
479
|
}
|
|
481
|
-
if (
|
|
480
|
+
if (aiSpan.type === aiTracing.AISpanType.MCP_TOOL_CALL) {
|
|
482
481
|
const mcpAttrs = toolAttrs;
|
|
483
482
|
if (mcpAttrs.mcpServer) {
|
|
484
483
|
attributes["mcp.server"] = mcpAttrs.mcpServer;
|
|
@@ -495,8 +494,8 @@ var SpanConverter = class {
|
|
|
495
494
|
attributes["gen_ai.tool.success"] = toolAttrs.success;
|
|
496
495
|
}
|
|
497
496
|
}
|
|
498
|
-
if (
|
|
499
|
-
const agentAttrs =
|
|
497
|
+
if (aiSpan.type === aiTracing.AISpanType.AGENT_RUN && aiSpan.attributes) {
|
|
498
|
+
const agentAttrs = aiSpan.attributes;
|
|
500
499
|
if (agentAttrs.agentId) {
|
|
501
500
|
attributes["agent.id"] = agentAttrs.agentId;
|
|
502
501
|
attributes["gen_ai.agent.id"] = agentAttrs.agentId;
|
|
@@ -508,8 +507,8 @@ var SpanConverter = class {
|
|
|
508
507
|
attributes["agent.available_tools"] = JSON.stringify(agentAttrs.availableTools);
|
|
509
508
|
}
|
|
510
509
|
}
|
|
511
|
-
if (
|
|
512
|
-
const workflowAttrs =
|
|
510
|
+
if (aiSpan.type === aiTracing.AISpanType.WORKFLOW_RUN && aiSpan.attributes) {
|
|
511
|
+
const workflowAttrs = aiSpan.attributes;
|
|
513
512
|
if (workflowAttrs.workflowId) {
|
|
514
513
|
attributes["workflow.id"] = workflowAttrs.workflowId;
|
|
515
514
|
}
|
|
@@ -517,19 +516,19 @@ var SpanConverter = class {
|
|
|
517
516
|
attributes["workflow.status"] = workflowAttrs.status;
|
|
518
517
|
}
|
|
519
518
|
}
|
|
520
|
-
if (
|
|
519
|
+
if (aiSpan.errorInfo) {
|
|
521
520
|
attributes["error"] = true;
|
|
522
|
-
attributes["error.type"] =
|
|
523
|
-
attributes["error.message"] =
|
|
524
|
-
if (
|
|
525
|
-
attributes["error.domain"] =
|
|
521
|
+
attributes["error.type"] = aiSpan.errorInfo.id || "unknown";
|
|
522
|
+
attributes["error.message"] = aiSpan.errorInfo.message;
|
|
523
|
+
if (aiSpan.errorInfo.domain) {
|
|
524
|
+
attributes["error.domain"] = aiSpan.errorInfo.domain;
|
|
526
525
|
}
|
|
527
|
-
if (
|
|
528
|
-
attributes["error.category"] =
|
|
526
|
+
if (aiSpan.errorInfo.category) {
|
|
527
|
+
attributes["error.category"] = aiSpan.errorInfo.category;
|
|
529
528
|
}
|
|
530
529
|
}
|
|
531
|
-
if (
|
|
532
|
-
Object.entries(
|
|
530
|
+
if (aiSpan.metadata) {
|
|
531
|
+
Object.entries(aiSpan.metadata).forEach(([key, value]) => {
|
|
533
532
|
if (!attributes[key]) {
|
|
534
533
|
if (value === null || value === void 0) {
|
|
535
534
|
return;
|
|
@@ -542,12 +541,12 @@ var SpanConverter = class {
|
|
|
542
541
|
}
|
|
543
542
|
});
|
|
544
543
|
}
|
|
545
|
-
if (
|
|
546
|
-
attributes["mastra.start_time"] =
|
|
544
|
+
if (aiSpan.startTime) {
|
|
545
|
+
attributes["mastra.start_time"] = aiSpan.startTime.toISOString();
|
|
547
546
|
}
|
|
548
|
-
if (
|
|
549
|
-
attributes["mastra.end_time"] =
|
|
550
|
-
const duration =
|
|
547
|
+
if (aiSpan.endTime) {
|
|
548
|
+
attributes["mastra.end_time"] = aiSpan.endTime.toISOString();
|
|
549
|
+
const duration = aiSpan.endTime.getTime() - aiSpan.startTime.getTime();
|
|
551
550
|
attributes["mastra.duration_ms"] = duration;
|
|
552
551
|
}
|
|
553
552
|
return attributes;
|
|
@@ -555,28 +554,28 @@ var SpanConverter = class {
|
|
|
555
554
|
/**
|
|
556
555
|
* Get the operation name based on span type for gen_ai.operation.name
|
|
557
556
|
*/
|
|
558
|
-
getOperationName(
|
|
559
|
-
switch (
|
|
560
|
-
case
|
|
561
|
-
const attrs =
|
|
557
|
+
getOperationName(aiSpan) {
|
|
558
|
+
switch (aiSpan.type) {
|
|
559
|
+
case aiTracing.AISpanType.MODEL_GENERATION: {
|
|
560
|
+
const attrs = aiSpan.attributes;
|
|
562
561
|
return attrs?.resultType === "tool_selection" ? "tool_selection" : "chat";
|
|
563
562
|
}
|
|
564
|
-
case
|
|
565
|
-
case
|
|
563
|
+
case aiTracing.AISpanType.TOOL_CALL:
|
|
564
|
+
case aiTracing.AISpanType.MCP_TOOL_CALL:
|
|
566
565
|
return "tool.execute";
|
|
567
|
-
case
|
|
566
|
+
case aiTracing.AISpanType.AGENT_RUN:
|
|
568
567
|
return "agent.run";
|
|
569
|
-
case
|
|
568
|
+
case aiTracing.AISpanType.WORKFLOW_RUN:
|
|
570
569
|
return "workflow.run";
|
|
571
570
|
default:
|
|
572
|
-
return
|
|
571
|
+
return aiSpan.type.replace(/_/g, ".");
|
|
573
572
|
}
|
|
574
573
|
}
|
|
575
574
|
/**
|
|
576
575
|
* Get span kind as string for attribute
|
|
577
576
|
*/
|
|
578
|
-
getSpanKindString(
|
|
579
|
-
const kind = this.getSpanKind(
|
|
577
|
+
getSpanKindString(aiSpan) {
|
|
578
|
+
const kind = this.getSpanKind(aiSpan);
|
|
580
579
|
switch (kind) {
|
|
581
580
|
case api.SpanKind.SERVER:
|
|
582
581
|
return "server";
|
|
@@ -594,8 +593,8 @@ var SpanConverter = class {
|
|
|
594
593
|
}
|
|
595
594
|
};
|
|
596
595
|
|
|
597
|
-
// src/tracing.ts
|
|
598
|
-
var OtelExporter = class extends
|
|
596
|
+
// src/ai-tracing.ts
|
|
597
|
+
var OtelExporter = class extends aiTracing.BaseExporter {
|
|
599
598
|
config;
|
|
600
599
|
tracingConfig;
|
|
601
600
|
spanConverter;
|
|
@@ -614,8 +613,8 @@ var OtelExporter = class extends observability.BaseExporter {
|
|
|
614
613
|
/**
|
|
615
614
|
* Initialize with tracing configuration
|
|
616
615
|
*/
|
|
617
|
-
init(
|
|
618
|
-
this.tracingConfig =
|
|
616
|
+
init(config) {
|
|
617
|
+
this.tracingConfig = config;
|
|
619
618
|
}
|
|
620
619
|
async setupExporter() {
|
|
621
620
|
if (this.isSetup || this.exporter) return;
|
|
@@ -728,8 +727,8 @@ var OtelExporter = class extends observability.BaseExporter {
|
|
|
728
727
|
await this.setupProcessor();
|
|
729
728
|
this.isSetup = true;
|
|
730
729
|
}
|
|
731
|
-
async
|
|
732
|
-
if (event.type !==
|
|
730
|
+
async _exportEvent(event) {
|
|
731
|
+
if (event.type !== aiTracing.AITracingEventType.SPAN_ENDED) {
|
|
733
732
|
return;
|
|
734
733
|
}
|
|
735
734
|
const span = event.exportedSpan;
|