Add the event name to the rageshake span processor export

This commit is contained in:
David Baker 2023-04-20 17:18:06 +01:00
parent 8437e263af
commit f5e2161a9e

View file

@ -98,7 +98,11 @@ export class RageshakeSpanProcessor implements SpanProcessor {
tags: dumpAttributes(span.attributes),
logs: span.events.map((event) => ({
timestamp: hrTimeToMicroseconds(event.time),
fields: dumpAttributes(event.attributes ?? {}),
// The name of the event is in the "event" field, aparently.
fields: [
...dumpAttributes(event.attributes ?? {}),
{ key: "event", type: "string", value: event.name },
],
})),
};
}),