[[
  {
    "name": "langchain.request",
    "service": "tests.contrib.langchain",
    "resource": "langchain_openai.llms.base.OpenAI",
    "trace_id": 0,
    "span_id": 1,
    "parent_id": 0,
    "type": "",
    "error": 1,
    "meta": {
      "_dd.p.dm": "-0",
      "_dd.p.tid": "689b86a200000000",
      "error.message": "Error code: 400 - {'error': {'message': 'Invalid token in prompt: 123456. Minimum value is 0, maximum value is 100257 (inclusive).', 'type': 'invalid_request_error', 'param': None, 'code': None}}",
      "error.stack": "Traceback (most recent call last):\n  File \"/Users/sam.brenner/dd/dd-trace-py/ddtrace/contrib/internal/langchain/patch.py\", line 105, in traced_llm_generate\n    completions = func(*args, **kwargs)\n  File \"/Users/sam.brenner/dd/dd-trace-py/.riot/venv_py31013_12135c7d0e723490/lib/python3.10/site-packages/langchain_core/language_models/llms.py\", line 963, in generate\n    output = self._generate_helper(\n  File \"/Users/sam.brenner/dd/dd-trace-py/.riot/venv_py31013_12135c7d0e723490/lib/python3.10/site-packages/langchain_core/language_models/llms.py\", line 784, in _generate_helper\n    self._generate(\n  File \"/Users/sam.brenner/dd/dd-trace-py/.riot/venv_py31013_12135c7d0e723490/lib/python3.10/site-packages/langchain_openai/llms/base.py\", line 343, in _generate\n    response = self.client.create(prompt=_prompts, **params)\n  File \"/Users/sam.brenner/dd/dd-trace-py/.riot/venv_py31013_12135c7d0e723490/lib/python3.10/site-packages/openai/_utils/_utils.py\", line 279, in wrapper\n    return func(*args, **kwargs)\n  File \"/Users/sam.brenner/dd/dd-trace-py/.riot/venv_py31013_12135c7d0e723490/lib/python3.10/site-packages/openai/resources/completions.py\", line 539, in create\n    return self._post(\n  File \"/Users/sam.brenner/dd/dd-trace-py/.riot/venv_py31013_12135c7d0e723490/lib/python3.10/site-packages/openai/_base_client.py\", line 1283, in post\n    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))\n  File \"/Users/sam.brenner/dd/dd-trace-py/.riot/venv_py31013_12135c7d0e723490/lib/python3.10/site-packages/openai/_base_client.py\", line 960, in request\n    return self._request(\n  File \"/Users/sam.brenner/dd/dd-trace-py/.riot/venv_py31013_12135c7d0e723490/lib/python3.10/site-packages/openai/_base_client.py\", line 1064, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': 'Invalid token in prompt: 123456. Minimum value is 0, maximum value is 100257 (inclusive).', 'type': 'invalid_request_error', 'param': None, 'code': None}}\n",
      "error.type": "openai.BadRequestError",
      "langchain.request.model": "gpt-3.5-turbo-instruct",
      "langchain.request.provider": "openai",
      "language": "python",
      "runtime-id": "3d5dccfd39404ff784a012dc9c773114"
    },
    "metrics": {
      "_dd.measured": 1,
      "_dd.top_level": 1,
      "_dd.tracer_kr": 1.0,
      "_sampling_priority_v1": 1,
      "process_id": 66588
    },
    "duration": 21026000,
    "start": 1755023010875130000
  }]]
