Skip to content

What's the purpose of logging if messages are truncated ? At least it should be configurable #6056

Description

@onaly

def _format_args(self, args: dict[str, Any], max_length: int = 300) -> str:

Activity

  1. added
    tracing[Component] This issue is related to OpenTelemetry tracing
    on Jun 10, 2026
  2. added theissue type on Jun 10, 2026
  3. sanketpatil06 commented on Jun 16, 2026

    @sanketpatil06

    Hi @onaly , Thanks for the request. To ensure the fix addresses your needs, could you share a bit more context on your specific use case and how you would prefer to configure these logging limits in your workflow?

  4. added
    request clarification[Status] The maintainer need clarification or more information from the author
    on Jun 16, 2026
  5. Manitchahar commented on Sep 9, 2026

    @Manitchahar

    I reproduced the logging use case with a real InMemoryRunner and a local
    scripted model: a tool returns a long diagnostic dictionary whose error detail
    falls after the 300-character cutoff, so the console output omits the error.

    Would two keyword-only LoggingPlugin constructor options,
    max_content_length=200 and max_args_length=300, with None disabling
    truncation, fit the intended direction? I have a small patch preserving the
    current defaults, with 31 logging tests passing on Python 3.10 through 3.14 and
    a runner reproduction. I will open it as a draft for concrete review of this
    proposal, pending agreement on the API.

  6. Manitchahar commented on Oct 10, 2026

    @Manitchahar

    @sanketpatil06 I've opened #7489 with configurable max_content_length / max_args_length options on LoggingPlugin (current defaults unchanged, None disables truncation), with tests. It replaces #7079, which closed automatically when I deleted my fork. Happy to adjust the API if you'd prefer a different shape.

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

Metadata

Metadata

Assignees

Labels

request clarification[Status] The maintainer need clarification or more information from the authortracing[Component] This issue is related to OpenTelemetry tracing

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions