Skip to content

Commit 3e685e9

Browse files
fix/parsing tel spans to traceo spans
1 parent b8470f0 commit 3e685e9

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

packages/opentelemetry-node/src/exporters/tracing-exporter.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,27 @@ export class TraceoTracingExporter extends OTLPTraceExporter {
2626
return;
2727
}
2828

29+
const spans = items.map((span) => {
30+
return {
31+
name: span.name,
32+
attributes: span.attributes,
33+
links: span.links,
34+
events: span.events,
35+
duration: span.duration,
36+
startTime: span.startTime,
37+
endTime: span.endTime,
38+
parentSpanId: span?.parentSpanId,
39+
kind: span.kind,
40+
resource: span.resource,
41+
spanContext: {
42+
traceId: span.spanContext().traceId,
43+
spanId: span.spanContext().spanId
44+
}
45+
}
46+
});
47+
2948
transport.request({
30-
body: items,
49+
body: spans,
3150
url: CAPTURE_ENDPOINT.TRACING,
3251
method: "POST",
3352
callback: () => {

0 commit comments

Comments
 (0)