Skip to content

Truncate span input when input is too large #260

Open
@ant31

Description

@ant31

Truncate span input when too large

Trace span input has a size limit
The whole run fails, not sending the trace should be at most a log warning:
the generation(aka cost) already happened and tracing is secondary.

I don't want to disable trace all together.
I would like to:

  1. Skip or truncate input/output automatically when too large on spans
    2. Don't raise errors but warnings, or at least have the options to ignore them (trace_ignore_errors=True)
Tracing client error 400: {
  "error": {
    "message": "Invalid 'data[0].span_data.input': data payload too large. Expected a JSON value under 100KB.",
    "type": "invalid_request_error",
    "param": "data[0].span_data.input",
    "code": null
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions