Merge pull request #1020 from vector-im/dbkr/rageshake_processor_event_name

Add the event name to the rageshake span processor export
This commit is contained in:
David Baker 2023-04-21 10:24:31 +01:00 committed by GitHub
commit 060a50d27a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 },
],
})),
};
}),