trigger.dev icon indicating copy to clipboard operation
trigger.dev copied to clipboard

[TRI-4123] Logging objects with keys with periods in doesn't render properly in the UI

Open matt-aitken opened this issue 1 year ago • 1 comments

Problem

{
  "Key 0.002mm": 31.4,
}

In our dashboard this appears as:

{
  "Key 0": {
      "002mm": 31.4
  }
}

We flatten them to store in the database using . as the delimiter. These dots will need to be escaped/unescaped when flattening/unflattening.

This won't impact anything except the logs, we only flatten data there. It'll work fine in payloads and outputs.

Flatten code: https://github.com/triggerdotdev/trigger.dev/blob/main/packages/core/src/v3/utils/flattenAttributes.ts Flatten tests: https://github.com/triggerdotdev/trigger.dev/blob/main/packages/core/test/flattenAttributes.test.ts

TRI-4123

matt-aitken avatar Nov 29 '24 10:11 matt-aitken

hey @matt-aitken please review my PR #1514

yadavshubham01 avatar Nov 29 '24 19:11 yadavshubham01