Skip to content

Truncation DevEx #1471

@ivo-1

Description

@ivo-1

Description

I think the experience when dealing with truncation could be improved.

  • I would suggest the truncation replacement to be more explicit, e.g. [...truncated by logfire...] instead of just ... to prevent confusion. I've implemented that here: fix: be more explicit with truncation #1470
  • The warning for truncation in the details tab is much appreciated, however it is missing from the Agent run tab. There should be a warning for truncated fields there as well.
  • If it's being truncated the result seems to be much less than before the threshold. It would be better to truncate approximately up to the threshold. It seems there are competing max_length parameters at play. In my case I have 100k character long messages that are not being truncated but if they are being truncated they suddenly are only 10k characters long. This also led me down a wrong path before thinking about truncation.

Python, Logfire & OS Versions, related packages (not required)

logfire: 4.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions