Skip to content

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

Open

Description

@matt-aitken

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

  1. added
    v3
    on Jun 21, 2024
  2. 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
  3. 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

    v3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions