@geekmidas/telescope 1.1.1 → 9.0.2

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/{hono-Bz9PQQzj.mjs → hono-Bw-ey6CT.mjs} +2 -2
  3. package/dist/{hono-Bz9PQQzj.mjs.map → hono-Bw-ey6CT.mjs.map} +1 -1
  4. package/dist/{hono-Z_JIICmt.cjs → hono-CPHX7FAm.cjs} +2 -2
  5. package/dist/{hono-Z_JIICmt.cjs.map → hono-CPHX7FAm.cjs.map} +1 -1
  6. package/dist/{http-Crsriv32.mjs → http-BIvr0YdI.mjs} +1 -1
  7. package/dist/{http-Crsriv32.mjs.map → http-BIvr0YdI.mjs.map} +1 -1
  8. package/dist/{http-JycFRfSe.cjs → http-BsqmhurZ.cjs} +1 -1
  9. package/dist/{http-JycFRfSe.cjs.map → http-BsqmhurZ.cjs.map} +1 -1
  10. package/dist/instrumentation/hono.cjs +2 -2
  11. package/dist/instrumentation/hono.mjs +2 -2
  12. package/dist/instrumentation/http.cjs +1 -1
  13. package/dist/instrumentation/http.mjs +1 -1
  14. package/dist/instrumentation/index.cjs +5 -5
  15. package/dist/instrumentation/index.mjs +5 -5
  16. package/dist/instrumentation/middleware.cjs +2 -2
  17. package/dist/instrumentation/middleware.mjs +2 -2
  18. package/dist/instrumentation/otel.cjs +2 -2
  19. package/dist/instrumentation/otel.mjs +2 -2
  20. package/dist/instrumentation/setup.cjs +1 -1
  21. package/dist/instrumentation/setup.mjs +1 -1
  22. package/dist/logger/console.d.mts.map +1 -1
  23. package/dist/logger/pino.d.cts +2 -2
  24. package/dist/{middleware-Dy1ctr2N.mjs → middleware-4-GrQlOT.mjs} +2 -2
  25. package/dist/{middleware-Dy1ctr2N.mjs.map → middleware-4-GrQlOT.mjs.map} +1 -1
  26. package/dist/{middleware-D3v5SnSs.cjs → middleware-DqPQpcup.cjs} +2 -2
  27. package/dist/{middleware-D3v5SnSs.cjs.map → middleware-DqPQpcup.cjs.map} +1 -1
  28. package/dist/{otel-DPKNyJ0t.mjs → otel-40udNP5g.mjs} +2 -2
  29. package/dist/{otel-DPKNyJ0t.mjs.map → otel-40udNP5g.mjs.map} +1 -1
  30. package/dist/{otel-DuiBeBPU.cjs → otel-COrpz_GZ.cjs} +2 -2
  31. package/dist/{otel-DuiBeBPU.cjs.map → otel-COrpz_GZ.cjs.map} +1 -1
  32. package/dist/otlp/hono.cjs +3 -3
  33. package/dist/otlp/hono.mjs +3 -3
  34. package/dist/otlp/index.cjs +3 -3
  35. package/dist/otlp/index.mjs +3 -3
  36. package/dist/otlp/receiver.cjs +3 -3
  37. package/dist/otlp/receiver.mjs +3 -3
  38. package/dist/otlp/transformer.cjs +2 -2
  39. package/dist/otlp/transformer.mjs +2 -2
  40. package/dist/otlp/types.cjs +1 -1
  41. package/dist/otlp/types.mjs +1 -1
  42. package/dist/{receiver-q4f7eirs.mjs → receiver-D46dfkYI.mjs} +2 -2
  43. package/dist/{receiver-q4f7eirs.mjs.map → receiver-D46dfkYI.mjs.map} +1 -1
  44. package/dist/{receiver-BW_4go_X.cjs → receiver-slCoAFat.cjs} +2 -2
  45. package/dist/{receiver-BW_4go_X.cjs.map → receiver-slCoAFat.cjs.map} +1 -1
  46. package/dist/{setup-BhCp2LUp.mjs → setup-DC9JMEYZ.mjs} +1 -1
  47. package/dist/{setup-BhCp2LUp.mjs.map → setup-DC9JMEYZ.mjs.map} +1 -1
  48. package/dist/{setup-_uT4L_x5.cjs → setup-DufxQpi9.cjs} +1 -1
  49. package/dist/{setup-_uT4L_x5.cjs.map → setup-DufxQpi9.cjs.map} +1 -1
  50. package/dist/tracing-PnECEbEu.d.mts.map +1 -1
  51. package/dist/{transformer-CFrJQkUg.mjs → transformer-CFQ4WFk6.mjs} +2 -2
  52. package/dist/{transformer-CFrJQkUg.mjs.map → transformer-CFQ4WFk6.mjs.map} +1 -1
  53. package/dist/{transformer-DvDYyFRQ.cjs → transformer-Csl6fbgv.cjs} +2 -2
  54. package/dist/{transformer-DvDYyFRQ.cjs.map → transformer-Csl6fbgv.cjs.map} +1 -1
  55. package/dist/{types-BBeTDpHr.cjs → types-BMiHgsi4.cjs} +1 -1
  56. package/dist/{types-BBeTDpHr.cjs.map → types-BMiHgsi4.cjs.map} +1 -1
  57. package/dist/{types-CXYLhG_G.mjs → types-Cj59nqy7.mjs} +1 -1
  58. package/dist/{types-CXYLhG_G.mjs.map → types-Cj59nqy7.mjs.map} +1 -1
  59. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"transformer-DvDYyFRQ.cjs","names":["value?: AnyValue","attrs?: KeyValue[]","result: Record<string, unknown>","nanoStr: string","severity?: SeverityNumber","SeverityNumber","span: Span","SpanStatusCode","SpanKind","resourceAttrs: Record<string, unknown>","headers: Record<string, string>","request: ExportTraceServiceRequest","entries: Array<Omit<RequestEntry, 'id' | 'timestamp'>>","record: LogRecord","scopeName?: string","context: Record<string, unknown>","request: ExportLogsServiceRequest","entries: Array<Omit<LogEntry, 'id' | 'timestamp'>>","request: ExportMetricsServiceRequest","points: MetricDataPoint[]"],"sources":["../src/otlp/transformer.ts"],"sourcesContent":["import type { LogEntry, RequestEntry } from '../types';\nimport {\n\ttype AnyValue,\n\ttype ExportLogsServiceRequest,\n\ttype ExportMetricsServiceRequest,\n\ttype ExportTraceServiceRequest,\n\ttype KeyValue,\n\ttype LogRecord,\n\tSeverityNumber,\n\ttype Span,\n\tSpanKind,\n\tSpanStatusCode,\n} from './types';\n\n/**\n * Extract a primitive value from an AnyValue\n */\nfunction extractValue(value?: AnyValue): unknown {\n\tif (!value) return undefined;\n\tif (value.stringValue !== undefined) return value.stringValue;\n\tif (value.boolValue !== undefined) return value.boolValue;\n\tif (value.intValue !== undefined) return parseInt(value.intValue, 10);\n\tif (value.doubleValue !== undefined) return value.doubleValue;\n\tif (value.bytesValue !== undefined) return value.bytesValue;\n\tif (value.arrayValue) return value.arrayValue.values.map(extractValue);\n\tif (value.kvlistValue) return attributesToObject(value.kvlistValue.values);\n\treturn undefined;\n}\n\n/**\n * Convert KeyValue array to a plain object\n */\nfunction attributesToObject(attrs?: KeyValue[]): Record<string, unknown> {\n\tif (!attrs) return {};\n\tconst result: Record<string, unknown> = {};\n\tfor (const attr of attrs) {\n\t\tresult[attr.key] = extractValue(attr.value);\n\t}\n\treturn result;\n}\n\n/**\n * Convert nanoseconds string to Date\n */\nfunction nanoToDate(nanoStr: string): Date {\n\tconst nano = BigInt(nanoStr);\n\tconst ms = Number(nano / BigInt(1_000_000));\n\treturn new Date(ms);\n}\n\n/**\n * Convert nanoseconds string to milliseconds number\n */\nfunction nanoToMs(nanoStr: string): number {\n\tconst nano = BigInt(nanoStr);\n\treturn Number(nano / BigInt(1_000_000));\n}\n\n/**\n * Map OTLP severity number to Telescope log level\n */\nfunction mapSeverity(\n\tseverity?: SeverityNumber,\n): 'debug' | 'info' | 'warn' | 'error' {\n\tif (severity === undefined) return 'info';\n\tif (severity <= SeverityNumber.SEVERITY_NUMBER_DEBUG4) return 'debug';\n\tif (severity <= SeverityNumber.SEVERITY_NUMBER_INFO4) return 'info';\n\tif (severity <= SeverityNumber.SEVERITY_NUMBER_WARN4) return 'warn';\n\treturn 'error';\n}\n\n/**\n * Determine HTTP status from span attributes and status\n */\nfunction getHttpStatus(span: Span): number {\n\tconst attrs = attributesToObject(span.attributes);\n\n\t// Look for HTTP status code in various attribute names\n\tconst statusCode =\n\t\tattrs['http.status_code'] ??\n\t\tattrs['http.response.status_code'] ??\n\t\tattrs['http.response_status_code'];\n\n\tif (typeof statusCode === 'number') return statusCode;\n\tif (typeof statusCode === 'string') return parseInt(statusCode, 10) || 200;\n\n\t// Fall back to span status\n\tif (span.status?.code === SpanStatusCode.STATUS_CODE_ERROR) return 500;\n\tif (span.status?.code === SpanStatusCode.STATUS_CODE_OK) return 200;\n\n\treturn 200;\n}\n\n/**\n * Check if a span represents an HTTP server request\n */\nfunction isHttpServerSpan(span: Span): boolean {\n\tif (span.kind !== SpanKind.SPAN_KIND_SERVER) return false;\n\n\tconst attrs = attributesToObject(span.attributes);\n\treturn !!(\n\t\tattrs['http.method'] ||\n\t\tattrs['http.request.method'] ||\n\t\tattrs['http.url'] ||\n\t\tattrs['http.target'] ||\n\t\tattrs['url.path']\n\t);\n}\n\n/**\n * Transform HTTP-related span attributes to RequestEntry format\n */\nfunction transformHttpSpan(\n\tspan: Span,\n\tresourceAttrs: Record<string, unknown>,\n): Omit<RequestEntry, 'id' | 'timestamp'> {\n\tconst attrs = attributesToObject(span.attributes);\n\n\t// Extract HTTP method\n\tconst method = String(\n\t\tattrs['http.method'] ?? attrs['http.request.method'] ?? 'GET',\n\t).toUpperCase();\n\n\t// Extract path\n\tconst path = String(\n\t\tattrs['http.target'] ?? attrs['url.path'] ?? attrs['http.route'] ?? '/',\n\t);\n\n\t// Extract full URL\n\tconst url = String(\n\t\tattrs['http.url'] ?? attrs['url.full'] ?? `http://localhost${path}`,\n\t);\n\n\t// Extract headers (if available)\n\tconst headers: Record<string, string> = {};\n\tconst userAgent = attrs['http.user_agent'] ?? attrs['user_agent.original'];\n\tif (userAgent) headers['user-agent'] = String(userAgent);\n\n\tconst contentType = attrs['http.request.header.content_type'];\n\tif (contentType) headers['content-type'] = String(contentType);\n\n\t// Calculate duration\n\tconst startTime = nanoToMs(span.startTimeUnixNano);\n\tconst endTime = nanoToMs(span.endTimeUnixNano);\n\tconst duration = endTime - startTime;\n\n\t// Get status code\n\tconst status = getHttpStatus(span);\n\n\t// Extract client IP\n\tconst ip =\n\t\tattrs['net.peer.ip'] ?? attrs['client.address'] ?? attrs['http.client_ip'];\n\n\treturn {\n\t\tmethod,\n\t\tpath,\n\t\turl,\n\t\theaders,\n\t\tquery: {},\n\t\tstatus,\n\t\tresponseHeaders: {},\n\t\tduration,\n\t\tip: ip ? String(ip) : undefined,\n\t\ttags: [\n\t\t\t`trace:${span.traceId}`,\n\t\t\t`span:${span.spanId}`,\n\t\t\t...(resourceAttrs['service.name']\n\t\t\t\t? [`service:${resourceAttrs['service.name']}`]\n\t\t\t\t: []),\n\t\t],\n\t};\n}\n\n/**\n * Transform OTLP traces to Telescope RequestEntries\n * Only transforms HTTP server spans to request entries\n */\nexport function transformTraces(\n\trequest: ExportTraceServiceRequest,\n): Array<Omit<RequestEntry, 'id' | 'timestamp'>> {\n\tconst entries: Array<Omit<RequestEntry, 'id' | 'timestamp'>> = [];\n\n\tfor (const resourceSpans of request.resourceSpans ?? []) {\n\t\tconst resourceAttrs = attributesToObject(\n\t\t\tresourceSpans.resource?.attributes,\n\t\t);\n\n\t\tfor (const scopeSpans of resourceSpans.scopeSpans ?? []) {\n\t\t\tfor (const span of scopeSpans.spans ?? []) {\n\t\t\t\t// Only transform HTTP server spans\n\t\t\t\tif (isHttpServerSpan(span)) {\n\t\t\t\t\tentries.push(transformHttpSpan(span, resourceAttrs));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn entries;\n}\n\n/**\n * Transform a single OTLP log record to Telescope LogEntry\n */\nfunction transformLogRecord(\n\trecord: LogRecord,\n\tresourceAttrs: Record<string, unknown>,\n\tscopeName?: string,\n): Omit<LogEntry, 'id' | 'timestamp'> {\n\tconst attrs = attributesToObject(record.attributes);\n\n\t// Extract message from body\n\tlet message = '';\n\tif (record.body) {\n\t\tconst bodyValue = extractValue(record.body);\n\t\tmessage =\n\t\t\ttypeof bodyValue === 'string' ? bodyValue : JSON.stringify(bodyValue);\n\t}\n\n\t// Build context from attributes\n\tconst context: Record<string, unknown> = {\n\t\t...attrs,\n\t\t...resourceAttrs,\n\t};\n\n\tif (scopeName) {\n\t\tcontext['instrumentation.scope'] = scopeName;\n\t}\n\n\t// Add severity text if present\n\tif (record.severityText) {\n\t\tcontext['severity.text'] = record.severityText;\n\t}\n\n\treturn {\n\t\tlevel: mapSeverity(record.severityNumber),\n\t\tmessage,\n\t\tcontext: Object.keys(context).length > 0 ? context : undefined,\n\t\trequestId: record.spanId ? `span:${record.spanId}` : undefined,\n\t};\n}\n\n/**\n * Transform OTLP logs to Telescope LogEntries\n */\nexport function transformLogs(\n\trequest: ExportLogsServiceRequest,\n): Array<Omit<LogEntry, 'id' | 'timestamp'>> {\n\tconst entries: Array<Omit<LogEntry, 'id' | 'timestamp'>> = [];\n\n\tfor (const resourceLogs of request.resourceLogs ?? []) {\n\t\tconst resourceAttrs = attributesToObject(resourceLogs.resource?.attributes);\n\n\t\tfor (const scopeLogs of resourceLogs.scopeLogs ?? []) {\n\t\t\tconst scopeName = scopeLogs.scope?.name;\n\n\t\t\tfor (const record of scopeLogs.logRecords ?? []) {\n\t\t\t\tentries.push(transformLogRecord(record, resourceAttrs, scopeName));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn entries;\n}\n\n/**\n * Extracted metric data point for recording\n */\nexport interface MetricDataPoint {\n\tname: string;\n\tdescription?: string;\n\tunit?: string;\n\tvalue: number;\n\ttimestamp: Date;\n\tattributes: Record<string, unknown>;\n\tresourceAttributes: Record<string, unknown>;\n\ttype: 'gauge' | 'sum' | 'histogram' | 'summary';\n}\n\n/**\n * Transform OTLP metrics to normalized data points\n * These can be used for custom metrics processing or forwarding\n */\nexport function transformMetrics(\n\trequest: ExportMetricsServiceRequest,\n): MetricDataPoint[] {\n\tconst points: MetricDataPoint[] = [];\n\n\tfor (const resourceMetrics of request.resourceMetrics ?? []) {\n\t\tconst resourceAttrs = attributesToObject(\n\t\t\tresourceMetrics.resource?.attributes,\n\t\t);\n\n\t\tfor (const scopeMetrics of resourceMetrics.scopeMetrics ?? []) {\n\t\t\tfor (const metric of scopeMetrics.metrics ?? []) {\n\t\t\t\tconst baseMeta = {\n\t\t\t\t\tname: metric.name,\n\t\t\t\t\tdescription: metric.description,\n\t\t\t\t\tunit: metric.unit,\n\t\t\t\t\tresourceAttributes: resourceAttrs,\n\t\t\t\t};\n\n\t\t\t\t// Handle gauge\n\t\t\t\tif (metric.gauge) {\n\t\t\t\t\tfor (const dp of metric.gauge.dataPoints) {\n\t\t\t\t\t\tpoints.push({\n\t\t\t\t\t\t\t...baseMeta,\n\t\t\t\t\t\t\tvalue: dp.asDouble ?? (dp.asInt ? parseInt(dp.asInt, 10) : 0),\n\t\t\t\t\t\t\ttimestamp: nanoToDate(dp.timeUnixNano),\n\t\t\t\t\t\t\tattributes: attributesToObject(dp.attributes),\n\t\t\t\t\t\t\ttype: 'gauge',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Handle sum (counter)\n\t\t\t\tif (metric.sum) {\n\t\t\t\t\tfor (const dp of metric.sum.dataPoints) {\n\t\t\t\t\t\tpoints.push({\n\t\t\t\t\t\t\t...baseMeta,\n\t\t\t\t\t\t\tvalue: dp.asDouble ?? (dp.asInt ? parseInt(dp.asInt, 10) : 0),\n\t\t\t\t\t\t\ttimestamp: nanoToDate(dp.timeUnixNano),\n\t\t\t\t\t\t\tattributes: attributesToObject(dp.attributes),\n\t\t\t\t\t\t\ttype: 'sum',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Handle histogram (extract sum as the value)\n\t\t\t\tif (metric.histogram) {\n\t\t\t\t\tfor (const dp of metric.histogram.dataPoints) {\n\t\t\t\t\t\tpoints.push({\n\t\t\t\t\t\t\t...baseMeta,\n\t\t\t\t\t\t\tvalue: dp.sum ?? 0,\n\t\t\t\t\t\t\ttimestamp: nanoToDate(dp.timeUnixNano),\n\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t...attributesToObject(dp.attributes),\n\t\t\t\t\t\t\t\tcount: parseInt(dp.count, 10),\n\t\t\t\t\t\t\t\tmin: dp.min,\n\t\t\t\t\t\t\t\tmax: dp.max,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttype: 'histogram',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Handle summary\n\t\t\t\tif (metric.summary) {\n\t\t\t\t\tfor (const dp of metric.summary.dataPoints) {\n\t\t\t\t\t\tpoints.push({\n\t\t\t\t\t\t\t...baseMeta,\n\t\t\t\t\t\t\tvalue: dp.sum ?? 0,\n\t\t\t\t\t\t\ttimestamp: nanoToDate(dp.timeUnixNano),\n\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t...attributesToObject(dp.attributes),\n\t\t\t\t\t\t\t\tcount: parseInt(dp.count, 10),\n\t\t\t\t\t\t\t\tquantiles: dp.quantileValues,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttype: 'summary',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn points;\n}\n"],"mappings":";;;;;;AAiBA,SAAS,aAAaA,OAA2B;AAChD,MAAK,MAAO;AACZ,KAAI,MAAM,uBAA2B,QAAO,MAAM;AAClD,KAAI,MAAM,qBAAyB,QAAO,MAAM;AAChD,KAAI,MAAM,oBAAwB,QAAO,SAAS,MAAM,UAAU,GAAG;AACrE,KAAI,MAAM,uBAA2B,QAAO,MAAM;AAClD,KAAI,MAAM,sBAA0B,QAAO,MAAM;AACjD,KAAI,MAAM,WAAY,QAAO,MAAM,WAAW,OAAO,IAAI,aAAa;AACtE,KAAI,MAAM,YAAa,QAAO,mBAAmB,MAAM,YAAY,OAAO;AAC1E;AACA;;;;AAKD,SAAS,mBAAmBC,OAA6C;AACxE,MAAK,MAAO,QAAO,CAAE;CACrB,MAAMC,SAAkC,CAAE;AAC1C,MAAK,MAAM,QAAQ,MAClB,QAAO,KAAK,OAAO,aAAa,KAAK,MAAM;AAE5C,QAAO;AACP;;;;AAKD,SAAS,WAAWC,SAAuB;CAC1C,MAAM,OAAO,OAAO,QAAQ;CAC5B,MAAM,KAAK,OAAO,OAAO,OAAO,IAAU,CAAC;AAC3C,QAAO,IAAI,KAAK;AAChB;;;;AAKD,SAAS,SAASA,SAAyB;CAC1C,MAAM,OAAO,OAAO,QAAQ;AAC5B,QAA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OAAI,OAAO,UACV,MAAK,MAAM,MAAM,OAAO,UAAU,WACjC,QAAO,KAAK;IACX,GAAG;IACH,OAAO,GAAG,OAAO;IACjB,WAAW,WAAW,GAAG,aAAa;IACtC,YAAY;KACX,GAAG,mBAAmB,GAAG,WAAW;KACpC,OAAO,SAAS,GAAG,OAAO,GAAG;KAC7B,KAAK,GAAG;KACR,KAAK,GAAG;IACR;IACD,MAAM;GACN,EAAC;AAKJ,OAAI,OAAO,QACV,MAAK,MAAM,MAAM,OAAO,QAAQ,WAC/B,QAAO,KAAK;IACX,GAAG;IACH,OAAO,GAAG,OAAO;IACjB,WAAW,WAAW,GAAG,aAAa;IACtC,YAAY;KACX,GAAG,mBAAmB,GAAG,WAAW;KACpC,OAAO,SAAS,GAAG,OAAO,GAAG;KAC7B,WAAW,GAAG;IACd;IACD,MAAM;GACN,EAAC;EAGJ;CAEF;AAED,QAAO;AACP"}
1
+ {"version":3,"file":"transformer-Csl6fbgv.cjs","names":["value?: AnyValue","attrs?: KeyValue[]","result: Record<string, unknown>","nanoStr: string","severity?: SeverityNumber","SeverityNumber","span: Span","SpanStatusCode","SpanKind","resourceAttrs: Record<string, unknown>","headers: Record<string, string>","request: ExportTraceServiceRequest","entries: Array<Omit<RequestEntry, 'id' | 'timestamp'>>","record: LogRecord","scopeName?: string","context: Record<string, unknown>","request: ExportLogsServiceRequest","entries: Array<Omit<LogEntry, 'id' | 'timestamp'>>","request: ExportMetricsServiceRequest","points: MetricDataPoint[]"],"sources":["../src/otlp/transformer.ts"],"sourcesContent":["import type { LogEntry, RequestEntry } from '../types';\nimport {\n\ttype AnyValue,\n\ttype ExportLogsServiceRequest,\n\ttype ExportMetricsServiceRequest,\n\ttype ExportTraceServiceRequest,\n\ttype KeyValue,\n\ttype LogRecord,\n\tSeverityNumber,\n\ttype Span,\n\tSpanKind,\n\tSpanStatusCode,\n} from './types';\n\n/**\n * Extract a primitive value from an AnyValue\n */\nfunction extractValue(value?: AnyValue): unknown {\n\tif (!value) return undefined;\n\tif (value.stringValue !== undefined) return value.stringValue;\n\tif (value.boolValue !== undefined) return value.boolValue;\n\tif (value.intValue !== undefined) return parseInt(value.intValue, 10);\n\tif (value.doubleValue !== undefined) return value.doubleValue;\n\tif (value.bytesValue !== undefined) return value.bytesValue;\n\tif (value.arrayValue) return value.arrayValue.values.map(extractValue);\n\tif (value.kvlistValue) return attributesToObject(value.kvlistValue.values);\n\treturn undefined;\n}\n\n/**\n * Convert KeyValue array to a plain object\n */\nfunction attributesToObject(attrs?: KeyValue[]): Record<string, unknown> {\n\tif (!attrs) return {};\n\tconst result: Record<string, unknown> = {};\n\tfor (const attr of attrs) {\n\t\tresult[attr.key] = extractValue(attr.value);\n\t}\n\treturn result;\n}\n\n/**\n * Convert nanoseconds string to Date\n */\nfunction nanoToDate(nanoStr: string): Date {\n\tconst nano = BigInt(nanoStr);\n\tconst ms = Number(nano / BigInt(1_000_000));\n\treturn new Date(ms);\n}\n\n/**\n * Convert nanoseconds string to milliseconds number\n */\nfunction nanoToMs(nanoStr: string): number {\n\tconst nano = BigInt(nanoStr);\n\treturn Number(nano / BigInt(1_000_000));\n}\n\n/**\n * Map OTLP severity number to Telescope log level\n */\nfunction mapSeverity(\n\tseverity?: SeverityNumber,\n): 'debug' | 'info' | 'warn' | 'error' {\n\tif (severity === undefined) return 'info';\n\tif (severity <= SeverityNumber.SEVERITY_NUMBER_DEBUG4) return 'debug';\n\tif (severity <= SeverityNumber.SEVERITY_NUMBER_INFO4) return 'info';\n\tif (severity <= SeverityNumber.SEVERITY_NUMBER_WARN4) return 'warn';\n\treturn 'error';\n}\n\n/**\n * Determine HTTP status from span attributes and status\n */\nfunction getHttpStatus(span: Span): number {\n\tconst attrs = attributesToObject(span.attributes);\n\n\t// Look for HTTP status code in various attribute names\n\tconst statusCode =\n\t\tattrs['http.status_code'] ??\n\t\tattrs['http.response.status_code'] ??\n\t\tattrs['http.response_status_code'];\n\n\tif (typeof statusCode === 'number') return statusCode;\n\tif (typeof statusCode === 'string') return parseInt(statusCode, 10) || 200;\n\n\t// Fall back to span status\n\tif (span.status?.code === SpanStatusCode.STATUS_CODE_ERROR) return 500;\n\tif (span.status?.code === SpanStatusCode.STATUS_CODE_OK) return 200;\n\n\treturn 200;\n}\n\n/**\n * Check if a span represents an HTTP server request\n */\nfunction isHttpServerSpan(span: Span): boolean {\n\tif (span.kind !== SpanKind.SPAN_KIND_SERVER) return false;\n\n\tconst attrs = attributesToObject(span.attributes);\n\treturn !!(\n\t\tattrs['http.method'] ||\n\t\tattrs['http.request.method'] ||\n\t\tattrs['http.url'] ||\n\t\tattrs['http.target'] ||\n\t\tattrs['url.path']\n\t);\n}\n\n/**\n * Transform HTTP-related span attributes to RequestEntry format\n */\nfunction transformHttpSpan(\n\tspan: Span,\n\tresourceAttrs: Record<string, unknown>,\n): Omit<RequestEntry, 'id' | 'timestamp'> {\n\tconst attrs = attributesToObject(span.attributes);\n\n\t// Extract HTTP method\n\tconst method = String(\n\t\tattrs['http.method'] ?? attrs['http.request.method'] ?? 'GET',\n\t).toUpperCase();\n\n\t// Extract path\n\tconst path = String(\n\t\tattrs['http.target'] ?? attrs['url.path'] ?? attrs['http.route'] ?? '/',\n\t);\n\n\t// Extract full URL\n\tconst url = String(\n\t\tattrs['http.url'] ?? attrs['url.full'] ?? `http://localhost${path}`,\n\t);\n\n\t// Extract headers (if available)\n\tconst headers: Record<string, string> = {};\n\tconst userAgent = attrs['http.user_agent'] ?? attrs['user_agent.original'];\n\tif (userAgent) headers['user-agent'] = String(userAgent);\n\n\tconst contentType = attrs['http.request.header.content_type'];\n\tif (contentType) headers['content-type'] = String(contentType);\n\n\t// Calculate duration\n\tconst startTime = nanoToMs(span.startTimeUnixNano);\n\tconst endTime = nanoToMs(span.endTimeUnixNano);\n\tconst duration = endTime - startTime;\n\n\t// Get status code\n\tconst status = getHttpStatus(span);\n\n\t// Extract client IP\n\tconst ip =\n\t\tattrs['net.peer.ip'] ?? attrs['client.address'] ?? attrs['http.client_ip'];\n\n\treturn {\n\t\tmethod,\n\t\tpath,\n\t\turl,\n\t\theaders,\n\t\tquery: {},\n\t\tstatus,\n\t\tresponseHeaders: {},\n\t\tduration,\n\t\tip: ip ? String(ip) : undefined,\n\t\ttags: [\n\t\t\t`trace:${span.traceId}`,\n\t\t\t`span:${span.spanId}`,\n\t\t\t...(resourceAttrs['service.name']\n\t\t\t\t? [`service:${resourceAttrs['service.name']}`]\n\t\t\t\t: []),\n\t\t],\n\t};\n}\n\n/**\n * Transform OTLP traces to Telescope RequestEntries\n * Only transforms HTTP server spans to request entries\n */\nexport function transformTraces(\n\trequest: ExportTraceServiceRequest,\n): Array<Omit<RequestEntry, 'id' | 'timestamp'>> {\n\tconst entries: Array<Omit<RequestEntry, 'id' | 'timestamp'>> = [];\n\n\tfor (const resourceSpans of request.resourceSpans ?? []) {\n\t\tconst resourceAttrs = attributesToObject(\n\t\t\tresourceSpans.resource?.attributes,\n\t\t);\n\n\t\tfor (const scopeSpans of resourceSpans.scopeSpans ?? []) {\n\t\t\tfor (const span of scopeSpans.spans ?? []) {\n\t\t\t\t// Only transform HTTP server spans\n\t\t\t\tif (isHttpServerSpan(span)) {\n\t\t\t\t\tentries.push(transformHttpSpan(span, resourceAttrs));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn entries;\n}\n\n/**\n * Transform a single OTLP log record to Telescope LogEntry\n */\nfunction transformLogRecord(\n\trecord: LogRecord,\n\tresourceAttrs: Record<string, unknown>,\n\tscopeName?: string,\n): Omit<LogEntry, 'id' | 'timestamp'> {\n\tconst attrs = attributesToObject(record.attributes);\n\n\t// Extract message from body\n\tlet message = '';\n\tif (record.body) {\n\t\tconst bodyValue = extractValue(record.body);\n\t\tmessage =\n\t\t\ttypeof bodyValue === 'string' ? bodyValue : JSON.stringify(bodyValue);\n\t}\n\n\t// Build context from attributes\n\tconst context: Record<string, unknown> = {\n\t\t...attrs,\n\t\t...resourceAttrs,\n\t};\n\n\tif (scopeName) {\n\t\tcontext['instrumentation.scope'] = scopeName;\n\t}\n\n\t// Add severity text if present\n\tif (record.severityText) {\n\t\tcontext['severity.text'] = record.severityText;\n\t}\n\n\treturn {\n\t\tlevel: mapSeverity(record.severityNumber),\n\t\tmessage,\n\t\tcontext: Object.keys(context).length > 0 ? context : undefined,\n\t\trequestId: record.spanId ? `span:${record.spanId}` : undefined,\n\t};\n}\n\n/**\n * Transform OTLP logs to Telescope LogEntries\n */\nexport function transformLogs(\n\trequest: ExportLogsServiceRequest,\n): Array<Omit<LogEntry, 'id' | 'timestamp'>> {\n\tconst entries: Array<Omit<LogEntry, 'id' | 'timestamp'>> = [];\n\n\tfor (const resourceLogs of request.resourceLogs ?? []) {\n\t\tconst resourceAttrs = attributesToObject(resourceLogs.resource?.attributes);\n\n\t\tfor (const scopeLogs of resourceLogs.scopeLogs ?? []) {\n\t\t\tconst scopeName = scopeLogs.scope?.name;\n\n\t\t\tfor (const record of scopeLogs.logRecords ?? []) {\n\t\t\t\tentries.push(transformLogRecord(record, resourceAttrs, scopeName));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn entries;\n}\n\n/**\n * Extracted metric data point for recording\n */\nexport interface MetricDataPoint {\n\tname: string;\n\tdescription?: string;\n\tunit?: string;\n\tvalue: number;\n\ttimestamp: Date;\n\tattributes: Record<string, unknown>;\n\tresourceAttributes: Record<string, unknown>;\n\ttype: 'gauge' | 'sum' | 'histogram' | 'summary';\n}\n\n/**\n * Transform OTLP metrics to normalized data points\n * These can be used for custom metrics processing or forwarding\n */\nexport function transformMetrics(\n\trequest: ExportMetricsServiceRequest,\n): MetricDataPoint[] {\n\tconst points: MetricDataPoint[] = [];\n\n\tfor (const resourceMetrics of request.resourceMetrics ?? []) {\n\t\tconst resourceAttrs = attributesToObject(\n\t\t\tresourceMetrics.resource?.attributes,\n\t\t);\n\n\t\tfor (const scopeMetrics of resourceMetrics.scopeMetrics ?? []) {\n\t\t\tfor (const metric of scopeMetrics.metrics ?? []) {\n\t\t\t\tconst baseMeta = {\n\t\t\t\t\tname: metric.name,\n\t\t\t\t\tdescription: metric.description,\n\t\t\t\t\tunit: metric.unit,\n\t\t\t\t\tresourceAttributes: resourceAttrs,\n\t\t\t\t};\n\n\t\t\t\t// Handle gauge\n\t\t\t\tif (metric.gauge) {\n\t\t\t\t\tfor (const dp of metric.gauge.dataPoints) {\n\t\t\t\t\t\tpoints.push({\n\t\t\t\t\t\t\t...baseMeta,\n\t\t\t\t\t\t\tvalue: dp.asDouble ?? (dp.asInt ? parseInt(dp.asInt, 10) : 0),\n\t\t\t\t\t\t\ttimestamp: nanoToDate(dp.timeUnixNano),\n\t\t\t\t\t\t\tattributes: attributesToObject(dp.attributes),\n\t\t\t\t\t\t\ttype: 'gauge',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Handle sum (counter)\n\t\t\t\tif (metric.sum) {\n\t\t\t\t\tfor (const dp of metric.sum.dataPoints) {\n\t\t\t\t\t\tpoints.push({\n\t\t\t\t\t\t\t...baseMeta,\n\t\t\t\t\t\t\tvalue: dp.asDouble ?? (dp.asInt ? parseInt(dp.asInt, 10) : 0),\n\t\t\t\t\t\t\ttimestamp: nanoToDate(dp.timeUnixNano),\n\t\t\t\t\t\t\tattributes: attributesToObject(dp.attributes),\n\t\t\t\t\t\t\ttype: 'sum',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Handle histogram (extract sum as the value)\n\t\t\t\tif (metric.histogram) {\n\t\t\t\t\tfor (const dp of metric.histogram.dataPoints) {\n\t\t\t\t\t\tpoints.push({\n\t\t\t\t\t\t\t...baseMeta,\n\t\t\t\t\t\t\tvalue: dp.sum ?? 0,\n\t\t\t\t\t\t\ttimestamp: nanoToDate(dp.timeUnixNano),\n\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t...attributesToObject(dp.attributes),\n\t\t\t\t\t\t\t\tcount: parseInt(dp.count, 10),\n\t\t\t\t\t\t\t\tmin: dp.min,\n\t\t\t\t\t\t\t\tmax: dp.max,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttype: 'histogram',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Handle summary\n\t\t\t\tif (metric.summary) {\n\t\t\t\t\tfor (const dp of metric.summary.dataPoints) {\n\t\t\t\t\t\tpoints.push({\n\t\t\t\t\t\t\t...baseMeta,\n\t\t\t\t\t\t\tvalue: dp.sum ?? 0,\n\t\t\t\t\t\t\ttimestamp: nanoToDate(dp.timeUnixNano),\n\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t...attributesToObject(dp.attributes),\n\t\t\t\t\t\t\t\tcount: parseInt(dp.count, 10),\n\t\t\t\t\t\t\t\tquantiles: dp.quantileValues,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttype: 'summary',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn points;\n}\n"],"mappings":";;;;;;AAiBA,SAAS,aAAaA,OAA2B;AAChD,MAAK,MAAO;AACZ,KAAI,MAAM,uBAA2B,QAAO,MAAM;AAClD,KAAI,MAAM,qBAAyB,QAAO,MAAM;AAChD,KAAI,MAAM,oBAAwB,QAAO,SAAS,MAAM,UAAU,GAAG;AACrE,KAAI,MAAM,uBAA2B,QAAO,MAAM;AAClD,KAAI,MAAM,sBAA0B,QAAO,MAAM;AACjD,KAAI,MAAM,WAAY,QAAO,MAAM,WAAW,OAAO,IAAI,aAAa;AACtE,KAAI,MAAM,YAAa,QAAO,mBAAmB,MAAM,YAAY,OAAO;AAC1E;AACA;;;;AAKD,SAAS,mBAAmBC,OAA6C;AACxE,MAAK,MAAO,QAAO,CAAE;CACrB,MAAMC,SAAkC,CAAE;AAC1C,MAAK,MAAM,QAAQ,MAClB,QAAO,KAAK,OAAO,aAAa,KAAK,MAAM;AAE5C,QAAO;AACP;;;;AAKD,S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,OAAO,IAAI,WAC3B,QAAO,KAAK;IACX,GAAG;IACH,OAAO,GAAG,aAAa,GAAG,QAAQ,SAAS,GAAG,OAAO,GAAG,GAAG;IAC3D,WAAW,WAAW,GAAG,aAAa;IACtC,YAAY,mBAAmB,GAAG,WAAW;IAC7C,MAAM;GACN,EAAC;AAKJ,OAAI,OAAO,UACV,MAAK,MAAM,MAAM,OAAO,UAAU,WACjC,QAAO,KAAK;IACX,GAAG;IACH,OAAO,GAAG,OAAO;IACjB,WAAW,WAAW,GAAG,aAAa;IACtC,YAAY;KACX,GAAG,mBAAmB,GAAG,WAAW;KACpC,OAAO,SAAS,GAAG,OAAO,GAAG;KAC7B,KAAK,GAAG;KACR,KAAK,GAAG;IACR;IACD,MAAM;GACN,EAAC;AAKJ,OAAI,OAAO,QACV,MAAK,MAAM,MAAM,OAAO,QAAQ,WAC/B,QAAO,KAAK;IACX,GAAG;IACH,OAAO,GAAG,OAAO;IACjB,WAAW,WAAW,GAAG,aAAa;IACtC,YAAY;KACX,GAAG,mBAAmB,GAAG,WAAW;KACpC,OAAO,SAAS,GAAG,OAAO,GAAG;KAC7B,WAAW,GAAG;IACd;IACD,MAAM;GACN,EAAC;EAGJ;CAEF;AAED,QAAO;AACP"}
@@ -75,4 +75,4 @@ Object.defineProperty(exports, 'SpanStatusCode', {
75
75
  return SpanStatusCode;
76
76
  }
77
77
  });
78
- //# sourceMappingURL=types-BBeTDpHr.cjs.map
78
+ //# sourceMappingURL=types-BMiHgsi4.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-BBeTDpHr.cjs","names":[],"sources":["../src/otlp/types.ts"],"sourcesContent":["/**\n * OTLP JSON types based on OpenTelemetry Protocol specification.\n * These types represent the JSON encoding of OTLP protobuf messages.\n * @see https://opentelemetry.io/docs/specs/otlp/\n */\n\n// ============================================\n// Common Types\n// ============================================\n\n/**\n * Key-value pair for attributes\n */\nexport interface KeyValue {\n\tkey: string;\n\tvalue: AnyValue;\n}\n\n/**\n * Any value type (string, bool, int, double, array, kvlist, bytes)\n */\nexport interface AnyValue {\n\tstringValue?: string;\n\tboolValue?: boolean;\n\tintValue?: string; // int64 as string\n\tdoubleValue?: number;\n\tarrayValue?: ArrayValue;\n\tkvlistValue?: KeyValueList;\n\tbytesValue?: string; // base64 encoded\n}\n\nexport interface ArrayValue {\n\tvalues: AnyValue[];\n}\n\nexport interface KeyValueList {\n\tvalues: KeyValue[];\n}\n\n/**\n * Resource represents the entity producing telemetry\n */\nexport interface Resource {\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n}\n\n/**\n * InstrumentationScope represents the instrumentation library\n */\nexport interface InstrumentationScope {\n\tname: string;\n\tversion?: string;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n}\n\n// ============================================\n// Trace Types\n// ============================================\n\n/**\n * Root message for trace export\n */\nexport interface ExportTraceServiceRequest {\n\tresourceSpans?: ResourceSpans[];\n}\n\nexport interface ResourceSpans {\n\tresource?: Resource;\n\tscopeSpans?: ScopeSpans[];\n\tschemaUrl?: string;\n}\n\nexport interface ScopeSpans {\n\tscope?: InstrumentationScope;\n\tspans?: Span[];\n\tschemaUrl?: string;\n}\n\nexport interface Span {\n\ttraceId: string; // hex encoded 16 bytes\n\tspanId: string; // hex encoded 8 bytes\n\ttraceState?: string;\n\tparentSpanId?: string; // hex encoded 8 bytes\n\tflags?: number;\n\tname: string;\n\tkind?: SpanKind;\n\tstartTimeUnixNano: string; // uint64 as string\n\tendTimeUnixNano: string; // uint64 as string\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n\tevents?: SpanEvent[];\n\tdroppedEventsCount?: number;\n\tlinks?: SpanLink[];\n\tdroppedLinksCount?: number;\n\tstatus?: SpanStatus;\n}\n\nexport enum SpanKind {\n\tSPAN_KIND_UNSPECIFIED = 0,\n\tSPAN_KIND_INTERNAL = 1,\n\tSPAN_KIND_SERVER = 2,\n\tSPAN_KIND_CLIENT = 3,\n\tSPAN_KIND_PRODUCER = 4,\n\tSPAN_KIND_CONSUMER = 5,\n}\n\nexport interface SpanEvent {\n\ttimeUnixNano: string;\n\tname: string;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n}\n\nexport interface SpanLink {\n\ttraceId: string;\n\tspanId: string;\n\ttraceState?: string;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n\tflags?: number;\n}\n\nexport interface SpanStatus {\n\tmessage?: string;\n\tcode?: SpanStatusCode;\n}\n\nexport enum SpanStatusCode {\n\tSTATUS_CODE_UNSET = 0,\n\tSTATUS_CODE_OK = 1,\n\tSTATUS_CODE_ERROR = 2,\n}\n\n// ============================================\n// Log Types\n// ============================================\n\n/**\n * Root message for log export\n */\nexport interface ExportLogsServiceRequest {\n\tresourceLogs?: ResourceLogs[];\n}\n\nexport interface ResourceLogs {\n\tresource?: Resource;\n\tscopeLogs?: ScopeLogs[];\n\tschemaUrl?: string;\n}\n\nexport interface ScopeLogs {\n\tscope?: InstrumentationScope;\n\tlogRecords?: LogRecord[];\n\tschemaUrl?: string;\n}\n\nexport interface LogRecord {\n\ttimeUnixNano?: string;\n\tobservedTimeUnixNano: string;\n\tseverityNumber?: SeverityNumber;\n\tseverityText?: string;\n\tbody?: AnyValue;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n\tflags?: number;\n\ttraceId?: string;\n\tspanId?: string;\n}\n\nexport enum SeverityNumber {\n\tSEVERITY_NUMBER_UNSPECIFIED = 0,\n\tSEVERITY_NUMBER_TRACE = 1,\n\tSEVERITY_NUMBER_TRACE2 = 2,\n\tSEVERITY_NUMBER_TRACE3 = 3,\n\tSEVERITY_NUMBER_TRACE4 = 4,\n\tSEVERITY_NUMBER_DEBUG = 5,\n\tSEVERITY_NUMBER_DEBUG2 = 6,\n\tSEVERITY_NUMBER_DEBUG3 = 7,\n\tSEVERITY_NUMBER_DEBUG4 = 8,\n\tSEVERITY_NUMBER_INFO = 9,\n\tSEVERITY_NUMBER_INFO2 = 10,\n\tSEVERITY_NUMBER_INFO3 = 11,\n\tSEVERITY_NUMBER_INFO4 = 12,\n\tSEVERITY_NUMBER_WARN = 13,\n\tSEVERITY_NUMBER_WARN2 = 14,\n\tSEVERITY_NUMBER_WARN3 = 15,\n\tSEVERITY_NUMBER_WARN4 = 16,\n\tSEVERITY_NUMBER_ERROR = 17,\n\tSEVERITY_NUMBER_ERROR2 = 18,\n\tSEVERITY_NUMBER_ERROR3 = 19,\n\tSEVERITY_NUMBER_ERROR4 = 20,\n\tSEVERITY_NUMBER_FATAL = 21,\n\tSEVERITY_NUMBER_FATAL2 = 22,\n\tSEVERITY_NUMBER_FATAL3 = 23,\n\tSEVERITY_NUMBER_FATAL4 = 24,\n}\n\n// ============================================\n// Metrics Types\n// ============================================\n\n/**\n * Root message for metrics export\n */\nexport interface ExportMetricsServiceRequest {\n\tresourceMetrics?: ResourceMetrics[];\n}\n\nexport interface ResourceMetrics {\n\tresource?: Resource;\n\tscopeMetrics?: ScopeMetrics[];\n\tschemaUrl?: string;\n}\n\nexport interface ScopeMetrics {\n\tscope?: InstrumentationScope;\n\tmetrics?: Metric[];\n\tschemaUrl?: string;\n}\n\nexport interface Metric {\n\tname: string;\n\tdescription?: string;\n\tunit?: string;\n\tmetadata?: KeyValue[];\n\tgauge?: Gauge;\n\tsum?: Sum;\n\thistogram?: Histogram;\n\texponentialHistogram?: ExponentialHistogram;\n\tsummary?: Summary;\n}\n\nexport interface Gauge {\n\tdataPoints: NumberDataPoint[];\n}\n\nexport interface Sum {\n\tdataPoints: NumberDataPoint[];\n\taggregationTemporality: AggregationTemporality;\n\tisMonotonic?: boolean;\n}\n\nexport interface Histogram {\n\tdataPoints: HistogramDataPoint[];\n\taggregationTemporality: AggregationTemporality;\n}\n\nexport interface ExponentialHistogram {\n\tdataPoints: ExponentialHistogramDataPoint[];\n\taggregationTemporality: AggregationTemporality;\n}\n\nexport interface Summary {\n\tdataPoints: SummaryDataPoint[];\n}\n\nexport enum AggregationTemporality {\n\tAGGREGATION_TEMPORALITY_UNSPECIFIED = 0,\n\tAGGREGATION_TEMPORALITY_DELTA = 1,\n\tAGGREGATION_TEMPORALITY_CUMULATIVE = 2,\n}\n\nexport interface NumberDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tasDouble?: number;\n\tasInt?: string;\n\texemplars?: Exemplar[];\n\tflags?: number;\n}\n\nexport interface HistogramDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tcount: string;\n\tsum?: number;\n\tbucketCounts?: string[];\n\texplicitBounds?: number[];\n\texemplars?: Exemplar[];\n\tflags?: number;\n\tmin?: number;\n\tmax?: number;\n}\n\nexport interface ExponentialHistogramDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tcount: string;\n\tsum?: number;\n\tscale?: number;\n\tzeroCount?: string;\n\tpositive?: Buckets;\n\tnegative?: Buckets;\n\tflags?: number;\n\texemplars?: Exemplar[];\n\tmin?: number;\n\tmax?: number;\n\tzeroThreshold?: number;\n}\n\nexport interface Buckets {\n\toffset?: number;\n\tbucketCounts?: string[];\n}\n\nexport interface SummaryDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tcount: string;\n\tsum?: number;\n\tquantileValues?: ValueAtQuantile[];\n\tflags?: number;\n}\n\nexport interface ValueAtQuantile {\n\tquantile: number;\n\tvalue: number;\n}\n\nexport interface Exemplar {\n\tfilteredAttributes?: KeyValue[];\n\ttimeUnixNano: string;\n\tasDouble?: number;\n\tasInt?: string;\n\tspanId?: string;\n\ttraceId?: string;\n}\n\n// ============================================\n// Response Types\n// ============================================\n\nexport interface ExportTraceServiceResponse {\n\tpartialSuccess?: ExportTracePartialSuccess;\n}\n\nexport interface ExportTracePartialSuccess {\n\trejectedSpans?: string;\n\terrorMessage?: string;\n}\n\nexport interface ExportLogsServiceResponse {\n\tpartialSuccess?: ExportLogsPartialSuccess;\n}\n\nexport interface ExportLogsPartialSuccess {\n\trejectedLogRecords?: string;\n\terrorMessage?: string;\n}\n\nexport interface ExportMetricsServiceResponse {\n\tpartialSuccess?: ExportMetricsPartialSuccess;\n}\n\nexport interface ExportMetricsPartialSuccess {\n\trejectedDataPoints?: string;\n\terrorMessage?: string;\n}\n"],"mappings":";;AAmGA,IAAY,gDAAL;AACN;AACA;AACA;AACA;AACA;AACA;;AACA;AAuBD,IAAY,4DAAL;AACN;AACA;AACA;;AACA;AAsCD,IAAY,4DAAL;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AA6DD,IAAY,4EAAL;AACN;AACA;AACA;;AACA"}
1
+ {"version":3,"file":"types-BMiHgsi4.cjs","names":[],"sources":["../src/otlp/types.ts"],"sourcesContent":["/**\n * OTLP JSON types based on OpenTelemetry Protocol specification.\n * These types represent the JSON encoding of OTLP protobuf messages.\n * @see https://opentelemetry.io/docs/specs/otlp/\n */\n\n// ============================================\n// Common Types\n// ============================================\n\n/**\n * Key-value pair for attributes\n */\nexport interface KeyValue {\n\tkey: string;\n\tvalue: AnyValue;\n}\n\n/**\n * Any value type (string, bool, int, double, array, kvlist, bytes)\n */\nexport interface AnyValue {\n\tstringValue?: string;\n\tboolValue?: boolean;\n\tintValue?: string; // int64 as string\n\tdoubleValue?: number;\n\tarrayValue?: ArrayValue;\n\tkvlistValue?: KeyValueList;\n\tbytesValue?: string; // base64 encoded\n}\n\nexport interface ArrayValue {\n\tvalues: AnyValue[];\n}\n\nexport interface KeyValueList {\n\tvalues: KeyValue[];\n}\n\n/**\n * Resource represents the entity producing telemetry\n */\nexport interface Resource {\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n}\n\n/**\n * InstrumentationScope represents the instrumentation library\n */\nexport interface InstrumentationScope {\n\tname: string;\n\tversion?: string;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n}\n\n// ============================================\n// Trace Types\n// ============================================\n\n/**\n * Root message for trace export\n */\nexport interface ExportTraceServiceRequest {\n\tresourceSpans?: ResourceSpans[];\n}\n\nexport interface ResourceSpans {\n\tresource?: Resource;\n\tscopeSpans?: ScopeSpans[];\n\tschemaUrl?: string;\n}\n\nexport interface ScopeSpans {\n\tscope?: InstrumentationScope;\n\tspans?: Span[];\n\tschemaUrl?: string;\n}\n\nexport interface Span {\n\ttraceId: string; // hex encoded 16 bytes\n\tspanId: string; // hex encoded 8 bytes\n\ttraceState?: string;\n\tparentSpanId?: string; // hex encoded 8 bytes\n\tflags?: number;\n\tname: string;\n\tkind?: SpanKind;\n\tstartTimeUnixNano: string; // uint64 as string\n\tendTimeUnixNano: string; // uint64 as string\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n\tevents?: SpanEvent[];\n\tdroppedEventsCount?: number;\n\tlinks?: SpanLink[];\n\tdroppedLinksCount?: number;\n\tstatus?: SpanStatus;\n}\n\nexport enum SpanKind {\n\tSPAN_KIND_UNSPECIFIED = 0,\n\tSPAN_KIND_INTERNAL = 1,\n\tSPAN_KIND_SERVER = 2,\n\tSPAN_KIND_CLIENT = 3,\n\tSPAN_KIND_PRODUCER = 4,\n\tSPAN_KIND_CONSUMER = 5,\n}\n\nexport interface SpanEvent {\n\ttimeUnixNano: string;\n\tname: string;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n}\n\nexport interface SpanLink {\n\ttraceId: string;\n\tspanId: string;\n\ttraceState?: string;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n\tflags?: number;\n}\n\nexport interface SpanStatus {\n\tmessage?: string;\n\tcode?: SpanStatusCode;\n}\n\nexport enum SpanStatusCode {\n\tSTATUS_CODE_UNSET = 0,\n\tSTATUS_CODE_OK = 1,\n\tSTATUS_CODE_ERROR = 2,\n}\n\n// ============================================\n// Log Types\n// ============================================\n\n/**\n * Root message for log export\n */\nexport interface ExportLogsServiceRequest {\n\tresourceLogs?: ResourceLogs[];\n}\n\nexport interface ResourceLogs {\n\tresource?: Resource;\n\tscopeLogs?: ScopeLogs[];\n\tschemaUrl?: string;\n}\n\nexport interface ScopeLogs {\n\tscope?: InstrumentationScope;\n\tlogRecords?: LogRecord[];\n\tschemaUrl?: string;\n}\n\nexport interface LogRecord {\n\ttimeUnixNano?: string;\n\tobservedTimeUnixNano: string;\n\tseverityNumber?: SeverityNumber;\n\tseverityText?: string;\n\tbody?: AnyValue;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n\tflags?: number;\n\ttraceId?: string;\n\tspanId?: string;\n}\n\nexport enum SeverityNumber {\n\tSEVERITY_NUMBER_UNSPECIFIED = 0,\n\tSEVERITY_NUMBER_TRACE = 1,\n\tSEVERITY_NUMBER_TRACE2 = 2,\n\tSEVERITY_NUMBER_TRACE3 = 3,\n\tSEVERITY_NUMBER_TRACE4 = 4,\n\tSEVERITY_NUMBER_DEBUG = 5,\n\tSEVERITY_NUMBER_DEBUG2 = 6,\n\tSEVERITY_NUMBER_DEBUG3 = 7,\n\tSEVERITY_NUMBER_DEBUG4 = 8,\n\tSEVERITY_NUMBER_INFO = 9,\n\tSEVERITY_NUMBER_INFO2 = 10,\n\tSEVERITY_NUMBER_INFO3 = 11,\n\tSEVERITY_NUMBER_INFO4 = 12,\n\tSEVERITY_NUMBER_WARN = 13,\n\tSEVERITY_NUMBER_WARN2 = 14,\n\tSEVERITY_NUMBER_WARN3 = 15,\n\tSEVERITY_NUMBER_WARN4 = 16,\n\tSEVERITY_NUMBER_ERROR = 17,\n\tSEVERITY_NUMBER_ERROR2 = 18,\n\tSEVERITY_NUMBER_ERROR3 = 19,\n\tSEVERITY_NUMBER_ERROR4 = 20,\n\tSEVERITY_NUMBER_FATAL = 21,\n\tSEVERITY_NUMBER_FATAL2 = 22,\n\tSEVERITY_NUMBER_FATAL3 = 23,\n\tSEVERITY_NUMBER_FATAL4 = 24,\n}\n\n// ============================================\n// Metrics Types\n// ============================================\n\n/**\n * Root message for metrics export\n */\nexport interface ExportMetricsServiceRequest {\n\tresourceMetrics?: ResourceMetrics[];\n}\n\nexport interface ResourceMetrics {\n\tresource?: Resource;\n\tscopeMetrics?: ScopeMetrics[];\n\tschemaUrl?: string;\n}\n\nexport interface ScopeMetrics {\n\tscope?: InstrumentationScope;\n\tmetrics?: Metric[];\n\tschemaUrl?: string;\n}\n\nexport interface Metric {\n\tname: string;\n\tdescription?: string;\n\tunit?: string;\n\tmetadata?: KeyValue[];\n\tgauge?: Gauge;\n\tsum?: Sum;\n\thistogram?: Histogram;\n\texponentialHistogram?: ExponentialHistogram;\n\tsummary?: Summary;\n}\n\nexport interface Gauge {\n\tdataPoints: NumberDataPoint[];\n}\n\nexport interface Sum {\n\tdataPoints: NumberDataPoint[];\n\taggregationTemporality: AggregationTemporality;\n\tisMonotonic?: boolean;\n}\n\nexport interface Histogram {\n\tdataPoints: HistogramDataPoint[];\n\taggregationTemporality: AggregationTemporality;\n}\n\nexport interface ExponentialHistogram {\n\tdataPoints: ExponentialHistogramDataPoint[];\n\taggregationTemporality: AggregationTemporality;\n}\n\nexport interface Summary {\n\tdataPoints: SummaryDataPoint[];\n}\n\nexport enum AggregationTemporality {\n\tAGGREGATION_TEMPORALITY_UNSPECIFIED = 0,\n\tAGGREGATION_TEMPORALITY_DELTA = 1,\n\tAGGREGATION_TEMPORALITY_CUMULATIVE = 2,\n}\n\nexport interface NumberDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tasDouble?: number;\n\tasInt?: string;\n\texemplars?: Exemplar[];\n\tflags?: number;\n}\n\nexport interface HistogramDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tcount: string;\n\tsum?: number;\n\tbucketCounts?: string[];\n\texplicitBounds?: number[];\n\texemplars?: Exemplar[];\n\tflags?: number;\n\tmin?: number;\n\tmax?: number;\n}\n\nexport interface ExponentialHistogramDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tcount: string;\n\tsum?: number;\n\tscale?: number;\n\tzeroCount?: string;\n\tpositive?: Buckets;\n\tnegative?: Buckets;\n\tflags?: number;\n\texemplars?: Exemplar[];\n\tmin?: number;\n\tmax?: number;\n\tzeroThreshold?: number;\n}\n\nexport interface Buckets {\n\toffset?: number;\n\tbucketCounts?: string[];\n}\n\nexport interface SummaryDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tcount: string;\n\tsum?: number;\n\tquantileValues?: ValueAtQuantile[];\n\tflags?: number;\n}\n\nexport interface ValueAtQuantile {\n\tquantile: number;\n\tvalue: number;\n}\n\nexport interface Exemplar {\n\tfilteredAttributes?: KeyValue[];\n\ttimeUnixNano: string;\n\tasDouble?: number;\n\tasInt?: string;\n\tspanId?: string;\n\ttraceId?: string;\n}\n\n// ============================================\n// Response Types\n// ============================================\n\nexport interface ExportTraceServiceResponse {\n\tpartialSuccess?: ExportTracePartialSuccess;\n}\n\nexport interface ExportTracePartialSuccess {\n\trejectedSpans?: string;\n\terrorMessage?: string;\n}\n\nexport interface ExportLogsServiceResponse {\n\tpartialSuccess?: ExportLogsPartialSuccess;\n}\n\nexport interface ExportLogsPartialSuccess {\n\trejectedLogRecords?: string;\n\terrorMessage?: string;\n}\n\nexport interface ExportMetricsServiceResponse {\n\tpartialSuccess?: ExportMetricsPartialSuccess;\n}\n\nexport interface ExportMetricsPartialSuccess {\n\trejectedDataPoints?: string;\n\terrorMessage?: string;\n}\n"],"mappings":";;AAmGA,IAAY,gDAAL;AACN;AACA;AACA;AACA;AACA;AACA;;AACA;AAuBD,IAAY,4DAAL;AACN;AACA;AACA;;AACA;AAsCD,IAAY,4DAAL;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AA6DD,IAAY,4EAAL;AACN;AACA;AACA;;AACA"}
@@ -51,4 +51,4 @@ let AggregationTemporality = /* @__PURE__ */ function(AggregationTemporality$1)
51
51
 
52
52
  //#endregion
53
53
  export { AggregationTemporality, SeverityNumber, SpanKind, SpanStatusCode };
54
- //# sourceMappingURL=types-CXYLhG_G.mjs.map
54
+ //# sourceMappingURL=types-Cj59nqy7.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-CXYLhG_G.mjs","names":[],"sources":["../src/otlp/types.ts"],"sourcesContent":["/**\n * OTLP JSON types based on OpenTelemetry Protocol specification.\n * These types represent the JSON encoding of OTLP protobuf messages.\n * @see https://opentelemetry.io/docs/specs/otlp/\n */\n\n// ============================================\n// Common Types\n// ============================================\n\n/**\n * Key-value pair for attributes\n */\nexport interface KeyValue {\n\tkey: string;\n\tvalue: AnyValue;\n}\n\n/**\n * Any value type (string, bool, int, double, array, kvlist, bytes)\n */\nexport interface AnyValue {\n\tstringValue?: string;\n\tboolValue?: boolean;\n\tintValue?: string; // int64 as string\n\tdoubleValue?: number;\n\tarrayValue?: ArrayValue;\n\tkvlistValue?: KeyValueList;\n\tbytesValue?: string; // base64 encoded\n}\n\nexport interface ArrayValue {\n\tvalues: AnyValue[];\n}\n\nexport interface KeyValueList {\n\tvalues: KeyValue[];\n}\n\n/**\n * Resource represents the entity producing telemetry\n */\nexport interface Resource {\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n}\n\n/**\n * InstrumentationScope represents the instrumentation library\n */\nexport interface InstrumentationScope {\n\tname: string;\n\tversion?: string;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n}\n\n// ============================================\n// Trace Types\n// ============================================\n\n/**\n * Root message for trace export\n */\nexport interface ExportTraceServiceRequest {\n\tresourceSpans?: ResourceSpans[];\n}\n\nexport interface ResourceSpans {\n\tresource?: Resource;\n\tscopeSpans?: ScopeSpans[];\n\tschemaUrl?: string;\n}\n\nexport interface ScopeSpans {\n\tscope?: InstrumentationScope;\n\tspans?: Span[];\n\tschemaUrl?: string;\n}\n\nexport interface Span {\n\ttraceId: string; // hex encoded 16 bytes\n\tspanId: string; // hex encoded 8 bytes\n\ttraceState?: string;\n\tparentSpanId?: string; // hex encoded 8 bytes\n\tflags?: number;\n\tname: string;\n\tkind?: SpanKind;\n\tstartTimeUnixNano: string; // uint64 as string\n\tendTimeUnixNano: string; // uint64 as string\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n\tevents?: SpanEvent[];\n\tdroppedEventsCount?: number;\n\tlinks?: SpanLink[];\n\tdroppedLinksCount?: number;\n\tstatus?: SpanStatus;\n}\n\nexport enum SpanKind {\n\tSPAN_KIND_UNSPECIFIED = 0,\n\tSPAN_KIND_INTERNAL = 1,\n\tSPAN_KIND_SERVER = 2,\n\tSPAN_KIND_CLIENT = 3,\n\tSPAN_KIND_PRODUCER = 4,\n\tSPAN_KIND_CONSUMER = 5,\n}\n\nexport interface SpanEvent {\n\ttimeUnixNano: string;\n\tname: string;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n}\n\nexport interface SpanLink {\n\ttraceId: string;\n\tspanId: string;\n\ttraceState?: string;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n\tflags?: number;\n}\n\nexport interface SpanStatus {\n\tmessage?: string;\n\tcode?: SpanStatusCode;\n}\n\nexport enum SpanStatusCode {\n\tSTATUS_CODE_UNSET = 0,\n\tSTATUS_CODE_OK = 1,\n\tSTATUS_CODE_ERROR = 2,\n}\n\n// ============================================\n// Log Types\n// ============================================\n\n/**\n * Root message for log export\n */\nexport interface ExportLogsServiceRequest {\n\tresourceLogs?: ResourceLogs[];\n}\n\nexport interface ResourceLogs {\n\tresource?: Resource;\n\tscopeLogs?: ScopeLogs[];\n\tschemaUrl?: string;\n}\n\nexport interface ScopeLogs {\n\tscope?: InstrumentationScope;\n\tlogRecords?: LogRecord[];\n\tschemaUrl?: string;\n}\n\nexport interface LogRecord {\n\ttimeUnixNano?: string;\n\tobservedTimeUnixNano: string;\n\tseverityNumber?: SeverityNumber;\n\tseverityText?: string;\n\tbody?: AnyValue;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n\tflags?: number;\n\ttraceId?: string;\n\tspanId?: string;\n}\n\nexport enum SeverityNumber {\n\tSEVERITY_NUMBER_UNSPECIFIED = 0,\n\tSEVERITY_NUMBER_TRACE = 1,\n\tSEVERITY_NUMBER_TRACE2 = 2,\n\tSEVERITY_NUMBER_TRACE3 = 3,\n\tSEVERITY_NUMBER_TRACE4 = 4,\n\tSEVERITY_NUMBER_DEBUG = 5,\n\tSEVERITY_NUMBER_DEBUG2 = 6,\n\tSEVERITY_NUMBER_DEBUG3 = 7,\n\tSEVERITY_NUMBER_DEBUG4 = 8,\n\tSEVERITY_NUMBER_INFO = 9,\n\tSEVERITY_NUMBER_INFO2 = 10,\n\tSEVERITY_NUMBER_INFO3 = 11,\n\tSEVERITY_NUMBER_INFO4 = 12,\n\tSEVERITY_NUMBER_WARN = 13,\n\tSEVERITY_NUMBER_WARN2 = 14,\n\tSEVERITY_NUMBER_WARN3 = 15,\n\tSEVERITY_NUMBER_WARN4 = 16,\n\tSEVERITY_NUMBER_ERROR = 17,\n\tSEVERITY_NUMBER_ERROR2 = 18,\n\tSEVERITY_NUMBER_ERROR3 = 19,\n\tSEVERITY_NUMBER_ERROR4 = 20,\n\tSEVERITY_NUMBER_FATAL = 21,\n\tSEVERITY_NUMBER_FATAL2 = 22,\n\tSEVERITY_NUMBER_FATAL3 = 23,\n\tSEVERITY_NUMBER_FATAL4 = 24,\n}\n\n// ============================================\n// Metrics Types\n// ============================================\n\n/**\n * Root message for metrics export\n */\nexport interface ExportMetricsServiceRequest {\n\tresourceMetrics?: ResourceMetrics[];\n}\n\nexport interface ResourceMetrics {\n\tresource?: Resource;\n\tscopeMetrics?: ScopeMetrics[];\n\tschemaUrl?: string;\n}\n\nexport interface ScopeMetrics {\n\tscope?: InstrumentationScope;\n\tmetrics?: Metric[];\n\tschemaUrl?: string;\n}\n\nexport interface Metric {\n\tname: string;\n\tdescription?: string;\n\tunit?: string;\n\tmetadata?: KeyValue[];\n\tgauge?: Gauge;\n\tsum?: Sum;\n\thistogram?: Histogram;\n\texponentialHistogram?: ExponentialHistogram;\n\tsummary?: Summary;\n}\n\nexport interface Gauge {\n\tdataPoints: NumberDataPoint[];\n}\n\nexport interface Sum {\n\tdataPoints: NumberDataPoint[];\n\taggregationTemporality: AggregationTemporality;\n\tisMonotonic?: boolean;\n}\n\nexport interface Histogram {\n\tdataPoints: HistogramDataPoint[];\n\taggregationTemporality: AggregationTemporality;\n}\n\nexport interface ExponentialHistogram {\n\tdataPoints: ExponentialHistogramDataPoint[];\n\taggregationTemporality: AggregationTemporality;\n}\n\nexport interface Summary {\n\tdataPoints: SummaryDataPoint[];\n}\n\nexport enum AggregationTemporality {\n\tAGGREGATION_TEMPORALITY_UNSPECIFIED = 0,\n\tAGGREGATION_TEMPORALITY_DELTA = 1,\n\tAGGREGATION_TEMPORALITY_CUMULATIVE = 2,\n}\n\nexport interface NumberDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tasDouble?: number;\n\tasInt?: string;\n\texemplars?: Exemplar[];\n\tflags?: number;\n}\n\nexport interface HistogramDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tcount: string;\n\tsum?: number;\n\tbucketCounts?: string[];\n\texplicitBounds?: number[];\n\texemplars?: Exemplar[];\n\tflags?: number;\n\tmin?: number;\n\tmax?: number;\n}\n\nexport interface ExponentialHistogramDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tcount: string;\n\tsum?: number;\n\tscale?: number;\n\tzeroCount?: string;\n\tpositive?: Buckets;\n\tnegative?: Buckets;\n\tflags?: number;\n\texemplars?: Exemplar[];\n\tmin?: number;\n\tmax?: number;\n\tzeroThreshold?: number;\n}\n\nexport interface Buckets {\n\toffset?: number;\n\tbucketCounts?: string[];\n}\n\nexport interface SummaryDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tcount: string;\n\tsum?: number;\n\tquantileValues?: ValueAtQuantile[];\n\tflags?: number;\n}\n\nexport interface ValueAtQuantile {\n\tquantile: number;\n\tvalue: number;\n}\n\nexport interface Exemplar {\n\tfilteredAttributes?: KeyValue[];\n\ttimeUnixNano: string;\n\tasDouble?: number;\n\tasInt?: string;\n\tspanId?: string;\n\ttraceId?: string;\n}\n\n// ============================================\n// Response Types\n// ============================================\n\nexport interface ExportTraceServiceResponse {\n\tpartialSuccess?: ExportTracePartialSuccess;\n}\n\nexport interface ExportTracePartialSuccess {\n\trejectedSpans?: string;\n\terrorMessage?: string;\n}\n\nexport interface ExportLogsServiceResponse {\n\tpartialSuccess?: ExportLogsPartialSuccess;\n}\n\nexport interface ExportLogsPartialSuccess {\n\trejectedLogRecords?: string;\n\terrorMessage?: string;\n}\n\nexport interface ExportMetricsServiceResponse {\n\tpartialSuccess?: ExportMetricsPartialSuccess;\n}\n\nexport interface ExportMetricsPartialSuccess {\n\trejectedDataPoints?: string;\n\terrorMessage?: string;\n}\n"],"mappings":";AAmGA,IAAY,gDAAL;AACN;AACA;AACA;AACA;AACA;AACA;;AACA;AAuBD,IAAY,4DAAL;AACN;AACA;AACA;;AACA;AAsCD,IAAY,4DAAL;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AA6DD,IAAY,4EAAL;AACN;AACA;AACA;;AACA"}
1
+ {"version":3,"file":"types-Cj59nqy7.mjs","names":[],"sources":["../src/otlp/types.ts"],"sourcesContent":["/**\n * OTLP JSON types based on OpenTelemetry Protocol specification.\n * These types represent the JSON encoding of OTLP protobuf messages.\n * @see https://opentelemetry.io/docs/specs/otlp/\n */\n\n// ============================================\n// Common Types\n// ============================================\n\n/**\n * Key-value pair for attributes\n */\nexport interface KeyValue {\n\tkey: string;\n\tvalue: AnyValue;\n}\n\n/**\n * Any value type (string, bool, int, double, array, kvlist, bytes)\n */\nexport interface AnyValue {\n\tstringValue?: string;\n\tboolValue?: boolean;\n\tintValue?: string; // int64 as string\n\tdoubleValue?: number;\n\tarrayValue?: ArrayValue;\n\tkvlistValue?: KeyValueList;\n\tbytesValue?: string; // base64 encoded\n}\n\nexport interface ArrayValue {\n\tvalues: AnyValue[];\n}\n\nexport interface KeyValueList {\n\tvalues: KeyValue[];\n}\n\n/**\n * Resource represents the entity producing telemetry\n */\nexport interface Resource {\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n}\n\n/**\n * InstrumentationScope represents the instrumentation library\n */\nexport interface InstrumentationScope {\n\tname: string;\n\tversion?: string;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n}\n\n// ============================================\n// Trace Types\n// ============================================\n\n/**\n * Root message for trace export\n */\nexport interface ExportTraceServiceRequest {\n\tresourceSpans?: ResourceSpans[];\n}\n\nexport interface ResourceSpans {\n\tresource?: Resource;\n\tscopeSpans?: ScopeSpans[];\n\tschemaUrl?: string;\n}\n\nexport interface ScopeSpans {\n\tscope?: InstrumentationScope;\n\tspans?: Span[];\n\tschemaUrl?: string;\n}\n\nexport interface Span {\n\ttraceId: string; // hex encoded 16 bytes\n\tspanId: string; // hex encoded 8 bytes\n\ttraceState?: string;\n\tparentSpanId?: string; // hex encoded 8 bytes\n\tflags?: number;\n\tname: string;\n\tkind?: SpanKind;\n\tstartTimeUnixNano: string; // uint64 as string\n\tendTimeUnixNano: string; // uint64 as string\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n\tevents?: SpanEvent[];\n\tdroppedEventsCount?: number;\n\tlinks?: SpanLink[];\n\tdroppedLinksCount?: number;\n\tstatus?: SpanStatus;\n}\n\nexport enum SpanKind {\n\tSPAN_KIND_UNSPECIFIED = 0,\n\tSPAN_KIND_INTERNAL = 1,\n\tSPAN_KIND_SERVER = 2,\n\tSPAN_KIND_CLIENT = 3,\n\tSPAN_KIND_PRODUCER = 4,\n\tSPAN_KIND_CONSUMER = 5,\n}\n\nexport interface SpanEvent {\n\ttimeUnixNano: string;\n\tname: string;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n}\n\nexport interface SpanLink {\n\ttraceId: string;\n\tspanId: string;\n\ttraceState?: string;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n\tflags?: number;\n}\n\nexport interface SpanStatus {\n\tmessage?: string;\n\tcode?: SpanStatusCode;\n}\n\nexport enum SpanStatusCode {\n\tSTATUS_CODE_UNSET = 0,\n\tSTATUS_CODE_OK = 1,\n\tSTATUS_CODE_ERROR = 2,\n}\n\n// ============================================\n// Log Types\n// ============================================\n\n/**\n * Root message for log export\n */\nexport interface ExportLogsServiceRequest {\n\tresourceLogs?: ResourceLogs[];\n}\n\nexport interface ResourceLogs {\n\tresource?: Resource;\n\tscopeLogs?: ScopeLogs[];\n\tschemaUrl?: string;\n}\n\nexport interface ScopeLogs {\n\tscope?: InstrumentationScope;\n\tlogRecords?: LogRecord[];\n\tschemaUrl?: string;\n}\n\nexport interface LogRecord {\n\ttimeUnixNano?: string;\n\tobservedTimeUnixNano: string;\n\tseverityNumber?: SeverityNumber;\n\tseverityText?: string;\n\tbody?: AnyValue;\n\tattributes?: KeyValue[];\n\tdroppedAttributesCount?: number;\n\tflags?: number;\n\ttraceId?: string;\n\tspanId?: string;\n}\n\nexport enum SeverityNumber {\n\tSEVERITY_NUMBER_UNSPECIFIED = 0,\n\tSEVERITY_NUMBER_TRACE = 1,\n\tSEVERITY_NUMBER_TRACE2 = 2,\n\tSEVERITY_NUMBER_TRACE3 = 3,\n\tSEVERITY_NUMBER_TRACE4 = 4,\n\tSEVERITY_NUMBER_DEBUG = 5,\n\tSEVERITY_NUMBER_DEBUG2 = 6,\n\tSEVERITY_NUMBER_DEBUG3 = 7,\n\tSEVERITY_NUMBER_DEBUG4 = 8,\n\tSEVERITY_NUMBER_INFO = 9,\n\tSEVERITY_NUMBER_INFO2 = 10,\n\tSEVERITY_NUMBER_INFO3 = 11,\n\tSEVERITY_NUMBER_INFO4 = 12,\n\tSEVERITY_NUMBER_WARN = 13,\n\tSEVERITY_NUMBER_WARN2 = 14,\n\tSEVERITY_NUMBER_WARN3 = 15,\n\tSEVERITY_NUMBER_WARN4 = 16,\n\tSEVERITY_NUMBER_ERROR = 17,\n\tSEVERITY_NUMBER_ERROR2 = 18,\n\tSEVERITY_NUMBER_ERROR3 = 19,\n\tSEVERITY_NUMBER_ERROR4 = 20,\n\tSEVERITY_NUMBER_FATAL = 21,\n\tSEVERITY_NUMBER_FATAL2 = 22,\n\tSEVERITY_NUMBER_FATAL3 = 23,\n\tSEVERITY_NUMBER_FATAL4 = 24,\n}\n\n// ============================================\n// Metrics Types\n// ============================================\n\n/**\n * Root message for metrics export\n */\nexport interface ExportMetricsServiceRequest {\n\tresourceMetrics?: ResourceMetrics[];\n}\n\nexport interface ResourceMetrics {\n\tresource?: Resource;\n\tscopeMetrics?: ScopeMetrics[];\n\tschemaUrl?: string;\n}\n\nexport interface ScopeMetrics {\n\tscope?: InstrumentationScope;\n\tmetrics?: Metric[];\n\tschemaUrl?: string;\n}\n\nexport interface Metric {\n\tname: string;\n\tdescription?: string;\n\tunit?: string;\n\tmetadata?: KeyValue[];\n\tgauge?: Gauge;\n\tsum?: Sum;\n\thistogram?: Histogram;\n\texponentialHistogram?: ExponentialHistogram;\n\tsummary?: Summary;\n}\n\nexport interface Gauge {\n\tdataPoints: NumberDataPoint[];\n}\n\nexport interface Sum {\n\tdataPoints: NumberDataPoint[];\n\taggregationTemporality: AggregationTemporality;\n\tisMonotonic?: boolean;\n}\n\nexport interface Histogram {\n\tdataPoints: HistogramDataPoint[];\n\taggregationTemporality: AggregationTemporality;\n}\n\nexport interface ExponentialHistogram {\n\tdataPoints: ExponentialHistogramDataPoint[];\n\taggregationTemporality: AggregationTemporality;\n}\n\nexport interface Summary {\n\tdataPoints: SummaryDataPoint[];\n}\n\nexport enum AggregationTemporality {\n\tAGGREGATION_TEMPORALITY_UNSPECIFIED = 0,\n\tAGGREGATION_TEMPORALITY_DELTA = 1,\n\tAGGREGATION_TEMPORALITY_CUMULATIVE = 2,\n}\n\nexport interface NumberDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tasDouble?: number;\n\tasInt?: string;\n\texemplars?: Exemplar[];\n\tflags?: number;\n}\n\nexport interface HistogramDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tcount: string;\n\tsum?: number;\n\tbucketCounts?: string[];\n\texplicitBounds?: number[];\n\texemplars?: Exemplar[];\n\tflags?: number;\n\tmin?: number;\n\tmax?: number;\n}\n\nexport interface ExponentialHistogramDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tcount: string;\n\tsum?: number;\n\tscale?: number;\n\tzeroCount?: string;\n\tpositive?: Buckets;\n\tnegative?: Buckets;\n\tflags?: number;\n\texemplars?: Exemplar[];\n\tmin?: number;\n\tmax?: number;\n\tzeroThreshold?: number;\n}\n\nexport interface Buckets {\n\toffset?: number;\n\tbucketCounts?: string[];\n}\n\nexport interface SummaryDataPoint {\n\tattributes?: KeyValue[];\n\tstartTimeUnixNano?: string;\n\ttimeUnixNano: string;\n\tcount: string;\n\tsum?: number;\n\tquantileValues?: ValueAtQuantile[];\n\tflags?: number;\n}\n\nexport interface ValueAtQuantile {\n\tquantile: number;\n\tvalue: number;\n}\n\nexport interface Exemplar {\n\tfilteredAttributes?: KeyValue[];\n\ttimeUnixNano: string;\n\tasDouble?: number;\n\tasInt?: string;\n\tspanId?: string;\n\ttraceId?: string;\n}\n\n// ============================================\n// Response Types\n// ============================================\n\nexport interface ExportTraceServiceResponse {\n\tpartialSuccess?: ExportTracePartialSuccess;\n}\n\nexport interface ExportTracePartialSuccess {\n\trejectedSpans?: string;\n\terrorMessage?: string;\n}\n\nexport interface ExportLogsServiceResponse {\n\tpartialSuccess?: ExportLogsPartialSuccess;\n}\n\nexport interface ExportLogsPartialSuccess {\n\trejectedLogRecords?: string;\n\terrorMessage?: string;\n}\n\nexport interface ExportMetricsServiceResponse {\n\tpartialSuccess?: ExportMetricsPartialSuccess;\n}\n\nexport interface ExportMetricsPartialSuccess {\n\trejectedDataPoints?: string;\n\terrorMessage?: string;\n}\n"],"mappings":";AAmGA,IAAY,gDAAL;AACN;AACA;AACA;AACA;AACA;AACA;;AACA;AAuBD,IAAY,4DAAL;AACN;AACA;AACA;;AACA;AAsCD,IAAY,4DAAL;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AA6DD,IAAY,4EAAL;AACN;AACA;AACA;;AACA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekmidas/telescope",
3
- "version": "1.1.1",
3
+ "version": "9.0.2",
4
4
  "description": "Laravel Telescope-style debugging and monitoring for web applications",
5
5
  "type": "module",
6
6
  "exports": {
@@ -175,7 +175,7 @@
175
175
  "kysely": ">=0.28.2 <0.30.0",
176
176
  "pino": "^9.0.0",
177
177
  "pino-abstract-transport": "^2.0.0 || ^3.0.0",
178
- "@geekmidas/logger": "^1.0.3"
178
+ "@geekmidas/logger": "^9.0.2"
179
179
  },
180
180
  "peerDependenciesMeta": {
181
181
  "@geekmidas/logger": {
@@ -251,7 +251,7 @@
251
251
  "kysely": "~0.29.4",
252
252
  "pino": "^9.6.0",
253
253
  "pino-abstract-transport": "~3.0.0",
254
- "@geekmidas/logger": "^1.0.3"
254
+ "@geekmidas/logger": "^9.0.2"
255
255
  },
256
256
  "scripts": {
257
257
  "build:ui": "pnpm --filter @geekmidas/telescope-ui build && tsx ../ui/scripts/embed-ui.ts dist/ui src/ui-assets.ts"