UNPKG

@agentscope/studio

Version:

AgentScope Studio is a powerful local monitoring and visualization tool designed to provide real-time insights into your system's performance and behavior.

155 lines (154 loc) 5.96 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.SpanTable = void 0; const typeorm_1 = require("typeorm"); // Span table - optimized for trace listing and filtering let SpanTable = class SpanTable extends typeorm_1.BaseEntity { }; exports.SpanTable = SpanTable; __decorate([ (0, typeorm_1.PrimaryColumn)({ nullable: false }), __metadata("design:type", String) ], SpanTable.prototype, "id", void 0); __decorate([ (0, typeorm_1.Column)(), __metadata("design:type", String) ], SpanTable.prototype, "traceId", void 0); __decorate([ (0, typeorm_1.Column)(), __metadata("design:type", String) ], SpanTable.prototype, "spanId", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", String) ], SpanTable.prototype, "traceState", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", String) ], SpanTable.prototype, "parentSpanId", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", Number) ], SpanTable.prototype, "flags", void 0); __decorate([ (0, typeorm_1.Column)(), __metadata("design:type", String) ], SpanTable.prototype, "name", void 0); __decorate([ (0, typeorm_1.Column)(), __metadata("design:type", Number) ], SpanTable.prototype, "kind", void 0); __decorate([ (0, typeorm_1.Column)(), __metadata("design:type", String) ], SpanTable.prototype, "startTimeUnixNano", void 0); __decorate([ (0, typeorm_1.Column)(), __metadata("design:type", String) ], SpanTable.prototype, "endTimeUnixNano", void 0); __decorate([ (0, typeorm_1.Column)('json'), __metadata("design:type", Object) ], SpanTable.prototype, "attributes", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", Number) ], SpanTable.prototype, "droppedAttributesCount", void 0); __decorate([ (0, typeorm_1.Column)('json', { nullable: true }), __metadata("design:type", Array) ], SpanTable.prototype, "events", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", Number) ], SpanTable.prototype, "droppedEventsCount", void 0); __decorate([ (0, typeorm_1.Column)('json', { nullable: true }), __metadata("design:type", Array) ], SpanTable.prototype, "links", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", Number) ], SpanTable.prototype, "droppedLinksCount", void 0); __decorate([ (0, typeorm_1.Column)('json'), __metadata("design:type", Object) ], SpanTable.prototype, "status", void 0); __decorate([ (0, typeorm_1.Column)('json'), __metadata("design:type", Object) ], SpanTable.prototype, "resource", void 0); __decorate([ (0, typeorm_1.Column)('json'), __metadata("design:type", Object) ], SpanTable.prototype, "scope", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", Number) ], SpanTable.prototype, "statusCode", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", String) ], SpanTable.prototype, "serviceName", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", String) ], SpanTable.prototype, "operationName", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", String) ], SpanTable.prototype, "instrumentationName", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", String) ], SpanTable.prototype, "instrumentationVersion", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", String) ], SpanTable.prototype, "model", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", Number) ], SpanTable.prototype, "inputTokens", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", Number) ], SpanTable.prototype, "outputTokens", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", Number) ], SpanTable.prototype, "totalTokens", void 0); __decorate([ (0, typeorm_1.Column)({ nullable: true }), __metadata("design:type", String) ], SpanTable.prototype, "conversationId", void 0); __decorate([ (0, typeorm_1.Column)('float'), __metadata("design:type", Number) ], SpanTable.prototype, "latencyNs", void 0); exports.SpanTable = SpanTable = __decorate([ (0, typeorm_1.Entity)(), (0, typeorm_1.Index)(['traceId']), (0, typeorm_1.Index)(['spanId']), (0, typeorm_1.Index)(['parentSpanId']), (0, typeorm_1.Index)(['startTimeUnixNano']), (0, typeorm_1.Index)(['statusCode']), (0, typeorm_1.Index)(['latencyNs']), (0, typeorm_1.Index)(['serviceName']), (0, typeorm_1.Index)(['operationName']), (0, typeorm_1.Index)(['instrumentationName']), (0, typeorm_1.Index)(['model']), (0, typeorm_1.Index)(['inputTokens']), (0, typeorm_1.Index)(['outputTokens']), (0, typeorm_1.Index)(['totalTokens']), (0, typeorm_1.Index)(['conversationId']) ], SpanTable);