@@ -51,6 +51,7 @@ import {
51
51
Workspace ,
52
52
} from '../../../browser'
53
53
import { cache as redis } from '../../../cache'
54
+ import { database } from '../../../client'
54
55
import { publisher } from '../../../events/publisher'
55
56
import { processSegmentJobKey } from '../../../jobs/job-definitions/tracing/processSegmentJob'
56
57
import { tracingQueue } from '../../../jobs/queues'
@@ -62,7 +63,6 @@ import { SpanMetadatasRepository, SpansRepository } from '../../../repositories'
62
63
import { spans } from '../../../schema'
63
64
import { convertTimestamp } from './shared'
64
65
import { SPAN_SPECIFICATIONS } from './specifications'
65
- import { database } from '../../../client'
66
66
67
67
export async function processSpan (
68
68
{
@@ -96,9 +96,13 @@ export async function processSpan(
96
96
const segments = extractingsb . value
97
97
98
98
const id = span . spanId
99
+
99
100
const traceId = span . traceId
101
+
100
102
const segmentId = segments . at ( - 1 ) ?. id
103
+
101
104
const parentId = span . parentSpanId
105
+
102
106
const name = span . name . slice ( 0 , 128 )
103
107
104
108
const convertingsk = convertSpanKind ( span . kind )
@@ -147,7 +151,7 @@ export async function processSpan(
147
151
if ( extractingse . error ) return Result . error ( extractingse . error )
148
152
if ( extractingse . value != undefined ) {
149
153
status = SpanStatus . Error
150
- message = extractingse . value || undefined
154
+ message = extractingse . value ?. slice ( 0 , 256 ) || undefined
151
155
}
152
156
153
157
let metadata = {
0 commit comments