Skip to content

Commit 64fcc88

Browse files
authored
fix(otel): spans with entities (like waitpoints) now correctly returned from clickhouse repo (#2591)
1 parent 23dbe28 commit 64fcc88

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

apps/webapp/app/v3/eventRepository/clickhouseEventRepository.server.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,9 +1110,16 @@ export class ClickhouseEventRepository implements IEventRepository {
11101110
parsedMetadata &&
11111111
"entity" in parsedMetadata &&
11121112
typeof parsedMetadata.entity === "object" &&
1113-
parsedMetadata.entity
1113+
parsedMetadata.entity &&
1114+
"entityType" in parsedMetadata.entity &&
1115+
typeof parsedMetadata.entity.entityType === "string" &&
1116+
"entityId" in parsedMetadata.entity &&
1117+
typeof parsedMetadata.entity.entityId === "string"
11141118
) {
1115-
span.entity = parsedMetadata.entity as { type: string | undefined; id: string | undefined };
1119+
span.entity = {
1120+
id: parsedMetadata.entity.entityId,
1121+
type: parsedMetadata.entity.entityType,
1122+
};
11161123
}
11171124

11181125
if (record.kind === "SPAN") {

0 commit comments

Comments
 (0)