Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: stringify metadata in backfill (#10917)

Steffen Schmitz056c91799d77
diff --git a/worker/src/backgroundMigrations/backfillEventsHistoric.ts b/worker/src/backgroundMigrations/backfillEventsHistoric.ts
index b2b1c5acb6..aeb1a10905 100644
--- a/worker/src/backgroundMigrations/backfillEventsHistoric.ts
+++ b/worker/src/backgroundMigrations/backfillEventsHistoric.ts
@@ -529,7 +529,7 @@ export default class BackfillEventsHistoric implements IBackgroundMigration {
o.cost_details,
coalesce(o.input, '') AS input,
coalesce(o.output, '') AS output,
- toJsonString(o.metadata) AS metadata,
+ toJSONString(o.metadata) AS metadata,
mapKeys(o.metadata) AS metadata_names,
mapValues(o.metadata) AS metadata_raw_values,
multiIf(mapContains(o.metadata, 'resourceAttributes'), 'otel-backfill', 'ingestion-api-backfill') AS source,