Traces API
Send Trace
Send OpenTelemetry-compatible traces to Langtrace
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
Your Langtrace API key
Must be application/json
Must be opentelemetry-python
Body
Array of resource spans containing trace data
Resource attributes identifying the service and environment
Array of scope spans containing individual operation traces
Array of spans representing individual operations
Request Example for OpenAI Chat Completion
Response
HTTP status code (200 for success)
Success or error message
Error Codes
Invalid or missing API key
Invalid request format or missing required fields
Internal server error