From f5e2161a9ea390303a4267e28aabe46806b3a2fc Mon Sep 17 00:00:00 2001 From: David Baker <dave@matrix.org> Date: Thu, 20 Apr 2023 17:18:06 +0100 Subject: [PATCH] Add the event name to the rageshake span processor export --- src/analytics/RageshakeSpanProcessor.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/analytics/RageshakeSpanProcessor.ts b/src/analytics/RageshakeSpanProcessor.ts index c58c2f7..b5b055f 100644 --- a/src/analytics/RageshakeSpanProcessor.ts +++ b/src/analytics/RageshakeSpanProcessor.ts @@ -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 }, + ], })), }; }),