Skip to main content
Send traces to Langtrace using the OpenTelemetry trace format. This endpoint accepts traces for various operations including OpenAI chat completions, function calls, and other LLM interactions.

Headers

string
required
Your Langtrace API key
string
required
Must be application/json
string
required
Must be opentelemetry-python

Body

array
required
Array of resource spans containing trace data
object
required
Resource attributes identifying the service and environment
array
required
Array of scope spans containing individual operation traces
array
required
Array of spans representing individual operations

Request Example for OpenAI Chat Completion

Response

number
HTTP status code (200 for success)
string
Success or error message

Error Codes

string
Invalid or missing API key
string
Invalid request format or missing required fields
string
Internal server error