Skip to content

[TRI-2755] v3 run log outputs with empty array inside objects aren't shown #1174

Open
@matt-aitken

Description

@matt-aitken
Member

This task:

export const myTask = task({
  id: 'some-id',
  run: async () => {
    return {
      hooks: [],
    };
});

Has the correct output:

{
  "hooks": [],
}

But in the log data/on the run page is shows just an empty object. This is a bug with the flattenAttributes/unflattenAttributes code we use with our OpenTelemetry pipeline.

TRI-2755

Activity

changed the title [-]v3 run log outputs with empty array inside objects aren't shown[/-] [+][TRI-2755] v3 run log outputs with empty array inside objects aren't shown[/+] on Jun 21, 2024
PaulBGD

PaulBGD commented on Mar 29, 2025

@PaulBGD

This is pretty annoying, is there a good fix for this? I've been having to JSON.stringify all my objects just so I can look at the arrays

edit: tried my hand at a fix, not sure I have enough context to fully understand all that uses the serialization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    v3Only impacts version 3 projects

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @PaulBGD@matt-aitken

      Issue actions

        [TRI-2755] v3 run log outputs with empty array inside objects aren't shown · Issue #1174 · triggerdotdev/trigger.dev